bazelbuild / rules_k8s
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 19 units with 351 lines of code in units (18.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (82 lines of code)
    • 6 simple units (140 lines of code)
    • 11 very simple units (129 lines of code)
0% | 0% | 23% | 39% | 36%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
go0% | 0% | 25% | 37% | 37%
py0% | 0% | 0% | 79% | 20%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
k8s/go/pkg/resolver0% | 0% | 25% | 38% | 35%
k8s0% | 0% | 0% | 79% | 20%
k8s/go/cmd/resolver0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 19 most complex units
Unit# linesMcCabe index# params
func()
in k8s/go/pkg/resolver/resolver.go
37 11 1
func()
in k8s/go/pkg/resolver/resolver.go
45 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
def main()
in k8s/stamper.py
19 7 0
func resolveString()
in k8s/go/pkg/resolver/resolver.go
24 6 2
func()
in k8s/go/pkg/resolver/resolver.go
21 6 1
func()
in k8s/go/pkg/resolver/resolver.go
18 6 1
func()
in k8s/go/pkg/resolver/resolver.go
13 5 1
func parseSubstitutions()
in k8s/go/pkg/resolver/resolver.go
16 4 2
func()
in k8s/go/pkg/resolver/resolver.go
12 4 1
func()
in k8s/go/pkg/resolver/resolver.go
15 4 1
func resolveTemplate()
in k8s/go/pkg/resolver/resolver.go
19 4 4
func()
in k8s/go/pkg/resolver/resolver.go
13 3 1
func()
in k8s/go/pkg/resolver/resolver.go
11 3 1
def main()
in k8s/reverser.py
5 2 0
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 NewResolver()
in k8s/go/pkg/resolver/resolver.go
3 1 1