aws-quickstart / quickstart-quantiphi-lex-kendra-backend
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 39 units with 490 lines of code in units (35.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (28 lines of code)
    • 4 simple units (74 lines of code)
    • 34 very simple units (388 lines of code)
0% | 0% | 5% | 15% | 79%
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
py0% | 0% | 5% | 15% | 79%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
functions/source/lex_custom_resource0% | 0% | 17% | 9% | 72%
functions/source/kendra_search_intent_handler_lambda0% | 0% | 0% | 27% | 72%
functions/source/kendra_custom_resource0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def create_lex_intents()
in functions/source/lex_custom_resource/lex_custom_resource.py
28 11 6
def get_remembered_slot_values()
in functions/source/kendra_search_intent_handler_lambda/helpers.py
23 8 2
def get_slot_values()
in functions/source/kendra_search_intent_handler_lambda/helpers.py
18 7 2
def delete_intents()
in functions/source/lex_custom_resource/lex_custom_resource.py
16 6 2
def get_kendra_answer()
in functions/source/kendra_search_intent_handler_lambda/helpers.py
17 6 1
def create_lex_bot()
in functions/source/lex_custom_resource/lex_custom_resource.py
20 4 5
def check_bot_status()
in functions/source/lex_custom_resource/lex_custom_resource.py
13 4 1
def remember_slot_values()
in functions/source/kendra_search_intent_handler_lambda/helpers.py
7 4 2
def lambda_handler()
in functions/source/kendra_search_intent_handler_lambda/lambda_function.py
22 4 2
def kendra_search_intent_handler()
in functions/source/kendra_search_intent_handler_lambda/lambda_function.py
25 4 2
def create()
in functions/source/kendra_custom_resource/kendra_custom_resource.py
17 3 2
def update()
in functions/source/kendra_custom_resource/kendra_custom_resource.py
8 3 1
def check_kendra_index_status()
in functions/source/kendra_custom_resource/kendra_custom_resource.py
10 3 1
def create_lex_slot_types()
in functions/source/lex_custom_resource/lex_custom_resource.py
14 3 1
def create()
in functions/source/lex_custom_resource/lex_custom_resource.py
18 3 2
def poll_create()
in functions/source/lex_custom_resource/lex_custom_resource.py
16 3 2
def delete_slot_types()
in functions/source/lex_custom_resource/lex_custom_resource.py
8 3 2
def delete_bot_aliases()
in functions/source/lex_custom_resource/lex_custom_resource.py
9 3 1
def answer_result_type()
in functions/source/kendra_search_intent_handler_lambda/helpers.py
31 3 1
def check_required_properties()
in functions/source/kendra_custom_resource/kendra_custom_resource.py
3 2 2