microsoft / azure-vhd-utils
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 285 units with 3,162 lines of code in units (79.7% of code).
    • 1 very long units (138 lines of code)
    • 5 long units (353 lines of code)
    • 31 medium size units (912 lines of code)
    • 43 small units (639 lines of code)
    • 205 very small units (1,120 lines of code)
4% | 11% | 28% | 20% | 35%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go4% | 11% | 28% | 20% | 35%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT24% | 26% | 25% | 14% | 8%
vhdcore/footer0% | 18% | 28% | 15% | 37%
upload0% | 33% | 53% | 8% | 4%
vhdcore/header0% | 18% | 10% | 23% | 47%
vhdcore/block0% | 0% | 23% | 31% | 44%
vhdcore/diskstream0% | 0% | 58% | 30% | 10%
upload/metadata0% | 0% | 66% | 13% | 19%
upload/concurrent0% | 0% | 41% | 14% | 43%
vhdcore/vhdfile0% | 0% | 57% | 21% | 21%
vhdcore/common0% | 0% | 23% | 43% | 32%
upload/progress0% | 0% | 21% | 11% | 66%
vhdcore/bat0% | 0% | 0% | 26% | 73%
vhdcore/writer0% | 0% | 0% | 13% | 86%
vhdcore/reader0% | 0% | 0% | 0% | 100%
vhdcore0% | 0% | 0% | 0% | 100%
vhdcore/validator0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func vhdUploadCmdHandler()
in vhdUploadCmdHandler.go
138 20 0
func vhdInspectCmdHandler()
in vhdInspectCmdHandler.go
85 1 0
func()
in vhdcore/footer/factory.go
76 18 1
func Upload()
in upload/upload.go
70 10 1
func showVhdBAT()
in vhdInspectCmdHandler.go
62 15 1
func()
in vhdcore/header/factory.go
60 14 1
func showVhdBlocksInfo()
in vhdInspectCmdHandler.go
49 9 1
func()
in upload/concurrent/worker.go
47 15 1
func showVhdBlockBitmap()
in vhdInspectCmdHandler.go
44 10 1
func ChunkRangesBySize()
in vhdcore/common/indexRange.go
40 10 2
func CreateNewDiskGeometry()
in vhdcore/footer/diskGeometry.go
40 7 1
func()
in vhdcore/vhdfile/vhdFileFactory.go
39 9 1
func DetectEmptyRanges()
in upload/detectEmptyRanges.go
36 8 2
func()
in vhdcore/header/parentlocator/factory.go
35 7 1
func()
in vhdcore/vhdfile/vhdFile.go
34 6 1
func SerializeFooter()
in vhdcore/footer/vhdFooterSerializer.go
31 3 1
func CompareMetaData()
in upload/metadata/metaData.go
30 6 2
func LocateNonEmptyRangeIndices()
in upload/detectEmptyRanges.go
29 6 2
func()
in upload/concurrent/balancer.go
28 7 1
func createBitmapString()
in vhdInspectCmdHandler.go
28 7 2