aws-ia / workshop-taskcat
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 21 units with 291 lines of code in units (5.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (140 lines of code)
    • 0 simple units (0 lines of code)
    • 19 very simple units (151 lines of code)
0% | 0% | 48% | 0% | 51%
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% | 48% | 0% | 51%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
content/lab_assets/start/lab50% | 0% | 54% | 0% | 45%
content/lab_assets/start/lab40% | 0% | 55% | 0% | 44%
content/lab_assets/start/lab30% | 0% | 0% | 0% | 100%
content/lab_assets/start/lab10% | 0% | 0% | 0% | 100%
content/lab_assets/start/lab20% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in content/lab_assets/start/lab4/cfn-project/lambda_functions/source/Survey/survey.py
70 11 2
def lambda_handler()
in content/lab_assets/start/lab5/cfn-project/lambda_functions/source/Survey/survey.py
70 11 2
def lambda_handler()
in content/lab_assets/start/lab4/cfn-project/lambda_functions/source/SurveySubmit/survey_submit.py
31 4 2
def lambda_handler()
in content/lab_assets/start/lab5/cfn-project/lambda_functions/source/SurveySubmit/survey_submit.py
32 4 2
def _generate_random_string()
in content/lab_assets/start/lab3/cfn-project/lambda_functions/source/GenRandom/lambda_function.py
8 3 2
def _generate_random_string()
in content/lab_assets/start/lab1/cfn-project/lambda_functions/source/GenRandom/lambda_function.py
8 3 2
def _generate_random_string()
in content/lab_assets/start/lab2/cfn-project/lambda_functions/source/GenRandom/lambda_function.py
8 3 2
def get_ddb_table()
in content/lab_assets/start/lab4/cfn-project/lambda_functions/source/SurveySubmit/survey_submit.py
20 2 1
def get_ddb_table()
in content/lab_assets/start/lab5/cfn-project/lambda_functions/source/SurveySubmit/survey_submit.py
20 2 1
def acc_id_from_arn()
in content/lab_assets/start/lab4/cfn-project/lambda_functions/source/SurveySubmit/survey_submit.py
2 1 1
def region_from_arn()
in content/lab_assets/start/lab4/cfn-project/lambda_functions/source/SurveySubmit/survey_submit.py
2 1 1
def table_name_from_arn()
in content/lab_assets/start/lab4/cfn-project/lambda_functions/source/SurveySubmit/survey_submit.py
2 1 1
def no_op()
in content/lab_assets/start/lab3/cfn-project/lambda_functions/source/GenRandom/lambda_function.py
2 1 2
def handler()
in content/lab_assets/start/lab3/cfn-project/lambda_functions/source/GenRandom/lambda_function.py
2 1 2
def acc_id_from_arn()
in content/lab_assets/start/lab5/cfn-project/lambda_functions/source/SurveySubmit/survey_submit.py
2 1 1
def region_from_arn()
in content/lab_assets/start/lab5/cfn-project/lambda_functions/source/SurveySubmit/survey_submit.py
2 1 1
def table_name_from_arn()
in content/lab_assets/start/lab5/cfn-project/lambda_functions/source/SurveySubmit/survey_submit.py
2 1 1
def no_op()
in content/lab_assets/start/lab1/cfn-project/lambda_functions/source/GenRandom/lambda_function.py
2 1 2
def handler()
in content/lab_assets/start/lab1/cfn-project/lambda_functions/source/GenRandom/lambda_function.py
2 1 2
def no_op()
in content/lab_assets/start/lab2/cfn-project/lambda_functions/source/GenRandom/lambda_function.py
2 1 2