kubernetes / csi-translation-lib
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 116 units with 1,601 lines of code in units (86.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (51 lines of code)
    • 32 medium size units (1,010 lines of code)
    • 19 small units (284 lines of code)
    • 64 very small units (256 lines of code)
0% | 3% | 63% | 17% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 3% | 63% | 17% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
plugins0% | 3% | 68% | 15% | 13%
ROOT0% | 0% | 0% | 50% | 50%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in plugins/azure_file.go
51 17 1
func()
in plugins/rbd.go
45 14 1
func regionTopologyHandler()
in plugins/in_tree_volume.go
43 15 2
func()
in plugins/gce_pd.go
43 10 1
func()
in plugins/rbd.go
43 6 1
func()
in plugins/rbd.go
43 7 1
func()
in plugins/azure_disk.go
39 10 1
func()
in plugins/azure_file.go
39 5 1
func()
in plugins/gce_pd.go
37 5 1
func()
in plugins/gce_pd.go
37 9 1
func()
in plugins/azure_file.go
37 7 1
func()
in plugins/azure_disk.go
36 9 1
func()
in plugins/vsphere_volume.go
35 13 1
func addTopology()
in plugins/in_tree_volume.go
34 8 3
func()
in plugins/aws_ebs.go
34 11 1
func()
in plugins/rbd.go
33 6 1
func()
in plugins/azure_disk.go
30 8 1
func()
in plugins/aws_ebs.go
30 4 1
func()
in plugins/gce_pd.go
29 10 1
func()
in plugins/azure_disk.go
29 9 1