aws / amazon-vpc-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 186 units with 4,450 lines of code in units (80.2% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (488 lines of code)
    • 15 medium complex units (1,135 lines of code)
    • 32 simple units (1,308 lines of code)
    • 135 very simple units (1,519 lines of code)
0% | 10% | 25% | 29% | 34%
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% | 10% | 25% | 29% | 34%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
plugins/vpc-shared-eni0% | 23% | 30% | 24% | 21%
plugins/vpc-tunnel0% | 23% | 20% | 51% | 5%
plugins/vpc-branch-eni0% | 22% | 57% | 9% | 10%
plugins/vpc-branch-pat-eni0% | 0% | 39% | 29% | 31%
plugins/vpc-eni0% | 0% | 25% | 41% | 33%
plugins/aws-appmesh0% | 0% | 22% | 36% | 40%
network/netns0% | 0% | 0% | 50% | 50%
tools/netnsexec0% | 0% | 0% | 100% | 0%
cni0% | 0% | 0% | 55% | 44%
network/eni0% | 0% | 0% | 12% | 87%
network/ebtables0% | 0% | 0% | 28% | 71%
network/iptables0% | 0% | 0% | 22% | 78%
network/imds0% | 0% | 0% | 0% | 100%
network/vpc0% | 0% | 0% | 0% | 100%
logger0% | 0% | 0% | 0% | 100%
network/ipcfg0% | 0% | 0% | 0% | 100%
capabilities0% | 0% | 0% | 0% | 100%
version0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in plugins/vpc-shared-eni/network/bridge_linux.go
202 30 1
func New()
in plugins/vpc-tunnel/config/netconfig.go
103 29 1
func New()
in plugins/vpc-branch-eni/config/netconfig.go
99 29 1
func New()
in plugins/vpc-shared-eni/config/netconfig.go
84 26 2
func()
in plugins/vpc-branch-eni/plugin/commands.go
105 23 1
func New()
in plugins/vpc-branch-pat-eni/config/netconfig.go
58 18 2
func()
in plugins/vpc-shared-eni/network/bridge_linux.go
102 18 1
func()
in plugins/vpc-shared-eni/network/bridge_windows.go
104 18 1
func()
in plugins/vpc-eni/network/network_windows.go
67 15 1
func()
in plugins/vpc-tunnel/plugin/commands.go
90 14 1
func New()
in plugins/vpc-eni/config/netconfig.go
46 14 1
func()
in plugins/vpc-branch-eni/plugin/commands.go
89 14 1
func validateConfig()
in plugins/aws-appmesh/config/netconfig.go
31 14 1
func()
in plugins/vpc-shared-eni/network/bridge_linux.go
76 13 1
func()
in plugins/vpc-branch-eni/plugin/commands.go
62 12 1
func()
in plugins/aws-appmesh/plugin/commands.go
50 12 1
func()
in plugins/vpc-branch-pat-eni/plugin/commands.go
87 11 1
func()
in plugins/vpc-branch-pat-eni/plugin/commands.go
84 11 1
func()
in plugins/vpc-shared-eni/plugin/commands.go
84 11 1
func parseKubernetesArgs()
in plugins/vpc-shared-eni/config/kubernetes.go
28 10 3