Linux / Arch / Mips
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 5,331 units with 96,237 lines of code in units (43.8% of code).
    • 26 very complex units (8,228 lines of code)
    • 65 complex units (7,910 lines of code)
    • 266 medium complex units (14,886 lines of code)
    • 558 simple units (17,351 lines of code)
    • 4,416 very simple units (47,862 lines of code)
8% | 8% | 15% | 18% | 49%
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
c9% | 8% | 16% | 18% | 47%
h1% | 1% | 7% | 13% | 75%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
kernel16% | 8% | 14% | 17% | 43%
math-emu30% | 38% | 12% | 5% | 12%
kvm12% | 23% | 14% | 16% | 33%
net24% | 0% | 29% | 17% | 27%
bcm47xx53% | 0% | 0% | 15% | 30%
mm5% | 2% | 19% | 16% | 55%
cavium-octeon4% | 6% | 21% | 18% | 49%
boot28% | 0% | 12% | 19% | 39%
loongson6411% | 7% | 3% | 7% | 68%
include1% | <1% | 6% | 13% | 76%
pci0% | 9% | 17% | 28% | 45%
txx90% | 12% | 4% | 22% | 60%
alchemy0% | 3% | 12% | 23% | 61%
mti-malta0% | 15% | 27% | 22% | 34%
ath790% | 14% | 23% | 31% | 30%
dec0% | 11% | 12% | 28% | 47%
bcm63xx0% | 6% | 30% | 20% | 43%
sni0% | 12% | 2% | 13% | 71%
lib0% | 22% | 0% | 24% | 53%
lantiq0% | 6% | 20% | 15% | 57%
loongson2ef0% | 0% | 43% | 6% | 50%
vr41xx0% | 0% | 26% | 39% | 34%
sgi-ip220% | 0% | 19% | 22% | 58%
generic0% | 0% | 40% | 15% | 43%
ralink0% | 0% | 18% | 24% | 56%
tools0% | 0% | 61% | 11% | 26%
vdso0% | 0% | 62% | 16% | 21%
ar70% | 0% | 14% | 9% | 75%
sgi-ip270% | 0% | 11% | 15% | 72%
sibyte0% | 0% | 7% | 32% | 60%
sgi-ip320% | 0% | 21% | 11% | 66%
jazz0% | 0% | 12% | 9% | 78%
loongson320% | 0% | 0% | 35% | 64%
fw0% | 0% | 0% | 23% | 76%
ath250% | 0% | 0% | 17% | 82%
pic320% | 0% | 0% | 22% | 77%
sgi-ip300% | 0% | 0% | 13% | 86%
rb5320% | 0% | 0% | 15% | 84%
cobalt0% | 0% | 0% | 21% | 78%
bmips0% | 0% | 0% | 18% | 81%
crypto0% | 0% | 0% | 0% | 100%
n640% | 0% | 0% | 0% | 100%
power0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
928 246 3
322 165 2
318 157 2
491 157 2
1156 139 3
323 112 2
258 109 2
306 105 3
331 100 1
299 99 3
160 94 1
298 94 1
289 89 4
267 89 3
243 82 1
221 80 3
231 77 1
303 74 1
168 69 4
203 66 2
101 59 1
284 57 2
224 56 3
94 54 1
302 52 2
108 51 4
79 50 1
177 49 4
166 49 3
214 49 4
85 48 2
85 48 2
85 48 2
85 48 2
113 47 2
114 47 2
107 46 2
108 46 2
156 46 1
191 46 3
196 45 4
95 44 2
95 44 2
205 44 3
110 43 6
133 43 4
198 42 3
74 41 2
74 41 2
74 41 2