kubernetes / kube-scheduler
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 130 units with 1,379 lines of code in units (77.6% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (52 lines of code)
    • 6 medium size units (178 lines of code)
    • 31 small units (473 lines of code)
    • 92 very small units (676 lines of code)
0% | 3% | 12% | 34% | 49%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 3% | 12% | 34% | 49%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
config/v1beta20% | 9% | 3% | 37% | 48%
extender/v10% | 0% | 34% | 17% | 47%
config/v1beta30% | 0% | 11% | 38% | 49%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in config/v1beta2/zz_generated.deepcopy.go
52 11 1
func()
in config/v1beta3/zz_generated.deepcopy.go
42 9 1
func()
in extender/v1/zz_generated.deepcopy.go
39 8 1
func()
in extender/v1/zz_generated.deepcopy.go
32 8 1
func()
in extender/v1/zz_generated.deepcopy.go
23 5 1
func()
in config/v1beta2/zz_generated.deepcopy.go
21 5 1
func()
in config/v1beta3/zz_generated.deepcopy.go
21 5 1
func()
in config/v1beta2/zz_generated.deepcopy.go
20 4 1
func()
in config/v1beta3/zz_generated.deepcopy.go
20 4 1
func()
in extender/v1/zz_generated.deepcopy.go
19 4 1
func()
in config/v1beta2/zz_generated.deepcopy.go
19 4 1
func()
in config/v1beta3/zz_generated.deepcopy.go
19 4 1
func()
in config/v1beta2/zz_generated.deepcopy.go
18 5 1
func()
in config/v1beta3/zz_generated.deepcopy.go
18 5 1
func()
in config/v1beta2/types.go
16 4 1
func()
in config/v1beta2/zz_generated.deepcopy.go
16 1 1
func()
in config/v1beta3/types.go
16 4 1
func()
in config/v1beta3/zz_generated.deepcopy.go
16 1 1
func()
in extender/v1/zz_generated.deepcopy.go
15 4 1
func()
in extender/v1/zz_generated.deepcopy.go
15 4 1