aws-samples / amazon-eks-one-click-cluster-upgrade
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 81 units with 2,469 lines of code in units (86.7% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (434 lines of code)
    • 8 medium complex units (552 lines of code)
    • 20 simple units (682 lines of code)
    • 50 very simple units (801 lines of code)
0% | 17% | 22% | 27% | 32%
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% | 17% | 22% | 27% | 32%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
eksupdate/src0% | 13% | 21% | 30% | 34%
eksupdate0% | 57% | 29% | 0% | 12%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def send_email()
in eksupdate/src/preflight_module.py
167 48 8
def check_addons_params()
in eksupdate/src/preflight_module.py
142 28 11
def main()
in eksupdate/starter.py
125 27 1
def update_addons()
in eksupdate/src/k8s_client.py
101 25 4
def nodegroup_customami()
in eksupdate/src/preflight_module.py
106 19 7
def addon_version()
in eksupdate/src/preflight_module.py
94 13 8
def actual_update()
in eksupdate/starter.py
65 13 6
def Update_nodeGroup()
in eksupdate/src/self_managed.py
46 12 4
def cluster_roles()
in eksupdate/src/preflight_module.py
63 12 7
def find_node()
in eksupdate/src/k8s_client.py
30 11 4
def depricated_api_check()
in eksupdate/src/preflight_module.py
47 11 7
def get_ami_name()
in eksupdate/src/eks_get_image_type.py
33 10 4
def update_unmanaged_nodegroup()
in eksupdate/src/eksctlfinal.py
54 10 4
def drain_nodes()
in eksupdate/src/k8s_client.py
31 9 4
def get_latest_instance()
in eksupdate/src/boto_aws.py
29 9 3
def update_cluster()
in eksupdate/src/boto_aws.py
32 9 3
def get_cluster_version()
in eksupdate/src/preflight_module.py
55 9 11
def sort_pods()
in eksupdate/src/k8s_client.py
27 8 7
def image_type()
in eksupdate/src/eks_get_image_type.py
22 8 4
def get_old_lt()
in eksupdate/src/boto_aws.py
37 8 2