amazon-connect / amazon-connect-chatjs
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 194 units with 1,483 lines of code in units (80.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 7 simple units (111 lines of code)
    • 187 very simple units (1,372 lines of code)
0% | 0% | 0% | 7% | 92%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
js0% | 0% | 0% | 7% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 0% | 22% | 77%
src/core0% | 0% | 0% | 9% | 90%
src/core/connectionHelpers0% | 0% | 0% | 0% | 100%
src/client0% | 0% | 0% | 0% | 100%
showcase0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
normalizeChatDetails()
in src/core/chatArgsValidator.js
13 10 1
getTranscript()
in src/core/chatController.js
23 9 1
10 8 1
_convertToString()
in src/log.js
20 7 1
_convertConnectionHelperStatus()
in src/core/chatController.js
18 6 1
15 6 2
12 6 1
validateChatDetails()
in src/core/chatArgsValidator.js
30 5 2
update()
in src/globalConfig.js
6 5 1
getCachedClient()
in src/client/client.js
11 4 1
_handleIncomingMessage()
in src/core/chatController.js
23 4 1
12 4 2
3 4 1
createChatSession()
in src/core/chatSession.js
14 3 4
sendEvent()
in src/core/chatController.js
14 3 1
tryCleanup()
in src/core/connectionHelpers/LpcConnectionHelper.js
6 3 0
handleMessage()
in src/core/connectionHelpers/LpcConnectionHelper.js
5 3 1
initWebsocketManager()
in src/core/connectionHelpers/LpcConnectionHelper.js
22 3 2
_fetchConnectionDetails()
in src/core/connectionHelpers/connectionDetailsProvider.js
18 3 0
var EventBus = function()
in src/core/eventbus.js
5 3 1