kubernetes / cri-api
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 4,265 units with 70,800 lines of code in units (92.1% of code).
    • 60 very complex units (19,992 lines of code)
    • 74 complex units (10,132 lines of code)
    • 154 medium complex units (11,525 lines of code)
    • 113 simple units (4,075 lines of code)
    • 3,864 very simple units (25,076 lines of code)
28% | 14% | 16% | 5% | 35%
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
go28% | 14% | 16% | 5% | 35%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg/apis/runtime/v1alpha228% | 14% | 16% | 5% | 35%
pkg/apis/runtime/v128% | 14% | 16% | 5% | 35%
pkg/apis/testing0% | 0% | 10% | 11% | 77%
pkg/errors0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in pkg/apis/runtime/v1alpha2/api.pb.go
737 211 1
func()
in pkg/apis/runtime/v1/api.pb.go
737 211 1
func()
in pkg/apis/runtime/v1alpha2/api.pb.go
664 190 1
func()
in pkg/apis/runtime/v1/api.pb.go
664 190 1
func()
in pkg/apis/runtime/v1alpha2/api.pb.go
597 176 1
func()
in pkg/apis/runtime/v1/api.pb.go
597 176 1
func()
in pkg/apis/runtime/v1alpha2/api.pb.go
545 155 1
func()
in pkg/apis/runtime/v1/api.pb.go
545 155 1
func()
in pkg/apis/runtime/v1alpha2/api.pb.go
513 146 1
func()
in pkg/apis/runtime/v1/api.pb.go
513 146 1
func()
in pkg/apis/runtime/v1alpha2/api.pb.go
509 144 1
func()
in pkg/apis/runtime/v1/api.pb.go
509 144 1
func()
in pkg/apis/runtime/v1alpha2/api.pb.go
441 124 1
func()
in pkg/apis/runtime/v1/api.pb.go
441 124 1
func()
in pkg/apis/runtime/v1alpha2/api.pb.go
413 123 1
func()
in pkg/apis/runtime/v1/api.pb.go
413 123 1
func()
in pkg/apis/runtime/v1alpha2/api.pb.go
388 112 1
func()
in pkg/apis/runtime/v1/api.pb.go
388 112 1
func()
in pkg/apis/runtime/v1alpha2/api.pb.go
371 103 1
func()
in pkg/apis/runtime/v1alpha2/api.pb.go
371 103 1