aws / aws-k8s-tester
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 2,188 units with 69,299 lines of code in units (79.4% of code).
    • 131 very long units (23,945 lines of code)
    • 213 long units (15,045 lines of code)
    • 662 medium size units (21,053 lines of code)
    • 334 small units (4,901 lines of code)
    • 848 very small units (4,355 lines of code)
34% | 21% | 30% | 7% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go34% | 21% | 30% | 7% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
eks43% | 22% | 28% | 3% | 1%
eksconfig50% | 14% | 12% | 7% | 15%
k8s-tester16% | 22% | 40% | 10% | 9%
pkg26% | 17% | 33% | 12% | 9%
ec240% | 24% | 26% | 7% | <1%
cmd26% | 27% | 23% | 9% | 12%
utils35% | 4% | 29% | 20% | 10%
ec2config37% | 27% | 19% | 9% | 5%
ssh28% | 59% | 0% | 7% | 5%
client0% | 12% | 53% | 18% | 15%
version0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in pkg/k8s-client/eks-deprecate.go
665 152 1
func()
in eks/stresser/remote/stresser.go
558 89 1
func()
in eksconfig/env.go
555 137 1
func()
in eks/secrets/remote/secrets.go
554 87 1
func()
in eks/eks.go
532 103 1
func New()
in eks/eks.go
406 53 1
func()
in eks/eks.go
381 2 1
func()
in k8s-tester/config.go
358 83 1
func()
in eks/ng/logs.go
350 49 1
func()
in eks/mng/logs.go
350 49 1
func()
in eks/mng/security-groups.go
341 43 1
func()
in eks/mng/security-groups.go
341 43 1
func()
in eks/cni-vpc/cni-vpc.go
338 5 1
func()
in eks/ng/security-groups.go
333 41 1
func()
in eks/ng/security-groups.go
333 42 1
func()
in ec2/logs.go
294 44 1
func()
in eks/configmaps/remote/configmaps.go
280 44 1
func()
in eks/csrs/remote/csrs.go
280 44 1
func()
in eks/cluster-loader/cluster-loader.go
273 51 1
func()
in eks/cluster/security-groups.go
261 37 1