aws-samples / aws-control-tower-automate-account-creation
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 36 units with 563 lines of code in units (66.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (30 lines of code)
    • 4 simple units (111 lines of code)
    • 31 very simple units (422 lines of code)
0% | 0% | 5% | 19% | 74%
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% | 5% | 19% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
functions/source0% | 0% | 5% | 19% | 74%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def validateinput()
in functions/source/new_account_handler.py
30 11 1
def lambda_handler()
in functions/source/account_create.py
46 10 2
def account_handler()
in functions/source/new_account_handler.py
22 6 2
def get_portfolio_id()
in functions/source/account_create.py
21 6 1
def get_product_id()
in functions/source/account_create.py
22 6 0
def get_items()
in functions/source/account_create.py
12 5 2
def list_of_ous()
in functions/source/new_account_handler.py
16 4 0
def list_of_accounts()
in functions/source/new_account_handler.py
15 4 0
def read_file()
in functions/source/new_account_handler.py
17 4 3
def list_principals_in_portfolio()
in functions/source/account_create.py
14 4 1
def dyno_scan()
in functions/source/new_account_handler.py
11 3 1
def get_items()
in functions/source/new_account_handler.py
8 3 1
def list_org_roots()
in functions/source/new_account_handler.py
13 3 0
def list_children()
in functions/source/new_account_handler.py
14 3 2
def get_child_ous()
in functions/source/new_account_handler.py
10 3 1
def validate_update_dyno()
in functions/source/new_account_handler.py
23 3 2
def dyno_scan()
in functions/source/account_create.py
11 3 1
def get_provisioning_artifact_id()
in functions/source/account_create.py
16 3 1
def generate_provisioned_product_name()
in functions/source/account_create.py
7 3 1
def generate_account_name()
in functions/source/account_create.py
7 3 1