aws / ec2-macos-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 82 units with 810 lines of code in units (67.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (49 lines of code)
    • 5 simple units (130 lines of code)
    • 76 very simple units (631 lines of code)
0% | 0% | 6% | 16% | 77%
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% | 6% | 16% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
internal/util0% | 0% | 51% | 36% | 11%
internal/diskutil0% | 0% | 0% | 20% | 79%
internal/system0% | 0% | 0% | 30% | 69%
internal/cmd0% | 0% | 0% | 0% | 100%
internal/diskutil/mocks0% | 0% | 0% | 0% | 100%
internal/diskutil/types0% | 0% | 0% | 0% | 100%
internal/cmd/gen-docs0% | 0% | 0% | 0% | 100%
cmd/ec2-macos-utils0% | 0% | 0% | 0% | 100%
internal/contextual0% | 0% | 0% | 0% | 100%
internal/diskutil/identifier0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func getUIDandGID()
in internal/util/util.go
49 11 1
func GrowContainer()
in internal/diskutil/grow.go
49 10 2
func ExecuteCommand()
in internal/util/util.go
35 8 4
func()
in internal/system/product.go
16 6 1
func getVersionRelease()
in internal/system/product.go
16 6 1
func canAPFSResize()
in internal/diskutil/grow.go
14 6 1
func ForProduct()
in internal/diskutil/diskutil.go
14 5 1
func()
in internal/diskutil/types/partitions.go
17 5 1
func growContainerCommand()
in internal/cmd/grow_container.go
38 5 0
func validateDeviceID()
in internal/cmd/grow_container.go
15 5 2
func updatePhysicalStores()
in internal/diskutil/mojave.go
13 4 1
func repairParentDisk()
in internal/diskutil/grow.go
15 4 2
func()
in internal/diskutil/types/disk.go
14 4 1
func main()
in internal/cmd/gen-docs/main.go
16 4 0
func run()
in internal/cmd/grow_container.go
21 4 2
func getTargetDiskInfo()
in internal/cmd/grow_container.go
13 4 2
func main()
in cmd/ec2-macos-utils/main.go
14 4 0
func ExecuteCommandYes()
in internal/util/util.go
11 3 3
func Scan()
in internal/system/system.go
15 3 0
func readVersion()
in internal/system/system.go
10 3 0