awslabs / federated-amazon-eks-clusters-on-aws
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 26 units with 417 lines of code in units (79.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (59 lines of code)
    • 1 simple units (19 lines of code)
    • 23 very simple units (339 lines of code)
0% | 0% | 14% | 4% | 81%
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% | 15% | 5% | 79%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
eksfedctl0% | 0% | 15% | 5% | 79%
cdk-vpc-peering/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_config()
in source/eksfedctl/create_action.py
35 11 1
def validate_user_yaml()
in source/eksfedctl/create_action.py
24 11 1
def validate_config()
in source/eksfedctl/create_action.py
19 8 1
constructor()
in source/cdk-vpc-peering/src/vpc-peering-construct.ts
40 5 3
def load_yaml()
in source/eksfedctl/create_action.py
19 5 1
def main()
in source/eksfedctl/eksfedctl.py
37 4 0
def create_vpc_peering()
in source/eksfedctl/create_script.py
31 4 8
def exec_command()
in source/eksfedctl/execution.py
13 3 2
def create_federated_clusters()
in source/eksfedctl/create_script.py
51 3 1
def try_remove_files()
in source/eksfedctl/create_script.py
8 3 1
def create_identity_mapping()
in source/eksfedctl/create_script.py
11 3 3
def clusters_join_federation()
in source/eksfedctl/create_script.py
14 3 2
def confirm_destroy()
in source/eksfedctl/destroy_action.py
8 3 0
def process()
in source/eksfedctl/create_action.py
8 2 1
def check_tmux_session()
in source/eksfedctl/create_action.py
5 2 0
def error()
in source/eksfedctl/eksfedctl.py
6 2 2
def write_output_config()
in source/eksfedctl/create_script.py
8 2 2
def get_availability_zones()
in source/eksfedctl/create_script.py
5 2 1
def process()
in source/eksfedctl/destroy_action.py
10 2 1
def log()
in source/eksfedctl/logs.py
3 1 1