Linux / Documentation
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 100 units with 2,098 lines of code in units (0.3% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (344 lines of code)
    • 6 medium complex units (324 lines of code)
    • 18 simple units (496 lines of code)
    • 74 very simple units (934 lines of code)
0% | 16% | 15% | 23% | 44%
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
pl0% | 44% | 11% | 26% | 18%
py0% | 0% | 19% | 20% | 59%
c0% | 0% | 0% | 34% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
trace0% | 44% | 11% | 26% | 18%
sphinx0% | 0% | 19% | 20% | 59%
usb0% | 0% | 0% | 61% | 38%
scheduler0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
175 32 0
169 26 0
67 20 1
89 18 0
41 18 1
56 16 3
29 11 3
42 11 3
30 10 3
28 9 3
20 9 4
28 9 3
49 8 2
26 8 1
17 8 3
32 7 0
22 7 0
37 7 0
22 7 0
27 7 3
17 7 2
45 6 0
47 6 0
16 6 3
19 6 1
14 6 2
14 5 3
16 5 1
19 5 3
12 5 1
13 5 1
27 5 2
33 5 1
18 4 0
18 4 0
15 4 1
14 4 1
13 4 1
14 4 3
17 4 3
11 4 1
16 4 1
10 4 2
6 4 1
12 3 0
11 3 0
13 3 0
25 3 0
12 3 0
11 3 0