microsoft / SDN
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 67 units with 766 lines of code in units (2.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (136 lines of code)
    • 2 simple units (73 lines of code)
    • 63 very simple units (557 lines of code)
0% | 0% | 17% | 9% | 72%
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% | 19% | 10% | 70%
c0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Kubernetes/wincni0% | 0% | 19% | 10% | 70%
NDKCI/RdmaSample0% | 0% | 0% | 0% | 100%
Kubernetes/linux0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in Kubernetes/wincni/cni/network/network.go
94 16 1
func ParseArgs()
in Kubernetes/wincni/common/args.go
42 12 2
func()
in Kubernetes/wincni/cni/cni.go
35 8 1
func()
in Kubernetes/wincni/cni/network/network.go
38 7 1
func main()
in Kubernetes/wincni/cni/network/plugin/main.go
27 5 0
def is_cidr()
in Kubernetes/linux/manifest/generate.py
4 4 1
func CallPlugin()
in Kubernetes/wincni/cni/cni.go
21 4 4
func()
in Kubernetes/wincni/cni/cni.go
30 4 1
VOID DriverUnload()
in NDKCI/RdmaSample/RdmaSample.c
21 4 1
def is_ip()
in Kubernetes/linux/manifest/generate.py
2 3 1
func NewPlugin()
in Kubernetes/wincni/cni/network/network.go
15 3 1
func()
in Kubernetes/wincni/cni/network/network.go
16 3 1
func GetArg()
in Kubernetes/wincni/common/args.go
8 3 1
func printHelpForArg()
in Kubernetes/wincni/common/args.go
13 3 1
func LogNetworkInterfaces()
in Kubernetes/wincni/common/utils.go
11 3 0
func GetHNSEndpointPolicies()
in Kubernetes/wincni/network/endpoint.go
9 3 1
func()
in Kubernetes/wincni/network/manager.go
15 3 1
func GetHNSNetworkPolicies()
in Kubernetes/wincni/network/network.go
9 3 1
def is_int()
in Kubernetes/linux/manifest/generate.py
6 2 1
def replacerino()
in Kubernetes/linux/manifest/generate.py
5 2 2