kubernetes / kubeadm
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 402 units with 6,137 lines of code in units (49.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 21 medium complex units (1,247 lines of code)
    • 41 simple units (1,219 lines of code)
    • 340 very simple units (3,671 lines of code)
0% | 0% | 20% | 19% | 59%
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% | 20% | 19% | 59%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
kinder/pkg/cluster0% | 0% | 26% | 24% | 49%
kinder/hack/orderimports0% | 0% | 51% | 13% | 35%
kinder/ci/tools0% | 0% | 42% | 17% | 39%
kinder/pkg/build0% | 0% | 20% | 32% | 47%
kinder/pkg/extract0% | 0% | 20% | 9% | 70%
kinder/pkg/cri0% | 0% | 5% | 17% | 77%
kinder/pkg/kubeadm0% | 0% | 11% | 7% | 81%
kinder/cmd/kinder0% | 0% | 0% | 6% | 93%
kinder/pkg/exec0% | 0% | 0% | 26% | 74%
kinder/hack0% | 0% | 0% | 40% | 60%
kinder/images/base0% | 0% | 0% | 0% | 100%
kinder/pkg/loadbalancer0% | 0% | 0% | 0% | 100%
kinder0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func getKubeadmConfig()
in kinder/pkg/cluster/manager/actions/kubeadm-config.go
92 24 4
func sortDecl()
in kinder/hack/orderimports/orderimports.go
99 23 3
func()
in kinder/pkg/build/alter/alter.go
87 20 1
func kubeadmInitWithPhases()
in kinder/pkg/cluster/manager/actions/kubeadm-init.go
89 18 5
func processFile()
in kinder/hack/orderimports/orderimports.go
65 18 4
func processWorkflows()
in kinder/ci/tools/update-workflows/pkg/workflows.go
83 17 4
func createNodes()
in kinder/pkg/cluster/manager/create.go
69 16 2
func()
in kinder/pkg/cluster/manager/manage.go
42 16 1
func SetupExternalCA()
in kinder/pkg/cluster/manager/actions/setup-external-ca.go
67 15 2
func extractFromLocalDir()
in kinder/pkg/extract/extract.go
48 15 5
func processTestInfra()
in kinder/ci/tools/update-workflows/pkg/testinfra.go
74 13 4
func Build()
in kinder/pkg/kubeadm/patch.go
36 12 3
func createDiscoveryFile()
in kinder/pkg/cluster/manager/actions/kubeadm-config.go
50 12 3
func joinControlPlanes()
in kinder/pkg/cluster/manager/actions/kubeadm-join.go
39 12 9
func SmokeTest()
in kinder/pkg/cluster/manager/actions/smoke-test.go
61 12 2
func EditArchiveRepositories()
in kinder/pkg/cri/host/archive.go
37 12 3
func configureKubelet()
in kinder/pkg/build/bits/initBits.go
54 11 1
func()
in kinder/pkg/cluster/status/cluster.go
29 11 1
func LoadBalancer()
in kinder/pkg/cluster/manager/actions/loadbalancer.go
37 11 2
func CluterInfo()
in kinder/pkg/cluster/manager/actions/cluster-info.go
59 11 1