aws / amazon-eks-connector
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 78 units with 936 lines of code in units (55.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 10 medium size units (278 lines of code)
    • 24 small units (361 lines of code)
    • 44 very small units (297 lines of code)
0% | 0% | 29% | 38% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 0% | 29% | 38% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cmd0% | 0% | 79% | 0% | 20%
pkg/initializer0% | 0% | 71% | 15% | 12%
pkg/agent0% | 0% | 43% | 19% | 36%
pkg/k8s0% | 0% | 23% | 60% | 15%
pkg/fsnotify0% | 0% | 40% | 49% | 9%
pkg/proxy0% | 0% | 35% | 16% | 48%
pkg/state0% | 0% | 11% | 43% | 45%
pkg/server0% | 0% | 35% | 20% | 44%
pkg/ssm0% | 0% | 0% | 70% | 30%
pkg/serviceaccount0% | 0% | 0% | 60% | 39%
pkg/config0% | 0% | 0% | 62% | 37%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in pkg/agent/registration.go
40 5 1
func()
in pkg/k8s/secret.go
30 3 1
func init()
in cmd/init.go
30 2 0
func()
in pkg/initializer/initializer.go
28 6 1
func init()
in cmd/server.go
28 2 0
func()
in pkg/initializer/initializer.go
27 6 1
func()
in pkg/fsnotify/fsnotify.go
25 5 1
func()
in pkg/proxy/proxy.go
24 2 1
func Deserialize()
in pkg/state/state.go
23 4 1
func()
in pkg/server/server.go
23 4 1
func()
in pkg/state/state.go
20 5 1
func()
in pkg/ssm/ssm.go
20 2 1
func()
in pkg/state/mock_persistence.go
18 4 1
func()
in pkg/config/mock_provider.go
18 4 1
func()
in pkg/agent/mock_registration.go
18 4 1
func()
in pkg/serviceaccount/mock_secret_provider.go
18 4 1
func()
in pkg/k8s/mock_secret.go
18 4 1
func NewSecretInCluster()
in pkg/k8s/secret.go
17 4 1
func()
in pkg/fsnotify/fsnotify.go
17 3 1
func()
in pkg/state/persistence_fs.go
16 4 1