aws-cloudformation / aws-cloudformation-macros
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 31 units with 536 lines of code in units (40.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (78 lines of code)
    • 7 simple units (178 lines of code)
    • 22 very simple units (280 lines of code)
0% | 0% | 14% | 33% | 52%
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% | 14% | 33% | 52%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
S3Objects0% | 0% | 32% | 36% | 30%
ExecutionRoleBuilder0% | 0% | 68% | 0% | 31%
ShortHand0% | 0% | 0% | 67% | 32%
Explode0% | 0% | 0% | 81% | 18%
Boto30% | 0% | 0% | 28% | 71%
StackMetrics0% | 0% | 0% | 0% | 100%
Count0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def expand_role()
in ExecutionRoleBuilder/lambda/index.py
39 14 1
def handle_template()
in S3Objects/lambda/macro.py
39 11 2
def handler()
in S3Objects/lambda/resource.py
44 9 2
def walk_resource()
in Explode/lambda/explode.py
28 9 2
def convert()
in ShortHand/lambda/convert.py
14 7 1
def convert_template()
in ShortHand/lambda/convert.py
28 7 1
def parse_name()
in ShortHand/lambda/convert.py
16 6 1
def handle_transform()
in Explode/lambda/explode.py
26 6 1
def execute()
in Boto3/lambda/resource.py
22 6 2
def process_template()
in Count/src/index.py
17 5 1
def handler()
in Boto3/lambda/resource.py
12 5 2
def unroll_props()
in ShortHand/lambda/convert.py
11 4 1
def handle_template()
in Boto3/lambda/macro.py
16 4 2
def convert_template()
in ExecutionRoleBuilder/lambda/index.py
11 3 1
def handler()
in StackMetrics/lambda/resource.py
14 3 2
def send()
in StackMetrics/lambda/cfnresponse.py
25 3 6
def resource()
in ShortHand/lambda/resolve.py
5 3 1
def update_placeholder()
in Count/src/index.py
11 3 2
def handler()
in S3Objects/lambda/macro.py
14 2 2
def log()
in StackMetrics/lambda/resource.py
29 2 3