microsoft / ethr
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 252 units with 3,385 lines of code in units (79.5% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (180 lines of code)
    • 8 medium complex units (431 lines of code)
    • 31 simple units (1,012 lines of code)
    • 212 very simple units (1,762 lines of code)
0% | 5% | 12% | 29% | 52%
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% | 5% | 12% | 29% | 52%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 5% | 12% | 29% | 52%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func main()
in ethr.go
180 46 0
func getTestResults()
in serverui.go
55 24 3
func icmpRecvMsg()
in client.go
72 21 7
func runTest()
in client.go
58 20 1
76 19 2
33 18 2
56 11 3
50 11 1
31 11 1
func runClient()
in client.go
45 10 4
28 10 1
16 10 1
45 10 1
64 9 0
25 9 1
27 8 1
42 8 3
func tcpProbe()
in client.go
50 8 4
48 8 1
53 8 3