aws-samples / aws-control-tower-org-setup-sample
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 43 units with 425 lines of code in units (49.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (30 lines of code)
    • 42 very simple units (395 lines of code)
0% | 0% | 0% | 7% | 92%
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% | 0% | 7% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/org_setup/resources0% | 0% | 0% | 7% | 92%
src/org_setup0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def enable_all_policy_types()
in src/org_setup/resources/organizations.py
30 7 1
def create_detector()
in src/org_setup/resources/guardduty.py
29 5 1
def list_accounts()
in src/org_setup/resources/organizations.py
13 5 1
def get_ai_optout_policy()
in src/org_setup/resources/organizations.py
26 5 1
def attach_ai_optout_policy()
in src/org_setup/resources/organizations.py
24 5 1
def handler()
in src/org_setup/lambda_handler.py
19 4 3
def associate_admin_account()
in src/org_setup/resources/fms.py
17 4 2
def create_members()
in src/org_setup/resources/macie.py
13 4 3
def enable_aws_service_access()
in src/org_setup/resources/organizations.py
14 4 1
def register_delegated_administrators()
in src/org_setup/resources/organizations.py
21 4 2
def create_org_analyzer()
in src/org_setup/resources/accessanalyzer.py
13 3 1
def enable_organization_admin_account()
in src/org_setup/resources/securityhub.py
15 3 2
def create_finding_aggregator()
in src/org_setup/resources/securityhub.py
13 3 1
def enable_macie()
in src/org_setup/resources/macie.py
11 3 1
def enable_organization_admin_account()
in src/org_setup/resources/macie.py
15 3 2
def enable_aws_organizations_access()
in src/org_setup/resources/servicecatalog.py
15 3 1
def enable_organization_admin_account()
in src/org_setup/resources/guardduty.py
15 3 2
def enable_sharing_with_aws_organization()
in src/org_setup/resources/ram.py
11 3 1
def describe_organization()
in src/org_setup/resources/organizations.py
9 3 1
def list_roots()
in src/org_setup/resources/organizations.py
10 3 1