aws-samples / aws-lex-web-ui
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 230 units with 3,248 lines of code in units (30.3% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (182 lines of code)
    • 5 medium complex units (200 lines of code)
    • 20 simple units (713 lines of code)
    • 203 very simple units (2,153 lines of code)
0% | 5% | 6% | 21% | 66%
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% | 7% | 8% | 22% | 61%
py0% | 0% | 0% | 20% | 79%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lex-web-ui/src0% | 8% | 6% | 21% | 62%
src/initiate-chat-lambda0% | 0% | 64% | 0% | 35%
templates/custom-resources0% | 0% | 0% | 20% | 79%
lex-web-ui0% | 0% | 0% | 49% | 50%
config/utils0% | 0% | 0% | 100% | 0%
src/lex-web-ui-loader0% | 0% | 0% | 0% | 100%
config0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
postTextMessage()
in lex-web-ui/src/store/actions.js
129 44 2
constructor()
in lex-web-ui/src/lex-web-ui.js
53 27 1
initOptions()
in lex-web-ui/src/lib/lex/recorder.js
43 21 1
playAudioInterruptHandler()
in lex-web-ui/src/store/actions.js
43 14 1
function startChatContact()
in src/initiate-chat-lambda/index.js
59 13 1
mergeConfig()
in lex-web-ui/src/store/mutations.js
24 13 2
_setIsMicQuiet()
in lex-web-ui/src/lib/lex/recorder.js
31 12 0
postText()
in lex-web-ui/src/lib/lex/client.js
61 10 3
def handler()
in templates/custom-resources/lex-manager.py
42 8 2
function downsampleTrimBuffer()
in lex-web-ui/src/lib/lex/wav-worker.js
43 8 2
def _get_bot_slot_types()
in templates/custom-resources/lexutils.py
19 7 1
def main()
in templates/custom-resources/lex-manager.py
23 7 1
_setIsMicMuted()
in lex-web-ui/src/lib/lex/recorder.js
24 7 0
_initMicVolumeProcessor()
in lex-web-ui/src/lib/lex/recorder.js
42 7 0
setAudioContentType()
in lex-web-ui/src/store/mutations.js
17 7 2
updateLexState()
in lex-web-ui/src/store/actions.js
37 7 2
sendMessageToParentWindow()
in lex-web-ui/src/store/actions.js
41 7 2
def change_intent_code_hooks()
in templates/custom-resources/lexutils.py
14 6 2
def _import_slot_types()
in templates/custom-resources/lexutils.py
35 6 1
def _import_intents()
in templates/custom-resources/lexutils.py
33 6 1