kubernetes / cloud-provider-aws
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 406 units with 6,848 lines of code in units (85.3% of code).
    • 1 very complex units (326 lines of code)
    • 3 complex units (558 lines of code)
    • 30 medium complex units (1,731 lines of code)
    • 53 simple units (1,603 lines of code)
    • 319 very simple units (2,630 lines of code)
4% | 8% | 25% | 23% | 38%
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
go4% | 8% | 25% | 23% | 38%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg/providers/v15% | 9% | 26% | 23% | 35%
cmd/ecr-credential-provider0% | 0% | 34% | 22% | 42%
pkg/providers/v20% | 0% | 12% | 29% | 57%
cmd/aws-cloud-controller-manager0% | 0% | 0% | 66% | 33%
pkg/providers/v2/mocks0% | 0% | 0% | 0% | 100%
pkg/apis/config/v1alpha10% | 0% | 0% | 0% | 100%
hack0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in pkg/providers/v1/aws.go
326 70 1
func()
in pkg/providers/v1/aws_loadbalancer.go
215 50 1
func()
in pkg/providers/v1/aws_loadbalancer.go
206 40 1
func()
in pkg/providers/v1/aws.go
137 29 1
func newAWSCloud()
in pkg/providers/v1/aws.go
94 24 2
func()
in pkg/providers/v1/aws.go
83 24 1
func()
in pkg/providers/v1/aws_fakes.go
57 23 1
func()
in pkg/providers/v1/aws.go
94 22 1
func()
in pkg/providers/v1/aws_loadbalancer.go
75 20 1
func()
in pkg/providers/v1/aws.go
74 18 1
func()
in pkg/providers/v1/aws_loadbalancer.go
90 17 1
func()
in pkg/providers/v1/aws.go
65 16 1
func()
in pkg/providers/v1/aws.go
68 16 1
func()
in pkg/providers/v1/aws_loadbalancer.go
81 16 1
func()
in pkg/providers/v1/aws.go
74 15 1
func()
in pkg/providers/v1/aws.go
51 15 1
func()
in pkg/providers/v1/aws_loadbalancer.go
45 15 1
func()
in pkg/providers/v1/aws.go
44 14 1
func()
in pkg/providers/v1/aws.go
51 14 1
func()
in pkg/providers/v1/aws.go
49 14 1