aws-solutions / aws-control-tower-customizations
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 271 units with 3,663 lines of code in units (88.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (233 lines of code)
    • 30 simple units (995 lines of code)
    • 236 very simple units (2,435 lines of code)
0% | 0% | 6% | 27% | 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
py0% | 0% | 6% | 27% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source0% | 0% | 16% | 38% | 44%
source/manifest0% | 0% | 2% | 37% | 60%
source/utils0% | 0% | 0% | 26% | 73%
source/aws/services0% | 0% | 0% | 3% | 96%
source/aws/utils0% | 0% | 0% | 0% | 100%
source/metrics0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def service_control_policy()
in source/state_machine_router.py
82 20 2
def get_final_account_list()
in source/manifest/manifest_parser.py
28 13 5
def create_stack_instances()
in source/state_machine_handler.py
51 13 1
def cloudformation()
in source/state_machine_router.py
29 11 2
def list_stack_instances_account_ids()
in source/state_machine_handler.py
43 11 1
def get_accounts_and_regions_per_stack_set()
in source/aws/services/cloudformation.py
35 10 2
def describe_stack_set_operation()
in source/state_machine_handler.py
41 10 1
def delete_stack_instances()
in source/state_machine_handler.py
28 10 1
def list_policies()
in source/state_machine_handler.py
23 10 1
def cfn_handler()
in source/utils/crhelper.py
30 10 7
def config_deployer()
in source/config_deployer.py
57 10 1
def _process_alfred_helper()
in source/manifest/cfn_params_handler.py
22 9 7
def run_execution_sequential_mode()
in source/manifest/sm_execution_manager.py
36 9 1
def compare_template_and_params()
in source/manifest/sm_execution_manager.py
67 9 3
def get_accounts_in_ou()
in source/manifest/manifest_parser.py
31 9 4
def list_stack_instances()
in source/state_machine_handler.py
114 9 1
def send()
in source/utils/crhelper.py
39 9 7
def monitor_state_machines_execution_status()
in source/manifest/sm_execution_manager.py
31 8 1
def parse_stack_set_manifest_v2()
in source/manifest/manifest_parser.py
42 8 1
def _save_ssm_parameters()
in source/state_machine_handler.py
16 8 4