aws / amazon-ecs-cni-plugins
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 357 units with 2,749 lines of code in units (49.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (92 lines of code)
    • 17 simple units (487 lines of code)
    • 338 very simple units (2,170 lines of code)
0% | 0% | 3% | 17% | 78%
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% | 17% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
plugins/eni0% | 0% | 8% | 26% | 64%
plugins/ipam0% | 0% | 7% | 21% | 71%
plugins/ecs-bridge0% | 0% | 0% | 31% | 68%
pkg/utils0% | 0% | 0% | 27% | 72%
pkg/netlinkwrapper0% | 0% | 0% | 0% | 100%
pkg/execwrapper0% | 0% | 0% | 0% | 100%
pkg/ioutilwrapper0% | 0% | 0% | 0% | 100%
pkg/cniipamwrapper0% | 0% | 0% | 0% | 100%
pkg/cninswrapper0% | 0% | 0% | 0% | 100%
pkg/oswrapper0% | 0% | 0% | 0% | 100%
pkg/cniipwrapper0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
pkg/logger0% | 0% | 0% | 0% | 100%
pkg/ec2metadata0% | 0% | 0% | 0% | 100%
pkg/capabilities0% | 0% | 0% | 0% | 100%
pkg/version0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in plugins/eni/engine/nsclosure.go
53 14 1
func LoadIPAMConfig()
in plugins/ipam/config/config.go
39 12 2
func NextIP()
in plugins/ipam/ipstore/ipstore.go
27 9 2
func()
in plugins/eni/engine/engine.go
19 8 1
func NewConf()
in plugins/eni/types/types.go
25 8 1
func()
in plugins/ecs-bridge/engine/configureveth.go
45 8 1
func()
in plugins/ecs-bridge/engine/engine.go
22 8 1
func()
in plugins/ecs-bridge/engine/engine.go
34 8 1
func add()
in plugins/ecs-bridge/commands/commands.go
47 8 2
func()
in plugins/ipam/ipstore/ipstore.go
21 7 1
func()
in plugins/ipam/ipstore/ipstore.go
24 7 1
func()
in plugins/eni/engine/engine.go
31 7 1
func()
in plugins/eni/engine/engine.go
39 7 1
func add()
in plugins/eni/commands/commands.go
50 7 2
func()
in plugins/ecs-bridge/engine/engine.go
23 7 1
func ZeroOrNil()
in pkg/utils/utils.go
21 6 1
func RetryWithBackoffCtx()
in pkg/utils/utils.go
17 6 3
func()
in plugins/ipam/ipstore/ipstore.go
21 6 1
func del()
in plugins/ipam/commands/commands.go
21 6 2
func ComputeIPV4GatewayNetmask()
in pkg/utils/gateway.go
21 5 1