awslabs / aws-virtual-gpu-device-plugin
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 28 units with 408 lines of code in units (68.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (111 lines of code)
    • 3 simple units (94 lines of code)
    • 23 very simple units (203 lines of code)
0% | 0% | 27% | 23% | 49%
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% | 27% | 23% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg/gpu/nvidia0% | 0% | 28% | 23% | 48%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func watchXIDs()
in pkg/gpu/nvidia/nvidia.go
49 18 3
func()
in pkg/gpu/nvidia/vgpumanager.go
62 14 1
func()
in pkg/gpu/nvidia/server.go
39 8 1
func()
in pkg/gpu/nvidia/server.go
34 8 1
func()
in pkg/gpu/nvidia/server.go
21 6 1
func()
in pkg/gpu/nvidia/server.go
13 4 1
func newFSWatcher()
in pkg/gpu/nvidia/watchers.go
14 4 1
func()
in pkg/gpu/nvidia/server.go
20 3 1
func()
in pkg/gpu/nvidia/server.go
6 3 1
func()
in pkg/gpu/nvidia/server.go
16 3 1
func getDeviceById()
in pkg/gpu/nvidia/server.go
8 3 2
func getVGPUDevices()
in pkg/gpu/nvidia/nvidia.go
19 3 1
func deviceExists()
in pkg/gpu/nvidia/nvidia.go
8 3 2
func physicialDeviceExists()
in pkg/gpu/nvidia/nvidia.go
8 3 2
func main()
in main.go
12 3 0
func dial()
in pkg/gpu/nvidia/server.go
12 2 2
func()
in pkg/gpu/nvidia/server.go
9 2 1
func check()
in pkg/gpu/nvidia/nvidia.go
5 2 1
func getPhysicalGPUDevices()
in pkg/gpu/nvidia/nvidia.go
11 2 0
func NewNvidiaDevicePlugin()
in pkg/gpu/nvidia/server.go
11 1 1