aws-samples / automation-eks-upgrades
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 14 units with 239 lines of code in units (25.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (164 lines of code)
    • 3 small units (40 lines of code)
    • 6 very small units (35 lines of code)
0% | 0% | 68% | 16% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 68% | 16% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
images/dataplane/status/app0% | 0% | 91% | 0% | 8%
images/controlplane/upgrade/app0% | 0% | 62% | 24% | 12%
images/controlplane/status/app0% | 0% | 75% | 0% | 24%
images/dataplane/nodegroup/app0% | 0% | 56% | 29% | 13%
images/dataplane/daemonset/app0% | 0% | 58% | 26% | 15%
Alternative Visuals
Longest Units
Top 14 longest units
Unit# linesMcCabe index# params
def handler()
in images/dataplane/status/app/nodegroup_status.py
43 12 2
def update_cluster()
in images/controlplane/upgrade/app/cluster_upgrade.py
34 5 1
def handler()
in images/controlplane/status/app/cluster_status_check.py
31 11 2
def update_cluster()
in images/dataplane/nodegroup/app/nodegroup_ver_update.py
29 3 1
def update_cluster()
in images/dataplane/daemonset/app/daemonset.py
27 5 1
def handler()
in images/dataplane/nodegroup/app/nodegroup_ver_update.py
15 5 2
def handler()
in images/controlplane/upgrade/app/cluster_upgrade.py
13 5 2
def handler()
in images/dataplane/daemonset/app/daemonset.py
12 5 2
def get_stdout()
in images/controlplane/upgrade/app/cluster_upgrade.py
7 2 1
def get_stdout()
in images/dataplane/nodegroup/app/nodegroup_ver_update.py
7 2 1
def get_stdout()
in images/dataplane/daemonset/app/daemonset.py
7 2 1
def send_update()
in images/controlplane/status/app/cluster_status_check.py
6 2 1
def get_update_version()
in images/controlplane/status/app/cluster_status_check.py
4 3 1
def get_update()
in images/dataplane/status/app/nodegroup_status.py
4 3 2