aws-quickstart / quickstart-agilisium-conversational-bot
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 66 units with 1,195 lines of code in units (68.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (347 lines of code)
    • 9 simple units (251 lines of code)
    • 49 very simple units (597 lines of code)
0% | 0% | 29% | 21% | 49%
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% | 27% | 20% | 51%
js0% | 0% | 38% | 23% | 37%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
functions/source/bot_fulfillment0% | 0% | 45% | 7% | 47%
assets/web/js0% | 0% | 38% | 23% | 37%
functions/source/bootstrap_redshift0% | 0% | 16% | 24% | 58%
functions/source/lex_custom_lambda0% | 0% | 16% | 33% | 49%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function showResponse()
in assets/web/js/custom.js
65 22 1
def get_table_response()
in functions/source/bot_fulfillment/bot_fulfillment.py
55 19 7
def validate_sales_metrics_performing_slots()
in functions/source/bot_fulfillment/bot_fulfillment.py
27 16 4
def validate_sales_metrics_general_slots()
in functions/source/bot_fulfillment/bot_fulfillment.py
26 15 4
def insert_records()
in functions/source/bootstrap_redshift/bootstrap_redshift.py
55 15 1
def validate_sales_team_size_office_slots()
in functions/source/bot_fulfillment/bot_fulfillment.py
20 11 4
def prepare_response()
in functions/source/bot_fulfillment/bot_fulfillment.py
46 11 4
def lambda_handler()
in functions/source/lex_custom_lambda/lex_custom_lambda.py
53 11 2
def get_text_response()
in functions/source/bot_fulfillment/bot_fulfillment.py
27 8 5
def create_bot()
in functions/source/lex_custom_lambda/chatbot_utils.py
32 8 2
def lambda_handler()
in functions/source/bootstrap_redshift/bootstrap_redshift.py
35 8 2
def create_slots()
in functions/source/lex_custom_lambda/chatbot_utils.py
22 7 2
def create_intents()
in functions/source/lex_custom_lambda/chatbot_utils.py
26 7 2
function pushChat()
in assets/web/js/custom.js
39 6 0
def create_bot()
in functions/source/lex_custom_lambda/lex_custom_lambda.py
24 6 1
def save_customers_data()
in functions/source/bootstrap_redshift/bootstrap_redshift.py
18 6 3
def save_orders_data()
in functions/source/bootstrap_redshift/bootstrap_redshift.py
28 6 3
def get_slots()
in functions/source/lex_custom_lambda/chatbot_utils.py
16 5 0
def get_intents()
in functions/source/lex_custom_lambda/chatbot_utils.py
16 5 0
def copy_webui_code()
in functions/source/lex_custom_lambda/lex_custom_lambda.py
29 5 1