golang / debug
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 227 units with 4,283 lines of code in units (89.1% of code).
    • 0 very complex units (0 lines of code)
    • 7 complex units (1,029 lines of code)
    • 18 medium complex units (1,075 lines of code)
    • 23 simple units (683 lines of code)
    • 179 very simple units (1,496 lines of code)
0% | 24% | 25% | 15% | 34%
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% | 24% | 25% | 15% | 34%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
internal/gocore0% | 30% | 23% | 10% | 35%
cmd/viewcore0% | 32% | 24% | 23% | 20%
internal/core0% | 0% | 37% | 22% | 40%
dwtest0% | 0% | 0% | 29% | 70%
internal/testenv0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func htmlObject()
in cmd/viewcore/html.go
126 43 6
func()
in internal/gocore/process.go
231 42 1
func serveHTML()
in cmd/viewcore/html.go
189 37 3
func()
in internal/gocore/dwarf.go
145 37 1
func()
in internal/gocore/dwarf.go
124 33 1
func()
in internal/gocore/type.go
118 30 1
func()
in internal/gocore/type.go
96 29 1
func Core()
in internal/core/process.go
75 20 3
func()
in internal/core/process.go
60 20 1
func()
in internal/gocore/type.go
73 20 1
func()
in internal/core/mapping.go
59 19 1
func()
in internal/gocore/object.go
81 19 1
func edges1()
in internal/gocore/object.go
41 18 7
func typeFieldName()
in cmd/viewcore/main.go
42 17 2
func()
in internal/gocore/process.go
69 16 1
func runReachable()
in cmd/viewcore/main.go
73 15 2
func()
in internal/gocore/dwarf.go
54 15 1
func()
in internal/gocore/process.go
58 15 1
func()
in internal/gocore/process.go
78 14 1
func()
in internal/gocore/dominator.go
54 13 1