aws / eks-anywhere-build-tooling
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 49 units with 892 lines of code in units (4.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (223 lines of code)
    • 8 simple units (269 lines of code)
    • 38 very simple units (400 lines of code)
0% | 0% | 25% | 30% | 44%
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% | 25% | 30% | 44%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
projects/aws0% | 0% | 25% | 30% | 44%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func controlPlaneInit()
in projects/aws/bottlerocket-bootstrap/pkg/kubeadm/controlplane_init.go
95 19 0
func controlPlaneJoin()
in projects/aws/bottlerocket-bootstrap/pkg/kubeadm/controlplane_join.go
73 18 0
func WaitForSystemdService()
in projects/aws/bottlerocket-bootstrap/pkg/utils/waiters.go
55 15 2
func KillCmdAfterFilesGeneration()
in projects/aws/bottlerocket-bootstrap/pkg/utils/waiters.go
43 10 2
func workerJoin()
in projects/aws/bottlerocket-bootstrap/pkg/kubeadm/worker_join.go
46 9 0
func WriteUserDataFiles()
in projects/aws/bottlerocket-bootstrap/pkg/utils/userdata.go
34 8 1
func Bootstrap()
in projects/aws/bottlerocket-bootstrap/pkg/bootstrap.go
34 7 0
func EnableStaticPods()
in projects/aws/bottlerocket-bootstrap/pkg/utils/pods.go
36 7 1
func()
in projects/aws/bottlerocket-bootstrap/pkg/kubeadm/kubeadm.go
20 7 1
func WaitFor200()
in projects/aws/bottlerocket-bootstrap/pkg/utils/waiters.go
35 6 2
func parseCmd()
in projects/aws/bottlerocket-bootstrap/pkg/etcdadm/etcdadm.go
21 6 1
func waitForPodLiveness()
in projects/aws/bottlerocket-bootstrap/pkg/utils/waiters.go
20 5 1
func()
in projects/aws/bottlerocket-bootstrap/pkg/etcdadm/join.go
21 5 1
func()
in projects/aws/bottlerocket-bootstrap/pkg/etcdadm/init.go
21 5 1
func getKubeConfigRaw()
in projects/aws/bottlerocket-bootstrap/pkg/utils/parsers.go
15 4 1
func GetApiServerFromKubeConfig()
in projects/aws/bottlerocket-bootstrap/pkg/utils/parsers.go
16 4 1
func()
in projects/aws/bottlerocket-bootstrap/pkg/etcdadm/etcdadm.go
11 4 1
func setHostName()
in projects/aws/bottlerocket-bootstrap/pkg/kubeadm/utils.go
20 4 1
func()
in projects/aws/bottlerocket-bootstrap/pkg/kubeadm/kubeadm.go
16 4 1
func acquireLock()
in projects/aws/bottlerocket-bootstrap/pkg/bootstrap.go
13 3 0