aws-solutions / serverless-transit-network-orchestrator
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 261 units with 3,771 lines of code in units (78.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (230 lines of code)
    • 23 simple units (600 lines of code)
    • 230 very simple units (2,941 lines of code)
0% | 0% | 6% | 15% | 77%
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% | 7% | 18% | 74%
js0% | 0% | 0% | 5% | 94%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source0% | 0% | 13% | 26% | 60%
source/lib0% | 0% | 0% | 4% | 95%
source/scripts/build_scripts0% | 0% | 0% | 62% | 37%
source/ui/src0% | 0% | 0% | 25% | 75%
source/ui/src/Components0% | 0% | 0% | 0% | 100%
source/aws/services0% | 0% | 0% | 0% | 100%
deployment/manifest-generator0% | 0% | 0% | 0% | 100%
source/ui/src/graphql0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _set_approval_flag()
in source/state_machine_handler.py
39 19 2
def _extract_route_table_ids()
in source/state_machine_handler.py
27 15 4
def _find_existing_tgw_rt_association()
in source/state_machine_handler.py
26 13 3
def _set_status()
in source/state_machine_handler.py
12 12 1
def _find_existing_default_route()
in source/state_machine_handler.py
45 12 3
def get_transit_gateway_vpc_attachment_state()
in source/state_machine_handler.py
20 11 1
def tgw_attachment_crud_operations()
in source/state_machine_handler.py
27 11 1
def describe_resources()
in source/state_machine_handler.py
34 11 1
def cfn_handler()
in source/lib/crhelper.py
25 10 7
def transit_gateway()
in source/state_machine_router.py
27 10 2
def _describe_vpc()
in source/state_machine_handler.py
33 10 1
def send()
in source/lib/crhelper.py
35 9 7
def tgw_peering_attachment_id_finder()
in source/tgw_peering_attachment_handler.py
35 9 3
def get_attachment_id()
in source/tgw_peering_attachment_handler.py
23 9 2
def lambda_handler()
in source/lambda_custom_resource.py
25 9 2
def describe_transit_gateway_vpc_attachments()
in source/state_machine_handler.py
30 9 1
def notify()
in source/state_machine_handler.py
34 9 1
def accept_resource_share_invitation()
in source/state_machine_handler.py
27 9 1
def lambda_handler()
in source/state_machine_router.py
29 8 2
def _get_association_state()
in source/state_machine_handler.py
29 8 4