Linux / Net
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 29,301 units with 624,382 lines of code in units (70.5% of code).
    • 83 very complex units (18,913 lines of code)
    • 432 complex units (51,949 lines of code)
    • 2,527 medium complex units (148,301 lines of code)
    • 4,482 simple units (144,535 lines of code)
    • 21,777 very simple units (260,684 lines of code)
3% | 8% | 23% | 23% | 41%
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% | 23% | 23% | 41%
h0% | 2% | 2% | 3% | 91%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
core7% | 8% | 19% | 21% | 43%
ipv44% | 9% | 24% | 23% | 37%
mac802116% | 11% | 26% | 20% | 34%
wireless8% | 13% | 30% | 20% | 26%
ipv64% | 11% | 22% | 22% | 38%
netfilter2% | 5% | 22% | 24% | 44%
sctp3% | 6% | 26% | 25% | 36%
openvswitch6% | 12% | 22% | 19% | 38%
rds5% | 7% | 23% | 18% | 45%
sched1% | 11% | 27% | 19% | 39%
bluetooth<1% | 5% | 26% | 23% | 43%
decnet5% | 9% | 19% | 27% | 38%
mptcp4% | 5% | 21% | 23% | 44%
tipc2% | 6% | 26% | 25% | 39%
x257% | 16% | 21% | 21% | 32%
bridge<1% | 7% | 25% | 23% | 42%
rxrpc2% | 14% | 23% | 22% | 37%
can2% | 8% | 29% | 24% | 35%
atm2% | 4% | 28% | 27% | 36%
appletalk8% | 12% | 17% | 23% | 38%
xfrm1% | 6% | 18% | 30% | 43%
ROOT3% | 4% | 30% | 15% | 45%
ceph0% | 7% | 16% | 19% | 56%
ax250% | 28% | 22% | 22% | 25%
tls0% | 25% | 21% | 22% | 30%
packet0% | 28% | 21% | 12% | 37%
smc0% | 5% | 28% | 26% | 40%
rose0% | 19% | 24% | 26% | 29%
l2tp0% | 11% | 23% | 24% | 40%
dcb0% | 31% | 27% | 21% | 20%
dccp0% | 6% | 27% | 25% | 41%
netlabel0% | 9% | 27% | 30% | 32%
ncsi0% | 10% | 23% | 20% | 45%
unix0% | 11% | 22% | 24% | 41%
nfc0% | 2% | 20% | 30% | 46%
caif0% | 8% | 28% | 23% | 40%
netrom0% | 11% | 33% | 20% | 34%
batman-adv0% | 2% | 18% | 30% | 48%
iucv0% | 10% | 17% | 28% | 44%
netlink0% | 8% | 25% | 30% | 35%
8021q0% | 12% | 13% | 23% | 50%
lapb0% | 16% | 27% | 16% | 38%
vmw_vsock0% | 4% | 21% | 19% | 54%
psample0% | 54% | 13% | 0% | 32%
sunrpc0% | 1% | 12% | 20% | 66%
strparser0% | 47% | 6% | 4% | 41%
kcm0% | 8% | 22% | 25% | 44%
llc0% | 3% | 13% | 16% | 67%
xdp0% | 5% | 20% | 11% | 61%
phonet0% | 4% | 22% | 24% | 48%
ethtool0% | 1% | 31% | 30% | 36%
mpls0% | 0% | 51% | 21% | 27%
ieee8021540% | 0% | 23% | 31% | 44%
9p0% | 0% | 29% | 18% | 51%
key0% | 0% | 34% | 24% | 41%
dsa0% | 0% | 14% | 24% | 61%
hsr0% | 0% | 32% | 21% | 45%
qrtr0% | 0% | 27% | 24% | 47%
6lowpan0% | 0% | 21% | 30% | 47%
mctp0% | 0% | 14% | 35% | 49%
8020% | 0% | 11% | 27% | 61%
mac8021540% | 0% | 10% | 27% | 62%
rfkill0% | 0% | 7% | 19% | 72%
dns_resolver0% | 0% | 45% | 15% | 39%
switchdev0% | 0% | 11% | 17% | 71%
l3mdev0% | 0% | 0% | 42% | 57%
ethernet0% | 0% | 0% | 21% | 78%
bpf0% | 0% | 0% | 42% | 57%
bpfilter0% | 0% | 0% | 0% | 100%
nsh0% | 0% | 0% | 0% | 100%
ife0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
726 186 4
495 180 7
445 169 5
517 165 5
359 124 5
252 102 1
293 101 5
392 99 9
452 95 9
306 91 1
251 90 5
277 89 5
275 88 4
282 88 6
225 85 5
274 82 5
304 81 7
279 81 1
254 80 5
255 77 3
259 77 8
173 73 2
90 73 2
88 72 4
189 70 4
289 70 1
187 69 4
119 68 5
258 68 12
221 66 3
388 66 5
214 66 2
200 66 4
158 64 2
212 64 4
264 64 4
230 64 1
199 64 2
216 64 3
259 64 2
229 63 2
206 63 2
220 63 5
232 62 3
216 62 4
164 62 3
240 62 5
251 62 3
172 61 5
222 61 5