Linux / Drivers / Platform
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 3,641 units with 62,545 lines of code in units (66.4% of code).
    • 3 very complex units (316 lines of code)
    • 17 complex units (1,899 lines of code)
    • 201 medium complex units (11,546 lines of code)
    • 446 simple units (14,095 lines of code)
    • 2,974 very simple units (34,689 lines of code)
<1% | 3% | 18% | 22% | 55%
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
c<1% | 3% | 18% | 22% | 55%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
x86<1% | 3% | 19% | 21% | 54%
olpc0% | 23% | 0% | 19% | 57%
chrome0% | 0% | 23% | 23% | 53%
mellanox0% | 0% | 20% | 34% | 45%
surface0% | 0% | 6% | 23% | 69%
goldfish0% | 0% | 11% | 16% | 71%
mips0% | 0% | 0% | 11% | 88%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
128 122 2
120 114 2
68 62 2
119 47 2
109 45 1
125 37 3
117 35 1
101 34 4
135 32 1
121 32 1
84 32 2
152 30 1
100 29 2
69 29 1
109 28 1
70 27 2
80 27 4
277 27 1
32 26 3
99 26 1
91 24 1
55 24 1
93 23 1
66 23 1
58 22 3
71 22 1
112 22 1
137 22 2
48 22 2
80 22 2
60 22 1
80 21 1
100 21 2
54 21 1
71 21 3
79 20 1
69 20 1
114 20 1
31 19 2
92 19 1
46 19 3
41 19 1
85 19 2
49 19 1
92 19 2
46 18 1
68 18 4
72 18 2
63 18 1
87 18 2