microsoft / azure-vhd-utils
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 285 units with 3,162 lines of code in units (79.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (408 lines of code)
    • 20 simple units (665 lines of code)
    • 259 very simple units (2,089 lines of code)
0% | 0% | 12% | 21% | 66%
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% | 12% | 21% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 35% | 21% | 42%
vhdcore/footer0% | 0% | 24% | 9% | 65%
vhdcore/header0% | 0% | 18% | 22% | 59%
upload/concurrent0% | 0% | 26% | 15% | 58%
upload0% | 0% | 0% | 63% | 36%
vhdcore/vhdfile0% | 0% | 0% | 57% | 42%
vhdcore/common0% | 0% | 0% | 23% | 76%
vhdcore/diskstream0% | 0% | 0% | 32% | 67%
vhdcore/block0% | 0% | 0% | 11% | 88%
upload/metadata0% | 0% | 0% | 26% | 73%
upload/progress0% | 0% | 0% | 0% | 100%
vhdcore/reader0% | 0% | 0% | 0% | 100%
vhdcore/writer0% | 0% | 0% | 0% | 100%
vhdcore/bat0% | 0% | 0% | 0% | 100%
vhdcore0% | 0% | 0% | 0% | 100%
vhdcore/validator0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func vhdUploadCmdHandler()
in vhdUploadCmdHandler.go
138 20 0
func()
in vhdcore/footer/footer.go
25 19 1
func()
in vhdcore/footer/factory.go
76 18 1
func()
in upload/concurrent/worker.go
47 15 1
func showVhdBAT()
in vhdInspectCmdHandler.go
62 15 1
func()
in vhdcore/header/factory.go
60 14 1
func Upload()
in upload/upload.go
70 10 1
func showVhdBlockBitmap()
in vhdInspectCmdHandler.go
44 10 1
func ChunkRangesBySize()
in vhdcore/common/indexRange.go
40 10 2
func showVhdBlocksInfo()
in vhdInspectCmdHandler.go
49 9 1
func()
in vhdcore/vhdfile/vhdFileFactory.go
39 9 1
func DetectEmptyRanges()
in upload/detectEmptyRanges.go
36 8 2
func()
in vhdcore/block/differencingDiskBlockFactory.go
28 8 1
func()
in vhdcore/header/parentlocator/parentLocator.go
19 8 1
func()
in vhdcore/header/parentlocator/platformCode.go
19 8 1
func()
in upload/concurrent/balancer.go
28 7 1
func createBitmapString()
in vhdInspectCmdHandler.go
28 7 2
func()
in vhdcore/diskstream/diskstream.go
28 7 1
func CreateNewDiskGeometry()
in vhdcore/footer/diskGeometry.go
40 7 1
func()
in vhdcore/header/parentlocator/factory.go
35 7 1