kubernetes / cloud-provider-vsphere
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 829 units with 10,481 lines of code in units (66.6% of code).
    • 0 very complex units (0 lines of code)
    • 7 complex units (930 lines of code)
    • 21 medium complex units (1,120 lines of code)
    • 78 simple units (2,108 lines of code)
    • 723 very simple units (6,323 lines of code)
0% | 8% | 10% | 20% | 60%
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% | 8% | 10% | 20% | 60%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg/common0% | 19% | 14% | 24% | 41%
pkg/cloudprovider0% | 2% | 8% | 16% | 73%
cmd/vsphere-cloud-controller-manager0% | 76% | 0% | 12% | 10%
pkg/nsxt0% | 0% | 39% | 15% | 45%
pkg/cli0% | 0% | 0% | 74% | 25%
pkg/util0% | 0% | 0% | 0% | 100%
cmd/vcpctl0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in pkg/common/config/config.go
173 45 1
func main()
in cmd/vsphere-cloud-controller-manager/main.go
131 29 0
func()
in pkg/common/config/config_ini_legacy.go
99 29 1
func()
in pkg/cloudprovider/vsphere/nodemanager.go
135 29 1
func()
in pkg/common/config/config_yaml.go
89 27 1
func()
in pkg/common/connectionmanager/zones.go
142 26 1
func()
in pkg/common/connectionmanager/search.go
161 26 1
func()
in pkg/cloudprovider/vsphere/loadbalancer/cleanup.go
76 23 1
func()
in pkg/common/connectionmanager/search.go
127 20 1
func discoverIPs()
in pkg/cloudprovider/vsphere/nodemanager.go
50 19 8
func()
in pkg/common/vclib/virtualmachine.go
84 17 1
func()
in pkg/common/connectionmanager/zones.go
70 17 1
func()
in pkg/cloudprovider/vsphere/loadbalancer/state.go
63 16 1
func()
in pkg/cloudprovider/vsphere/loadbalancer/config/config_ini_legacy.go
41 15 1
func()
in pkg/cloudprovider/vsphere/loadbalancer/config/config_yaml.go
41 15 1
func()
in pkg/nsxt/config/config_ini_legacy.go
33 14 1
func()
in pkg/nsxt/config/config_yaml.go
33 14 1
func NewConnectorManager()
in pkg/nsxt/connector_manager.go
50 12 1
func()
in pkg/common/connectionmanager/list.go
52 12 1
func()
in pkg/nsxt/config/config.go
35 11 1