kubernetes / cloud-provider-openstack
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 696 units with 13,423 lines of code in units (70.4% of code).
    • 1 very complex units (391 lines of code)
    • 7 complex units (1,069 lines of code)
    • 53 medium complex units (3,007 lines of code)
    • 121 simple units (3,555 lines of code)
    • 514 very simple units (5,401 lines of code)
2% | 7% | 22% | 26% | 40%
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
go2% | 7% | 22% | 26% | 40%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg/openstack11% | 20% | 25% | 18% | 23%
pkg/ingress0% | 15% | 28% | 34% | 22%
pkg/autohealing0% | 13% | 10% | 47% | 28%
pkg/csi0% | 0% | 19% | 31% | 48%
pkg/identity0% | 0% | 54% | 14% | 30%
pkg/client0% | 0% | 34% | 0% | 65%
pkg/util0% | 0% | 3% | 22% | 73%
cmd/client-keystone-auth0% | 0% | 29% | 62% | 7%
pkg/kms0% | 0% | 0% | 19% | 80%
cmd/manila-csi-plugin0% | 0% | 0% | 23% | 77%
cmd/cinder-csi-plugin0% | 0% | 0% | 0% | 100%
pkg/metrics0% | 0% | 0% | 0% | 100%
cmd/openstack-cloud-controller-manager0% | 0% | 0% | 0% | 100%
cmd/barbican-kms-plugin0% | 0% | 0% | 0% | 100%
cmd/k8s-keystone-auth0% | 0% | 0% | 0% | 100%
pkg/version0% | 0% | 0% | 0% | 100%
cmd/magnum-auto-healer0% | 0% | 0% | 0% | 100%
cmd/octavia-ingress-controller0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in pkg/openstack/loadbalancer.go
391 99 1
func()
in pkg/openstack/loadbalancer.go
155 50 1
func()
in pkg/openstack/loadbalancer.go
159 40 1
func()
in pkg/ingress/controller/controller.go
210 38 1
func()
in pkg/openstack/loadbalancer.go
182 36 1
func()
in pkg/openstack/loadbalancer.go
113 32 1
func()
in pkg/openstack/loadbalancer.go
121 32 1
func()
in pkg/autohealing/cloudprovider/openstack/provider.go
129 29 1
func match()
in pkg/identity/keystone/authorizer.go
70 25 2
func()
in pkg/identity/keystone/authorizer.go
69 25 1
func()
in pkg/openstack/loadbalancer.go
94 21 1
func getAllowed()
in pkg/identity/keystone/authorizer.go
41 21 2
func NewKeystoneAuth()
in pkg/identity/keystone/keystone.go
90 21 1
func()
in pkg/csi/cinder/controllerserver.go
77 21 1
func nodeAddresses()
in pkg/openstack/instances.go
93 20 3
func()
in pkg/openstack/loadbalancer.go
74 19 1
func()
in pkg/openstack/loadbalancer.go
83 19 1
func()
in pkg/csi/manila/controllerserver.go
76 19 1
func()
in pkg/openstack/loadbalancer.go
46 18 1
func()
in pkg/openstack/routes.go
66 18 1