kubernetes / autoscaler
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 10,960 units with 110,519 lines of code in units (72.0% of code).
    • 2 very complex units (529 lines of code)
    • 16 complex units (1,921 lines of code)
    • 304 medium complex units (23,677 lines of code)
    • 472 simple units (13,031 lines of code)
    • 10,166 very simple units (71,361 lines of code)
<1% | 1% | 21% | 11% | 64%
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
go<1% | 1% | 21% | 11% | 64%
py0% | 0% | 26% | 16% | 56%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cluster-autoscaler/core18% | 14% | 11% | 22% | 32%
cluster-autoscaler/cloudprovider0% | 1% | 23% | 10% | 64%
cluster-autoscaler/utils0% | 9% | 9% | 21% | 59%
cluster-autoscaler/processors0% | 12% | 13% | 21% | 51%
vertical-pod-autoscaler/pkg0% | 0% | 6% | 15% | 78%
cluster-autoscaler/expander0% | 0% | 38% | 17% | 43%
cluster-autoscaler/simulator0% | 0% | 9% | 32% | 58%
cluster-autoscaler/clusterstate0% | 0% | 5% | 28% | 65%
cluster-autoscaler/config0% | 0% | 54% | 16% | 29%
hack/boilerplate0% | 0% | 43% | 24% | 31%
cluster-autoscaler0% | 0% | 8% | 34% | 56%
cluster-autoscaler/estimator0% | 0% | 0% | 68% | 31%
addon-resizer0% | 0% | 0% | 59% | 40%
addon-resizer/nanny0% | 0% | 0% | 26% | 73%
cluster-autoscaler/debuggingsnapshot0% | 0% | 0% | 22% | 77%
hack/scripts0% | 0% | 0% | 13% | 86%
cluster-autoscaler/metrics0% | 0% | 0% | 0% | 100%
cluster-autoscaler/context0% | 0% | 0% | 0% | 100%
vertical-pod-autoscaler/common0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in cluster-autoscaler/core/static_autoscaler.go
275 64 1
func ScaleUp()
in cluster-autoscaler/core/scale_up.go
254 53 8
func()
in cluster-autoscaler/cloudprovider/magnum/gophercloud/provider_client.go
162 47 1
func GetPodsForDeletionOnNodeDrain()
in cluster-autoscaler/utils/drain/drain.go
125 43 8
func deepDiffEqual()
in cluster-autoscaler/cloudprovider/magnum/gophercloud/testhelper/convenience.go
126 41 5
func BuildRequestBody()
in cluster-autoscaler/cloudprovider/magnum/gophercloud/params.go
119 41 2
func BuildAzureConfig()
in cluster-autoscaler/cloudprovider/azure/azure_config.go
134 35 1
func()
in cluster-autoscaler/cloudprovider/magnum/gophercloud/auth_options.go
160 33 1
func registerBetterFuzzyDecoder()
in cluster-autoscaler/cloudprovider/alicloud/alibaba-cloud-sdk-go/sdk/responses/json_parser.go
126 31 0
func()
in cluster-autoscaler/core/scale_down.go
190 30 1
func()
in cluster-autoscaler/processors/nodeinfosprovider/mixed_nodeinfos_processor.go
93 28 1
func()
in cluster-autoscaler/core/scale_down.go
139 28 1
func()
in cluster-autoscaler/cloudprovider/magnum/magnum_manager_impl.go
97 28 1
func BindQueryParameter()
in cluster-autoscaler/cloudprovider/exoscale/internal/github.com/exoscale/egoscale/internal/runtime/bindparam.go
108 27 6
func BindQueryParameter()
in cluster-autoscaler/cloudprovider/exoscale/internal/github.com/deepmap/oapi-codegen/pkg/runtime/bindparam.go
108 27 6
func drainNode()
in cluster-autoscaler/core/scale_down.go
77 26 9
func prepareValues()
in cluster-autoscaler/cloudprovider/exoscale/internal/github.com/exoscale/egoscale/serialization.go
80 26 2
func AuthOptionsFromEnv()
in cluster-autoscaler/cloudprovider/magnum/gophercloud/openstack/auth_env.go
77 26 0
func()
in cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_request.go
114 25 1
func loadBalancerCreateOptsToSchema()
in cluster-autoscaler/cloudprovider/hetzner/hcloud-go/hcloud/schema.go
100 23 1