Linux / Drivers / Sh
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 168 units with 2,456 lines of code in units (78.5% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (149 lines of code)
    • 3 medium complex units (199 lines of code)
    • 25 simple units (674 lines of code)
    • 139 very simple units (1,434 lines of code)
0% | 6% | 8% | 27% | 58%
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
c0% | 6% | 8% | 27% | 58%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
intc0% | 13% | 4% | 18% | 63%
maple0% | 0% | 25% | 34% | 39%
clk0% | 0% | 0% | 41% | 58%
superhyway0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
149 38 1
71 15 1
54 12 4
74 11 1
25 10 2
27 10 5
43 9 5
41 9 5
29 9 1
58 8 1
23 8 1
26 8 1
26 8 2
28 7 3
32 7 1
21 7 2
28 7 1
26 7 1
24 7 1
22 7 2
27 7 1
12 7 1
27 7 1
22 7 2
34 6 3
17 6 2
15 6 2
25 6 3
16 6 1
42 5 1
30 5 1
20 5 4
22 5 1
30 5 3
28 5 2
27 5 4
21 4 2
19 4 2
19 4 2
23 4 3
16 4 2
12 4 2
20 4 1
21 4 1
12 4 1
24 4 5
13 4 2
14 4 1
20 3 1
8 3 2