Linux / Drivers / Acpi
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 2,442 units with 47,871 lines of code in units (48.9% of code).
    • 4 very complex units (974 lines of code)
    • 17 complex units (2,314 lines of code)
    • 172 medium complex units (10,549 lines of code)
    • 410 simple units (13,074 lines of code)
    • 1,839 very simple units (20,960 lines of code)
2% | 4% | 22% | 27% | 43%
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
c2% | 4% | 22% | 27% | 43%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
acpica7% | 7% | 20% | 26% | 37%
ROOT0% | 3% | 22% | 26% | 47%
nfit0% | 8% | 25% | 26% | 39%
apei0% | 6% | 24% | 24% | 44%
x860% | 0% | 65% | 18% | 15%
numa0% | 0% | 19% | 41% | 39%
arm640% | 0% | 13% | 41% | 45%
pmic0% | 0% | 12% | 29% | 57%
dptf0% | 0% | 0% | 54% | 45%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
274 55 1
293 54 1
217 52 1
190 51 4
182 48 2
171 48 6
177 42 1
109 40 3
214 39 1
191 39 2
175 34 1
166 31 1
137 30 1
98 29 6
116 29 1
123 28 1
107 28 3
104 27 2
82 27 3
51 26 2
111 26 1
138 25 1
65 25 4
74 24 2
98 24 2
89 24 1
132 23 1
149 23 2
78 23 5
100 23 2
116 23 3
92 22 1
84 22 2
71 22 3
56 22 3
56 22 4
64 22 1
122 21 2
91 20 4
123 20 1
143 20 1
52 20 5
61 19 1
42 19 2
86 19 2
83 19 3
101 19 4
85 19 1
64 19 2
69 19 2