awslabs / aws-account-migration-automation
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 68 units with 1,455 lines of code in units (47.3% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (275 lines of code)
    • 2 medium complex units (159 lines of code)
    • 13 simple units (372 lines of code)
    • 51 very simple units (649 lines of code)
0% | 18% | 10% | 25% | 44%
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% | 18% | 10% | 25% | 44%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 15% | 12% | 25% | 46%
resources/helper_scripts0% | 95% | 0% | 0% | 4%
src/utils0% | 0% | 0% | 46% | 53%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in src/tobedeleted.py
191 44 2
def restore_test_env()
in resources/helper_scripts/restore_test_accounts.py
84 27 2
def get_org_level_resources()
in src/get_org_dependent_resources.py
57 16 5
def lambda_handler()
in src/reports.py
102 16 2
def lambda_handler()
in src/cleanup.py
69 10 2
def create_roles()
in src/util.py
43 10 1
def process_xls()
in src/utils/data.py
24 9 1
def lambda_handler()
in src/support_case.py
54 8 2
def lambda_handler()
in src/notifier.py
34 8 2
def convert_empty_values()
in src/utils/dynamodb.py
11 8 1
11 7 2
def lambda_handler()
in src/check_billing_access.py
36 7 2
def get_lambda_param()
in src/constant.py
13 6 3
def get_invitation()
in src/join_organization.py
6 6 2
def lambda_handler()
in src/get_org_dependent_resources.py
32 6 2
def get_account_data()
in src/utils/data.py
13 6 1
def log_error()
in src/me_logger.py
26 6 8
def lambda_handler()
in src/create_roles.py
38 5 2
def checkEmailPhoneExists()
in src/tobedeleted.py
19 5 1
def get_etag()
in src/update_tags.py
9 5 3