bazelbuild / rules_k8s
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 351 lines of code in units (18.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (185 lines of code)
    • 11 small units (158 lines of code)
    • 2 very small units (8 lines of code)
0% | 0% | 52% | 45% | 2%
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% | 56% | 42% | <1%
py0% | 0% | 0% | 79% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
k8s/go/pkg/resolver0% | 0% | 58% | 40% | <1%
k8s0% | 0% | 0% | 79% | 20%
k8s/go/cmd/resolver0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 19 longest units
Unit# linesMcCabe index# params
func()
in k8s/go/pkg/resolver/resolver.go
45 11 1
func()
in k8s/go/pkg/resolver/resolver.go
37 11 1
func parseImageSpec()
in k8s/go/pkg/resolver/resolver.go
29 10 1
func()
in k8s/go/pkg/resolver/resolver.go
29 8 1
func resolveString()
in k8s/go/pkg/resolver/resolver.go
24 6 2
func()
in k8s/go/pkg/resolver/resolver.go
21 6 1
def main()
in k8s/stamper.py
19 7 0
func resolveTemplate()
in k8s/go/pkg/resolver/resolver.go
19 4 4
func()
in k8s/go/pkg/resolver/resolver.go
18 6 1
func parseSubstitutions()
in k8s/go/pkg/resolver/resolver.go
16 4 2
func()
in k8s/go/pkg/resolver/resolver.go
15 4 1
func()
in k8s/go/pkg/resolver/resolver.go
13 5 1
func()
in k8s/go/pkg/resolver/resolver.go
13 3 1
func()
in k8s/go/pkg/resolver/resolver.go
12 4 1
func main()
in k8s/go/cmd/resolver/resolver.go
11 2 0
func RegisterFlags()
in k8s/go/pkg/resolver/resolver.go
11 1 1
func()
in k8s/go/pkg/resolver/resolver.go
11 3 1
def main()
in k8s/reverser.py
5 2 0
func NewResolver()
in k8s/go/pkg/resolver/resolver.go
3 1 1