aws-samples / amazon-eks-one-click-cluster-upgrade
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 81 units with 2,469 lines of code in units (86.7% of code).
    • 5 very long units (641 lines of code)
    • 5 long units (331 lines of code)
    • 32 medium size units (1,045 lines of code)
    • 22 small units (331 lines of code)
    • 17 very small units (121 lines of code)
25% | 13% | 42% | 13% | 4%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py25% | 13% | 42% | 13% | 4%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
eksupdate/src22% | 11% | 45% | 14% | 5%
eksupdate57% | 29% | 10% | 0% | 1%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest 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 nodegroup_customami()
in eksupdate/src/preflight_module.py
106 19 7
def update_addons()
in eksupdate/src/k8s_client.py
101 25 4
def addon_version()
in eksupdate/src/preflight_module.py
94 13 8
def actual_update()
in eksupdate/starter.py
65 13 6
def cluster_roles()
in eksupdate/src/preflight_module.py
63 12 7
def get_cluster_version()
in eksupdate/src/preflight_module.py
55 9 11
def update_unmanaged_nodegroup()
in eksupdate/src/eksctlfinal.py
54 10 4
def depricated_api_check()
in eksupdate/src/preflight_module.py
47 11 7
def Update_nodeGroup()
in eksupdate/src/self_managed.py
46 12 4
def cmk_key_check()
in eksupdate/src/preflight_module.py
45 5 7
def add_on_upgrade()
in eksupdate/src/eksctlfinal.py
43 6 4
def pre_flight_checks()
in eksupdate/src/preflight_module.py
41 7 7
def cluster_auto_scaler()
in eksupdate/src/preflight_module.py
41 6 6
def subnet_details()
in eksupdate/src/preflight_module.py
40 6 6
def outdated_lt()
in eksupdate/src/boto_aws.py
39 8 2
def pod_disruption_budget()
in eksupdate/src/preflight_module.py
38 6 7
def get_old_lt()
in eksupdate/src/boto_aws.py
37 8 2