microsoft / windows-container-networking
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 70 units with 1,280 lines of code in units (75.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 7 medium complex units (442 lines of code)
    • 5 simple units (195 lines of code)
    • 58 very simple units (643 lines of code)
0% | 0% | 34% | 15% | 50%
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% | 34% | 15% | 50%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
common/core0% | 0% | 73% | 8% | 17%
network0% | 0% | 14% | 24% | 61%
cni0% | 0% | 20% | 14% | 65%
common0% | 0% | 37% | 0% | 62%
plugins/nat0% | 0% | 0% | 0% | 100%
plugins/sdnbridge0% | 0% | 0% | 0% | 100%
plugins/sdnoverlay0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in common/core/network.go
108 21 1
73 16 2
func()
in cni/cni.go
63 15 1
func allocateIpam()
in common/core/network.go
65 13 5
func ParseArgs()
in common/args.go
42 12 2
func addEndpointGatewaysFromConfig()
in common/core/network.go
38 12 2
func()
in common/core/network.go
53 11 1
func()
in network/manager.go
35 10 1
func()
in cni/cni.go
44 7 1
func GetPortEnumValue()
in network/policy.go
28 7 1
func Core()
in common/core/core.go
32 6 0
func()
in network/endpoint.go
56 6 1
func CallPlugin()
in cni/cni.go
27 4 4
func getInACLRule()
in cni/cni.go
30 4 2
13 4 1
func()
in network/network.go
35 4 1
func()
in network/network.go
22 4 1
13 4 1
12 4 1
49 3 4