Linux / Drivers / Infiniband
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 9,576 units with 230,790 lines of code in units (71.3% of code).
    • 26 very complex units (7,141 lines of code)
    • 135 complex units (19,280 lines of code)
    • 731 medium complex units (50,908 lines of code)
    • 1,430 simple units (53,755 lines of code)
    • 7,254 very simple units (99,706 lines of code)
3% | 8% | 22% | 23% | 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
c3% | 8% | 22% | 23% | 42%
h0% | 0% | 1% | 5% | 93%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
hw3% | 9% | 22% | 22% | 41%
sw2% | 15% | 22% | 20% | 39%
ulp1% | 3% | 19% | 23% | 52%
core<1% | 2% | 20% | 30% | 46%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
454 170 2
491 168 7
582 139 2
356 89 1
275 86 8
237 86 2
347 84 3
344 82 6
209 76 4
263 71 3
242 70 6
294 67 2
136 67 2
297 67 4
233 65 6
202 65 1
237 64 5
250 64 8
223 64 1
191 63 6
205 56 4
183 55 3
199 54 2
223 54 1
257 52 1
211 52 2
143 50 4
205 48 5
70 47 2
234 47 4
177 46 1
161 46 4
155 45 1
167 45 4
267 45 2
162 44 3
186 44 3
322 44 6
224 44 4
200 44 3
192 43 3
119 43 2
231 43 3
199 43 2
312 43 7
147 42 6
164 41 1
107 41 4
172 41 4
223 41 2