aws-samples / aws-aurora-serverless-data-api-sam
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 28 units with 330 lines of code in units (54.7% 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)
    • 2 simple units (60 lines of code)
    • 26 very simple units (270 lines of code)
0% | 0% | 0% | 18% | 81%
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% | 0% | 18% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambdas/helper0% | 0% | 0% | 22% | 77%
lambdas0% | 0% | 0% | 0% | 100%
deploy_scripts/ddl_scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def batch_execute_statement()
in lambdas/helper/dal.py
34 6 5
def find_ec2()
in lambdas/helper/dal.py
26 6 2
def save_ec2()
in lambdas/helper/dal.py
27 5 4
def _xray_add_metadata()
in lambdas/helper/dal.py
3 4 2
def execute_statement()
in lambdas/helper/dal.py
24 4 4
def find_package()
in lambdas/helper/dal.py
26 4 3
def get_cfn_output()
in deploy_scripts/ddl_scripts/create_schema.py
3 4 2
def validate_path_parameters()
in lambdas/get_ec2_info.py
6 3 1
def validate_ec2_path_parameters()
in lambdas/add_ec2_info.py
6 3 1
def validate_ec2_input_parameters()
in lambdas/add_ec2_info.py
4 3 1
def handle_error()
in lambdas/helper/lambdautils.py
14 3 1
def _xray_start()
in lambdas/helper/dal.py
3 3 1
def _xray_stop()
in lambdas/helper/dal.py
3 3 0
def _save_packages_batch()
in lambdas/helper/dal.py
18 3 4
19 3 5
def handler()
in lambdas/get_ec2_info.py
13 2 2
def validate_input()
in lambdas/add_ec2_info.py
7 2 1
def handler()
in lambdas/add_ec2_info.py
10 2 2
def key_missing_or_empty_value()
in lambdas/helper/lambdautils.py
2 2 2
def _save_package()
in lambdas/helper/dal.py
15 2 4