Linux / Drivers / Video
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 6,445 units with 152,421 lines of code in units (65.5% of code).
    • 21 very complex units (6,699 lines of code)
    • 94 complex units (11,947 lines of code)
    • 580 medium complex units (39,892 lines of code)
    • 916 simple units (31,490 lines of code)
    • 4,834 very simple units (62,393 lines of code)
4% | 7% | 26% | 20% | 40%
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
c4% | 7% | 26% | 20% | 40%
h0% | 0% | 1% | 29% | 69%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
fbdev4% | 8% | 26% | 20% | 39%
backlight0% | 3% | 20% | 24% | 51%
console0% | 0% | 27% | 15% | 56%
logo0% | 0% | 54% | 17% | 28%
ROOT0% | 0% | 11% | 41% | 47%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
646 136 1
334 128 1
431 119 1
546 114 2
339 105 2
346 94 1
306 83 3
314 80 1
273 78 3
187 73 7
238 71 1
236 71 1
628 70 2
277 70 3
331 69 2
253 68 3
279 60 2
130 60 1
258 57 3
164 56 3
183 53 3
218 49 2
115 47 3
218 47 2
85 44 2
189 44 1
152 43 3
102 43 1
88 43 1
93 43 1
177 43 1
236 41 1
140 40 5
140 40 5
202 40 1
96 40 2
62 40 2
132 39 5
120 39 3
76 39 1
138 39 14
126 38 5
215 38 1
123 38 1
115 38 17
96 38 2
202 37 1
115 37 17
99 36 2
140 36 1