amazon-connect / amazon-connect-chatjs
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 194 units with 1,483 lines of code in units (80.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (56 lines of code)
    • 10 medium size units (240 lines of code)
    • 37 small units (530 lines of code)
    • 146 very small units (657 lines of code)
0% | 3% | 16% | 35% | 44%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 3% | 16% | 35% | 44%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
showcase0% | 28% | 44% | 14% | 12%
src/core0% | 0% | 13% | 33% | 52%
src/client0% | 0% | 24% | 60% | 15%
src/core/connectionHelpers0% | 0% | 8% | 24% | 66%
src0% | 0% | 0% | 47% | 52%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
setup()
in showcase/test.js
56 1 0
validateChatDetails()
in src/core/chatArgsValidator.js
30 5 2
getTranscript()
in src/client/client.js
27 2 2
sendAttachment()
in src/client/client.js
26 1 3
getTranscript()
in showcase/test.js
23 1 0
send()
in showcase/test.js
23 1 0
getTranscript()
in src/core/chatController.js
23 9 1
_handleIncomingMessage()
in src/core/chatController.js
23 4 1
sendEvent()
in showcase/test.js
22 1 0
initWebsocketManager()
in src/core/connectionHelpers/LpcConnectionHelper.js
22 3 2
test1()
in showcase/test.js
21 1 0
_convertToString()
in src/log.js
20 7 1
_onConnectSuccess()
in src/core/chatController.js
19 2 1
constructor()
in src/core/chatController.js
18 1 1
_convertConnectionHelperStatus()
in src/core/chatController.js
18 6 1
constructor()
in src/core/connectionHelpers/LpcConnectionHelper.js
18 2 4
_fetchConnectionDetails()
in src/core/connectionHelpers/connectionDetailsProvider.js
18 3 0
createParticipantConnection()
in src/client/client.js
17 1 2
_sendRequest()
in src/client/client.js
17 2 1
reconnectTest()
in showcase/test.js
16 1 0