aws / karpenter
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 385 units with 4,720 lines of code in units (57.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (143 lines of code)
    • 44 simple units (1,173 lines of code)
    • 338 very simple units (3,404 lines of code)
0% | 0% | 3% | 24% | 72%
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% | 3% | 24% | 72%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg/controllers0% | 0% | 4% | 32% | 63%
pkg/cloudprovider0% | 0% | 3% | 19% | 77%
pkg/apis0% | 0% | 0% | 35% | 64%
pkg/utils0% | 0% | 0% | 7% | 92%
cmd/controller0% | 0% | 0% | 0% | 100%
cmd/webhook0% | 0% | 0% | 0% | 100%
website/assets0% | 0% | 0% | 0% | 100%
pkg/metrics0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in pkg/cloudprovider/aws/fake/ec2api.go
57 11 1
func PackablesFor()
in pkg/controllers/provisioning/binpacking/packable.go
39 11 5
func()
in pkg/controllers/node/controller.go
47 11 1
func()
in pkg/controllers/provisioning/binpacking/packer.go
51 10 1
func()
in pkg/controllers/node/emptiness.go
38 10 1
func()
in pkg/cloudprovider/aws/apis/v1alpha1/zz_generated.deepcopy.go
35 9 1
func()
in pkg/controllers/selection/volumetopology.go
30 9 1
func()
in pkg/controllers/termination/controller.go
28 9 1
func()
in pkg/controllers/persistentvolumeclaim/controller.go
31 9 1
func()
in pkg/cloudprovider/aws/launchtemplate.go
38 8 1
func()
in pkg/cloudprovider/aws/instancetypes.go
30 8 1
func()
in pkg/cloudprovider/aws/instance.go
36 8 1
func()
in pkg/cloudprovider/aws/instance.go
29 8 1
func()
in pkg/controllers/provisioning/binpacking/packer.go
22 8 1
func()
in pkg/controllers/provisioning/provisioner.go
38 8 1
func()
in pkg/controllers/selection/controller.go
27 8 1
func validateAffinity()
in pkg/controllers/selection/controller.go
22 8 1
func()
in pkg/apis/provisioning/v1alpha5/requirements.go
18 8 1
func()
in pkg/apis/provisioning/v1alpha5/zz_generated.deepcopy.go
30 8 1
func IntersectStringSlice()
in pkg/utils/functional/functional.go
26 8 1