kubernetes / kube-aggregator
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 689 units with 8,260 lines of code in units (78.6% of code).
    • 4 very complex units (902 lines of code)
    • 7 complex units (979 lines of code)
    • 12 medium complex units (832 lines of code)
    • 19 simple units (676 lines of code)
    • 647 very simple units (4,871 lines of code)
10% | 11% | 10% | 8% | 58%
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
go10% | 11% | 10% | 8% | 58%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg/apis20% | 17% | 11% | 0% | 51%
pkg/controllers0% | 12% | 13% | 20% | 52%
pkg/apiserver0% | 0% | 20% | 37% | 42%
pkg/client0% | 0% | 0% | 3% | 96%
pkg/cmd0% | 0% | 0% | 45% | 54%
pkg/registry0% | 0% | 0% | 19% | 80%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in pkg/apis/apiregistration/v1beta1/generated.pb.go
241 70 1
func()
in pkg/apis/apiregistration/v1/generated.pb.go
241 70 1
func()
in pkg/apis/apiregistration/v1beta1/generated.pb.go
210 59 1
func()
in pkg/apis/apiregistration/v1/generated.pb.go
210 59 1
func()
in pkg/apis/apiregistration/v1beta1/generated.pb.go
148 43 1
func()
in pkg/apis/apiregistration/v1/generated.pb.go
148 43 1
func()
in pkg/apis/apiregistration/v1beta1/generated.pb.go
133 37 1
func()
in pkg/apis/apiregistration/v1/generated.pb.go
133 37 1
func()
in pkg/controllers/status/available_controller.go
185 35 1
func()
in pkg/apis/apiregistration/v1beta1/generated.pb.go
116 33 1
func()
in pkg/apis/apiregistration/v1/generated.pb.go
116 33 1
func skipGenerated()
in pkg/apis/apiregistration/v1beta1/generated.pb.go
78 24 1
func skipGenerated()
in pkg/apis/apiregistration/v1/generated.pb.go
78 24 1
func()
in pkg/controllers/autoregister/autoregister_controller.go
48 23 1
func()
in pkg/apis/apiregistration/v1beta1/generated.pb.go
83 23 1
func()
in pkg/apis/apiregistration/v1/generated.pb.go
83 23 1
func()
in pkg/apiserver/apiserver.go
131 21 1
func ValidateAPIService()
in pkg/apis/apiregistration/validation/validation.go
53 18 1
func()
in pkg/controllers/openapi/aggregator/downloader.go
40 13 1
func()
in pkg/controllers/openapiv3/aggregator/downloader.go
61 13 1