Linux / Arch / Powerpc
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 10,496 units with 172,108 lines of code in units (55.2% of code).
    • 26 very complex units (8,251 lines of code)
    • 61 complex units (7,715 lines of code)
    • 479 medium complex units (27,505 lines of code)
    • 1,207 simple units (37,938 lines of code)
    • 8,723 very simple units (90,699 lines of code)
4% | 4% | 15% | 22% | 52%
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
c5% | 4% | 16% | 23% | 50%
h0% | 0% | 1% | 6% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
kvm12% | 7% | 21% | 18% | 38%
lib37% | 3% | 11% | 10% | 36%
net80% | 0% | 0% | 6% | 12%
math-emu93% | 0% | 4% | 0% | 2%
kernel1% | 4% | 20% | 23% | 49%
xmon8% | 10% | 24% | 18% | 38%
boot4% | 0% | 23% | 16% | 56%
perf0% | 18% | 21% | 29% | 30%
platforms0% | 2% | 13% | 25% | 58%
sysdev0% | 5% | 12% | 23% | 58%
mm0% | 3% | 14% | 26% | 55%
kexec0% | 0% | 10% | 40% | 48%
include0% | 0% | 1% | 6% | 92%
crypto0% | 0% | 0% | 11% | 88%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
1575 452 3
738 272 5
649 262 5
566 134 1
445 116 1
130 95 2
254 84 3
222 83 2
169 82 3
256 77 1
325 76 3
156 76 3
177 74 2
237 71 3
217 71 2
237 59 1
134 56 1
194 56 3
251 56 2
60 54 1
150 54 3
204 54 2
254 54 4
263 51 2
208 51 2
180 51 4
137 49 2
217 49 3
137 48 6
126 45 6
196 44 1
88 44 2
148 43 4
128 43 5
133 41 5
129 40 2
138 40 9
129 40 3
173 39 3
125 38 6
162 37 8
102 36 1
120 36 3
110 36 1
176 34 2
147 34 1
120 34 2
121 34 6
155 34 5
158 34 3