awslabs / aws-sdlc-controltower-extension
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 39 units with 871 lines of code in units (39.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (159 lines of code)
    • 9 simple units (280 lines of code)
    • 28 very simple units (432 lines of code)
0% | 0% | 18% | 32% | 49%
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% | 18% | 32% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambdas/custom_resources/CTE_CrossAccountCloudFormation/src0% | 0% | 27% | 34% | 38%
lambdas/stepfunctions/CTE_CreateAccountFn/src0% | 0% | 0% | 18% | 81%
lambdas/stepfunctions/CTE_InvokeCreateAccountFn/src0% | 0% | 0% | 49% | 50%
lambdas/stepfunctions/CTE_SignalCfnResponseFn/src0% | 0% | 0% | 57% | 42%
lambdas/stepfunctions/CTE_GetAccountStatusFn/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in lambdas/custom_resources/CTE_CrossAccountCloudFormation/src/main.py
124 23 2
def update_parameters()
in lambdas/custom_resources/CTE_CrossAccountCloudFormation/src/cfn_helper.py
35 19 2
def wait_all_stacks()
in lambdas/custom_resources/CTE_CrossAccountCloudFormation/src/cfn_helper.py
38 9 1
def send()
in lambdas/stepfunctions/CTE_InvokeCreateAccountFn/src/cfnresponse.py
28 7 7
def send()
in lambdas/stepfunctions/CTE_SignalCfnResponseFn/src/cfnresponse.py
28 7 7
def send()
in lambdas/stepfunctions/CTE_CreateAccountFn/src/cfnresponse.py
28 7 7
def create_update_stack()
in lambdas/custom_resources/CTE_CrossAccountCloudFormation/src/cfn_helper.py
55 7 8
def send()
in lambdas/custom_resources/CTE_CrossAccountCloudFormation/src/cfnresponse.py
28 7 7
def boto3_session()
in lambdas/custom_resources/CTE_CrossAccountCloudFormation/src/client_session_helper.py
21 6 3
def boto3_client()
in lambdas/custom_resources/CTE_CrossAccountCloudFormation/src/client_session_helper.py
22 6 5
def retry_v2()
in lambdas/custom_resources/CTE_CrossAccountCloudFormation/src/helper.py
32 6 4
def lambda_handler()
in lambdas/stepfunctions/CTE_SignalCfnResponseFn/src/main.py
21 5 2
def scan_provisioned_products()
in lambdas/stepfunctions/CTE_CreateAccountFn/src/helper.py
18 5 2
def disable_termination_protection()
in lambdas/custom_resources/CTE_CrossAccountCloudFormation/src/cfn_helper.py
19 5 2
def search_provisioned_products()
in lambdas/stepfunctions/CTE_CreateAccountFn/src/helper.py
19 4 2
def remove_unused_parameters()
in lambdas/custom_resources/CTE_CrossAccountCloudFormation/src/cfn_helper.py
18 4 2
def determine_stack_failure_event()
in lambdas/custom_resources/CTE_CrossAccountCloudFormation/src/cfn_helper.py
20 4 2
def describe_stack()
in lambdas/custom_resources/CTE_CrossAccountCloudFormation/src/cfn_helper.py
15 4 2
def list_stacks()
in lambdas/custom_resources/CTE_CrossAccountCloudFormation/src/cfn_helper.py
32 4 1
def lambda_handler()
in lambdas/stepfunctions/CTE_InvokeCreateAccountFn/src/main.py
29 3 2