aws-quickstart / quickstart-ct-trend-micro-cloud-one-conformity
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 30 units with 526 lines of code in units (54.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (77 lines of code)
    • 3 simple units (119 lines of code)
    • 26 very simple units (330 lines of code)
0% | 0% | 14% | 22% | 62%
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% | 14% | 22% | 62%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
functions/source0% | 0% | 14% | 22% | 62%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in functions/source/c1c_controltower_lifecycle.py
77 17 2
def delete_cross_account_role()
in functions/source/c1c_controltower_lifecycle.py
45 10 1
def get_api_key()
in functions/source/c1cresources.py
26 8 0
def update_policy()
in functions/source/c1c_controltower_lifecycle.py
48 6 1
def create_cross_account_role()
in functions/source/c1c_controltower_lifecycle.py
43 5 2
def configure_account()
in functions/source/c1c_controltower_lifecycle.py
26 5 1
def get_account_id()
in functions/source/c1cconnectorapi.py
15 4 2
def create_account()
in functions/source/ctlifecycleevent.py
15 4 1
def assume_role()
in functions/source/c1c_controltower_lifecycle.py
33 3 2
def get_accounts()
in functions/source/c1c_controltower_lifecycle.py
9 3 0
def request()
in functions/source/c1cconnectorapi.py
12 2 4
def get_external_id()
in functions/source/c1cconnectorapi.py
5 2 1
def remove_account()
in functions/source/c1cconnectorapi.py
8 2 2
def __init__()
in functions/source/cfnhelper.py
15 2 5
def send()
in functions/source/cfnhelper.py
16 2 3
def fresh_deploy()
in functions/source/c1c_controltower_lifecycle.py
16 2 1
def remove_all()
in functions/source/c1c_controltower_lifecycle.py
16 2 1
def update_accounts()
in functions/source/c1c_controltower_lifecycle.py
16 2 1
def remove_account_config()
in functions/source/c1c_controltower_lifecycle.py
13 2 1
def __init__()
in functions/source/c1cconnectorapi.py
11 1 2