kubernetes / k8s.io
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 112 units with 1,494 lines of code in units (1.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 7 medium complex units (372 lines of code)
    • 9 simple units (273 lines of code)
    • 96 very simple units (849 lines of code)
0% | 0% | 24% | 18% | 56%
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% | 32% | 22% | 44%
py0% | 0% | 8% | 9% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
groups0% | 0% | 35% | 20% | 43%
dns0% | 0% | 35% | 23% | 40%
artifactserver0% | 0% | 0% | 42% | 57%
apps0% | 0% | 0% | 5% | 94%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in groups/service.go
67 18 1
func()
in groups/service.go
55 16 1
func()
in groups/service.go
60 13 1
def verify_dns()
in dns/check-zone.py
41 12 1
func main()
in groups/reconcile.go
62 12 0
func()
in groups/reconcile.go
47 12 1
func()
in groups/service.go
40 11 1
func()
in groups/reconcile.go
52 10 1
func()
in groups/service.go
40 10 1
func()
in artifactserver/cmd/artifactserver/main.go
34 9 1
func()
in groups/service.go
31 8 1
def do_get()
in apps/k8s-io/test.py
21 7 1
func()
in groups/reconcile.go
26 7 1
def main()
in dns/check-zone.py
27 6 0
func()
in groups/reconcile.go
24 6 1
func mergeGroups()
in groups/reconcile.go
18 6 3
def record_response_values()
in dns/check-zone.py
15 5 2
func()
in groups/reconcile.go
27 5 1
def handle_starttag()
in apps/k8s-io/test.py
10 4 3
func()
in groups/reconcile.go
9 4 1