aws-samples / eks-install-guide-for-multus
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 19 units with 476 lines of code in units (23.3% of code).
    • 1 very long units (120 lines of code)
    • 0 long units (0 lines of code)
    • 7 medium size units (236 lines of code)
    • 6 small units (89 lines of code)
    • 5 very small units (31 lines of code)
25% | 0% | 49% | 18% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts100% | 0% | 0% | 0% | 0%
go0% | 0% | 70% | 24% | 4%
py0% | 0% | 60% | 25% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cdk/nodegroup/lib100% | 0% | 0% | 0% | 0%
controller/cmd0% | 0% | 70% | 24% | 4%
cdk/nodegroup/lambda0% | 0% | 60% | 25% | 14%
Alternative Visuals
Longest Units
Top 19 longest units
Unit# linesMcCabe index# params
constructor()
in cdk/nodegroup/lib/eks-nodegroup-multus.ts
120 1 3
func()
in controller/cmd/webhook.go
48 10 1
func()
in controller/cmd/webhook.go
37 4 1
func main()
in controller/cmd/main.go
36 4 0
def attach_interface()
in cdk/nodegroup/lambda/attach-multus-eni.py
34 4 3
def lambda_handler()
in cdk/nodegroup/lambda/attach-multus-eni.py
30 8 2
func mutationRequired()
in controller/cmd/webhook.go
26 6 2
def send()
in cdk/nodegroup/lambda/auto-reboot.py
25 4 7
func addContainer()
in controller/cmd/webhook.go
20 3 3
func addVolume()
in controller/cmd/webhook.go
20 3 3
def handler()
in cdk/nodegroup/lambda/auto-reboot.py
13 4 2
def complete_lifecycle_action_success()
in cdk/nodegroup/lambda/attach-multus-eni.py
12 2 3
def complete_lifecycle_action_failure()
in cdk/nodegroup/lambda/attach-multus-eni.py
12 2 3
func loadConfig()
in controller/cmd/webhook.go
12 3 1
def create_interface()
in cdk/nodegroup/lambda/attach-multus-eni.py
10 3 2
def delete_interface()
in cdk/nodegroup/lambda/attach-multus-eni.py
9 2 1
func createPatch()
in controller/cmd/webhook.go
6 1 2
func init()
in controller/cmd/webhook.go
4 1 0
def log()
in cdk/nodegroup/lambda/attach-multus-eni.py
2 1 1