kubernetes / minikube
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 1,934 units with 31,423 lines of code in units (59.7% of code).
    • 0 very complex units (0 lines of code)
    • 8 complex units (935 lines of code)
    • 106 medium complex units (6,092 lines of code)
    • 316 simple units (9,458 lines of code)
    • 1,504 very simple units (14,938 lines of code)
0% | 2% | 19% | 30% | 47%
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% | 3% | 18% | 30% | 47%
js0% | 0% | 44% | 8% | 47%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cmd/minikube0% | 9% | 26% | 25% | 39%
pkg/minikube0% | 1% | 17% | 30% | 50%
hack/benchmark0% | 21% | 20% | 23% | 34%
pkg/drivers0% | 3% | 16% | 34% | 45%
pkg/addons0% | 0% | 57% | 20% | 22%
hack/jenkins0% | 0% | 38% | 11% | 49%
hack/update0% | 0% | 20% | 35% | 43%
hack/preload-images0% | 0% | 42% | 4% | 52%
pkg/generate0% | 0% | 23% | 45% | 30%
pkg/provision0% | 0% | 0% | 47% | 52%
pkg/kapi0% | 0% | 0% | 71% | 28%
pkg/network0% | 0% | 0% | 72% | 27%
hack/boilerplate0% | 0% | 0% | 100% | 0%
pkg/util0% | 0% | 0% | 40% | 59%
pkg/gvisor0% | 0% | 0% | 53% | 46%
cmd/auto-pause0% | 0% | 0% | 18% | 81%
pkg/perf0% | 0% | 0% | 40% | 60%
hack/kicbase_version0% | 0% | 0% | 57% | 42%
hack/metrics0% | 0% | 0% | 34% | 65%
cmd/performance0% | 0% | 0% | 44% | 55%
pkg/trace0% | 0% | 0% | 0% | 100%
pkg/storage0% | 0% | 0% | 0% | 100%
deploy/minikube0% | 0% | 0% | 0% | 100%
cmd/drivers0% | 0% | 0% | 0% | 100%
hack/help_text0% | 0% | 0% | 0% | 100%
cmd/extract0% | 0% | 0% | 0% | 100%
pkg/version0% | 0% | 0% | 0% | 100%
cmd/storage-provisioner0% | 0% | 0% | 0% | 100%
cmd/gvisor0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func GenerateZshCompletion()
in cmd/minikube/cmd/completion.go
168 30 2
func()
in pkg/minikube/bootstrapper/kubeadm/kubeadm.go
127 30 1
func CreateContainerNode()
in pkg/drivers/kic/oci/oci.go
113 30 1
func validateFlags()
in cmd/minikube/cmd/start.go
88 29 2
func runStart()
in cmd/minikube/cmd/start.go
114 28 2
func execute()
in hack/benchmark/cpu_usage/auto_pause/chart.go
137 28 0
func selectDriver()
in cmd/minikube/cmd/start.go
90 27 1
func Start()
in pkg/minikube/node/start.go
98 26 2
func()
in pkg/minikube/bootstrapper/kubeadm/kubeadm.go
79 25 1
func HostIP()
in pkg/minikube/cluster/ip.go
91 25 2
func createPullSecret()
in pkg/addons/addons_gcpauth.go
92 25 2
func clusterState()
in cmd/minikube/cmd/status.go
110 23 1
func ListImages()
in pkg/minikube/machine/cache_images.go
89 22 2
func BuildImage()
in pkg/minikube/machine/build_images.go
72 22 9
func()
in pkg/minikube/bootstrapper/kubeadm/kubeadm.go
102 21 1
func addonSpecificChecks()
in pkg/addons/addons.go
45 21 4
func ErrorCodes()
in pkg/generate/errorcodes.go
82 20 2
func updateExistingConfigFromFlags()
in cmd/minikube/cmd/start_flags.go
94 19 2
func nodeStatus()
in cmd/minikube/cmd/status.go
96 19 3
func Execute()
in cmd/minikube/cmd/root.go
67 19 0