awslabs / kubernetes-iteration-toolkit
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 350 units with 4,858 lines of code in units (34.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (200 lines of code)
    • 23 simple units (625 lines of code)
    • 324 very simple units (4,033 lines of code)
0% | 0% | 4% | 12% | 83%
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% | 4% | 13% | 81%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
substrate/pkg/controller0% | 0% | 21% | 31% | 46%
operator/pkg/awsprovider0% | 0% | 0% | 26% | 73%
operator/pkg/controllers0% | 0% | 0% | 4% | 95%
substrate/pkg/apis0% | 0% | 0% | 38% | 61%
operator/pkg/utils0% | 0% | 0% | 14% | 85%
operator/pkg/apis0% | 0% | 0% | 0% | 100%
operator/pkg/pki0% | 0% | 0% | 0% | 100%
testbed/addons/karpenter0% | 0% | 0% | 0% | 100%
testbed/addons/kit0% | 0% | 0% | 0% | 100%
testbed0% | 0% | 0% | 0% | 100%
substrate/cmd0% | 0% | 0% | 0% | 100%
testbed/addons/flux0% | 0% | 0% | 0% | 100%
operator/cmd/webhook0% | 0% | 0% | 0% | 100%
operator/cmd/controller0% | 0% | 0% | 0% | 100%
testbed/addons/awslb0% | 0% | 0% | 0% | 100%
operator/pkg/errors0% | 0% | 0% | 0% | 100%
operator/pkg/kubeprovider0% | 0% | 0% | 0% | 100%
substrate/pkg/utils0% | 0% | 0% | 0% | 100%
testbed/addons0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in substrate/pkg/controller/substrate/cluster/instance.go
61 18 1
func()
in substrate/pkg/controller/substrate/cluster/launchtemplate.go
99 13 1
func()
in substrate/pkg/controller/substrate/cluster/instanceprofile.go
40 12 1
func()
in substrate/pkg/controller/substrate/cluster/instanceprofile.go
38 10 1
func()
in substrate/pkg/controller/substrate/infrastructure/internetgateway.go
35 9 1
func()
in substrate/pkg/controller/substrate/infrastructure/subnets.go
28 9 1
func()
in operator/pkg/awsprovider/iam/reconciler.go
32 9 1
func()
in substrate/pkg/controller/substrate/cluster/config.go
27 8 1
func()
in substrate/pkg/controller/substrate/infrastructure/subnets.go
24 8 1
func()
in operator/pkg/controllers/controller.go
24 8 1
func()
in operator/pkg/awsprovider/iam/reconciler.go
28 8 1
func()
in substrate/pkg/apis/v1alpha1/zz_generated.deepcopy.go
34 7 1
func()
in substrate/pkg/controller/substrate/cluster/instance.go
22 7 1
func()
in substrate/pkg/controller/substrate/infrastructure/internetgateway.go
28 7 1
func()
in operator/pkg/controllers/addons/addons.go
27 7 1
func()
in operator/pkg/awsprovider/instances/reconciler.go
20 7 1
func()
in operator/pkg/utils/kubeconfigs/reconciler.go
22 7 1
func()
in operator/pkg/utils/keypairs/reconciler.go
24 7 1
func()
in substrate/pkg/apis/v1alpha1/zz_generated.deepcopy.go
24 6 1
func()
in substrate/pkg/controller/substrate/controller.go
30 6 1