kubernetes / cloud-provider
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 275 units with 3,656 lines of code in units (79.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 14 medium complex units (928 lines of code)
    • 21 simple units (593 lines of code)
    • 240 very simple units (2,135 lines of code)
0% | 0% | 25% | 16% | 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
go0% | 0% | 25% | 16% | 58%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
controllers0% | 0% | 35% | 14% | 49%
app0% | 0% | 38% | 28% | 32%
volume0% | 0% | 20% | 13% | 66%
options0% | 0% | 22% | 0% | 77%
node0% | 0% | 21% | 39% | 39%
config0% | 0% | 0% | 11% | 89%
ROOT0% | 0% | 0% | 26% | 73%
fake0% | 0% | 0% | 8% | 91%
service0% | 0% | 0% | 0% | 100%
sample0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func StartTestServer()
in app/testing/testserver.go
122 25 2
func SelectZonesForVolume()
in volume/helpers/zones.go
59 22 9
func()
in controllers/route/route_controller.go
124 20 1
func()
in controllers/service/controller.go
57 17 1
func New()
in controllers/service/controller.go
81 15 6
func()
in controllers/node/node_controller.go
69 14 1
func Run()
in app/controllermanager.go
90 14 4
func()
in controllers/nodelifecycle/node_lifecycle_controller.go
50 13 1
func()
in controllers/service/controller.go
50 13 1
func()
in options/options.go
57 13 1
func()
in controllers/node/node_controller.go
32 12 1
func()
in controllers/node/node_controller.go
38 12 1
func()
in controllers/node/node_controller.go
52 12 1
func RemoveTaintOffNode()
in node/helpers/taints.go
47 12 4
func()
in controllers/route/route_controller.go
41 10 1
func()
in controllers/node/node_controller.go
36 10 1
func startControllers()
in app/controllermanager.go
41 10 7
33 9 4
func NewCloudControllerManagerCommand()
in app/controllermanager.go
60 9 5
func addOrUpdateLabelsOnNode()
in node/helpers/labels.go
39 9 3