aws / amazon-vpc-resource-controller-k8s
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 553 units with 5,749 lines of code in units (64.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 13 medium complex units (968 lines of code)
    • 32 simple units (928 lines of code)
    • 508 very simple units (3,853 lines of code)
0% | 0% | 16% | 16% | 67%
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% | 16% | 16% | 67%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 97% | 0% | 2%
pkg/provider0% | 0% | 20% | 26% | 53%
pkg/aws0% | 0% | 15% | 17% | 66%
controllers/custom0% | 0% | 35% | 7% | 57%
scripts0% | 0% | 100% | 0% | 0%
controllers/core0% | 0% | 34% | 42% | 22%
pkg/handler0% | 0% | 42% | 23% | 33%
pkg/pool0% | 0% | 21% | 46% | 32%
pkg/utils0% | 0% | 31% | 0% | 68%
pkg/node0% | 0% | 0% | 44% | 55%
webhooks/core0% | 0% | 0% | 25% | 75%
pkg/resource0% | 0% | 0% | 41% | 58%
pkg/condition0% | 0% | 0% | 30% | 69%
mocks/amazon-vcp-resource-controller-k8s0% | 0% | 0% | 0% | 100%
pkg/k8s0% | 0% | 0% | 0% | 100%
pkg/worker0% | 0% | 0% | 0% | 100%
apis/vpcresources0% | 0% | 0% | 0% | 100%
pkg/config0% | 0% | 0% | 0% | 100%
controllers/apps0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func main()
in main.go
244 18 0
func()
in pkg/provider/ip/eni/eni.go
68 17 1
func()
in pkg/provider/branch/trunk/trunk.go
82 17 1
func()
in controllers/custom/builder.go
79 17 1
func()
in controllers/core/pod_controller.go
61 15 1
func()
in pkg/aws/ec2/api/helper.go
56 14 1
func()
in pkg/utils/helper.go
45 14 1
func()
in pkg/aws/ec2/api/helper.go
45 13 1
func()
in pkg/aws/ec2/instance.go
39 12 1
func()
in pkg/provider/branch/provider.go
73 12 1
func()
in pkg/pool/pool.go
46 12 1
func main()
in scripts/gen_vpc_limits.go
74 12 0
func()
in pkg/handler/warm.go
56 11 1
func()
in pkg/provider/ip/eni/eni.go
48 10 1
func()
in pkg/provider/branch/trunk/trunk.go
57 10 1
func()
in pkg/pool/pool.go
51 10 1
func()
in pkg/node/manager/manager.go
47 9 1
func()
in pkg/aws/ec2/api/helper.go
36 8 1
func()
in pkg/aws/ec2/api/helper.go
15 8 1
func()
in webhooks/core/annotation_validation_webhook.go
27 8 1