aws-samples / aws-control-tower-reference-architectures
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 63 units with 937 lines of code in units (60.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (53 lines of code)
    • 16 simple units (343 lines of code)
    • 46 very simple units (541 lines of code)
0% | 0% | 5% | 36% | 57%
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% | 36% | 57%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
AccountFactory/EnrollAccount0% | 0% | 7% | 36% | 55%
AccountFactory/BatchUpdate0% | 0% | 0% | 36% | 63%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def run_prechecks()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
53 13 1
def get_acct_name()
in customizations/AccountFactory/BatchUpdate/update_pp.py
20 9 1
def start_enrolling_accounts()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
38 8 1
def get_provisioned_product_status()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
19 7 1
def get_ou_details()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
19 7 2
def get_account_mapping()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
19 7 2
def get_product_id()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
20 6 0
def search_provisioned_products()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
15 6 0
def does_stack_set_exists()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
15 6 1
def create_crossaccount_role()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
40 6 3
def list_all_ou()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
24 6 0
def list_all_accounts()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
19 6 0
def get_parent_for_account()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
19 6 1
def get_product_id()
in customizations/AccountFactory/BatchUpdate/update_pp.py
20 6 0
def list_all_ou()
in customizations/AccountFactory/BatchUpdate/update_pp.py
22 6 0
def search_provisioned_products()
in customizations/AccountFactory/BatchUpdate/update_pp.py
15 6 0
def list_all_accounts()
in customizations/AccountFactory/BatchUpdate/update_pp.py
19 6 0
def get_sts_session()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
25 5 2
def get_account_info()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
11 5 3
def process_verify_result()
in customizations/AccountFactory/EnrollAccount/enroll_account.py
10 5 1