Linux / Drivers / Scsi
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 11,536 units with 309,408 lines of code in units (41.4% of code).
    • 37 very complex units (9,617 lines of code)
    • 214 complex units (31,152 lines of code)
    • 990 medium complex units (70,891 lines of code)
    • 1,837 simple units (73,150 lines of code)
    • 8,458 very simple units (124,598 lines of code)
3% | 10% | 22% | 23% | 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
c3% | 10% | 23% | 23% | 39%
pl0% | 0% | 68% | 22% | 8%
h0% | 0% | 2% | 16% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT4% | 13% | 23% | 22% | 36%
qla4xxx9% | 9% | 20% | 27% | 32%
aacraid14% | 13% | 24% | 19% | 28%
megaraid7% | 11% | 27% | 29% | 23%
arm8% | 6% | 17% | 28% | 38%
esas2r4% | 10% | 30% | 22% | 31%
hisi_sas3% | 4% | 20% | 23% | 48%
qla2xxx1% | 13% | 21% | 24% | 37%
isci2% | 5% | 18% | 16% | 56%
mpi3mr3% | 4% | 32% | 33% | 25%
sym53c8xx_23% | 22% | 27% | 20% | 26%
pm80010% | 23% | 20% | 17% | 39%
fnic0% | 11% | 23% | 18% | 46%
qedf0% | 11% | 29% | 28% | 30%
smartpqi0% | 8% | 15% | 20% | 55%
fcoe0% | 10% | 21% | 21% | 46%
qedi0% | 7% | 22% | 20% | 48%
bnx2fc0% | 6% | 34% | 22% | 36%
aic94xx0% | 4% | 18% | 25% | 51%
ufs0% | 1% | 15% | 24% | 58%
arcmsr0% | 6% | 31% | 29% | 32%
ibmvscsi0% | 4% | 23% | 27% | 44%
pcmcia0% | 14% | 8% | 25% | 51%
be2iscsi0% | 3% | 25% | 29% | 41%
bnx2i0% | 6% | 11% | 29% | 52%
ibmvscsi_tgt0% | 7% | 39% | 25% | 28%
cxgbi0% | 4% | 19% | 23% | 53%
device_handler0% | 11% | 19% | 37% | 31%
aic7xxx0% | 12% | 0% | 32% | 54%
libsas0% | 2% | 23% | 24% | 49%
cxlflash0% | 2% | 22% | 33% | 41%
mvsas0% | 2% | 28% | 23% | 45%
lpfc0% | 2% | 28% | 25% | 43%
libfc0% | 0% | 31% | 29% | 38%
elx0% | 0% | 21% | 9% | 68%
csiostor0% | 0% | 16% | 10% | 73%
snic0% | 0% | 14% | 16% | 68%
mpt3sas0% | 0% | 18% | 38% | 43%
bfa0% | 0% | 3% | 11% | 84%
dpt0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
223 193 2
297 150 4
565 146 4
297 122 3
376 118 3
366 114 2
317 96 2
407 94 4
386 93 1
230 91 2
398 90 1
434 89 2
300 83 2
352 80 4
86 77 2
274 76 1
449 72 2
166 72 3
257 72 3
239 70 2
234 68 3
163 66 3
240 62 1
212 60 4
281 59 1
213 59 2
186 58 4
214 57 1
210 56 5
218 56 1
98 55 1
153 54 2
202 53 2
126 53 2
143 52 1
143 52 2
162 52 1
181 50 1
80 50 3
201 50 1
81 50 3
224 49 3
137 49 1
246 49 2
243 49 2
137 49 2
143 48 2
178 48 3
176 47 1
210 47 1