awslabs / aws-virtual-gpu-device-plugin
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 28 units with 408 lines of code in units (68.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (62 lines of code)
    • 4 medium size units (143 lines of code)
    • 9 small units (128 lines of code)
    • 14 very small units (75 lines of code)
0% | 15% | 35% | 31% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 15% | 35% | 31% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
pkg/gpu/nvidia0% | 15% | 36% | 29% | 18%
ROOT0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in pkg/gpu/nvidia/vgpumanager.go
62 14 1
func watchXIDs()
in pkg/gpu/nvidia/nvidia.go
49 18 3
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
20 3 1
func getVGPUDevices()
in pkg/gpu/nvidia/nvidia.go
19 3 1
func()
in pkg/gpu/nvidia/server.go
16 3 1
func newFSWatcher()
in pkg/gpu/nvidia/watchers.go
14 4 1
func()
in pkg/gpu/nvidia/server.go
13 4 1
func dial()
in pkg/gpu/nvidia/server.go
12 2 2
func main()
in main.go
12 3 0
func NewNvidiaDevicePlugin()
in pkg/gpu/nvidia/server.go
11 1 1
func getPhysicalGPUDevices()
in pkg/gpu/nvidia/nvidia.go
11 2 0
func()
in pkg/gpu/nvidia/server.go
9 2 1
func getDeviceById()
in pkg/gpu/nvidia/server.go
8 3 2
func deviceExists()
in pkg/gpu/nvidia/nvidia.go
8 3 2
func physicialDeviceExists()
in pkg/gpu/nvidia/nvidia.go
8 3 2
func()
in pkg/gpu/nvidia/server.go
6 3 1
func NewVirtualGPUManager()
in pkg/gpu/nvidia/vgpumanager.go
5 1 1