aws-quickstart / quickstart-swift-digital-connectivity
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 45 units with 844 lines of code in units (83.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (78 lines of code)
    • 2 simple units (103 lines of code)
    • 42 very simple units (663 lines of code)
0% | 0% | 9% | 12% | 78%
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% | 9% | 12% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
swift_main_stack0% | 0% | 100% | 0% | 0%
base_host_group0% | 0% | 0% | 74% | 25%
security0% | 0% | 0% | 12% | 87%
network0% | 0% | 0% | 0% | 100%
swift_iam_role0% | 0% | 0% | 0% | 100%
swift_mq0% | 0% | 0% | 0% | 100%
swift_database0% | 0% | 0% | 0% | 100%
swift_sagsnl0% | 0% | 0% | 0% | 100%
swift_amh0% | 0% | 0% | 0% | 100%
cmk0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def __init__()
in swift_main_stack/main.py
78 14 4
def __init__()
in base_host_group/host_group.py
67 7 12
def add_security_group_rule()
in security/generic_security.py
36 6 9
def generate()
in network/generic_network.py
22 4 1
def create_security_group()
in security/generic_security.py
13 3 4
def create_nacl()
in security/generic_security.py
8 3 5
def create_swift_instance_operator_role()
in swift_iam_role/swift_iam_role.py
35 3 2
def create_swift_infrastructure_role()
in swift_iam_role/swift_iam_role.py
37 3 4
def __init__()
in network/swift_vpc_endpoints.py
93 3 10
def _get_subnets()
in network/generic_network.py
9 2 3
def get_private_subnets()
in network/generic_network.py
4 2 2
def get_isolated_subnets()
in network/generic_network.py
4 2 2
def get_public_subnets()
in network/generic_network.py
4 2 2
def create_interface_endpoint()
in network/swift_vpc_endpoints.py
12 2 5
def create_gateway_endpoint()
in network/swift_vpc_endpoints.py
7 2 4
def __init__()
in swift_database/swift_database.py
21 2 7
def __init__()
in swift_amh/swift_amh.py
18 1 10
def __init__()
in security/generic_security.py
7 1 5
def get_instance_roles()
in security/generic_security.py
2 1 1
def get_instance_role()
in security/generic_security.py
2 1 2