Linux / Drivers / Crypto
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,907 units with 115,926 lines of code in units (65.0% of code).
    • 3 very complex units (464 lines of code)
    • 32 complex units (4,507 lines of code)
    • 305 medium complex units (21,651 lines of code)
    • 742 simple units (28,125 lines of code)
    • 4,825 very simple units (61,179 lines of code)
<1% | 3% | 18% | 24% | 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
c<1% | 3% | 19% | 24% | 51%
h0% | 0% | 1% | 6% | 92%
pl0% | 0% | 0% | 2% | 97%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
allwinner5% | 15% | 25% | 17% | 36%
nx4% | 0% | 28% | 28% | 38%
keembay3% | 0% | 14% | 36% | 45%
inside-secure0% | 12% | 17% | 14% | 55%
caam0% | 5% | 16% | 24% | 53%
ROOT0% | 2% | 21% | 23% | 52%
axis0% | 37% | 6% | 5% | 50%
bcm0% | 10% | 34% | 24% | 30%
ccree0% | 5% | 23% | 27% | 43%
qat0% | 3% | 16% | 23% | 56%
marvell0% | 2% | 18% | 26% | 52%
amcc0% | 11% | 6% | 22% | 60%
ccp0% | 2% | 19% | 22% | 55%
hisilicon0% | 0% | 8% | 26% | 64%
cavium0% | 0% | 12% | 19% | 67%
chelsio0% | 0% | 20% | 40% | 39%
stm320% | 0% | 23% | 24% | 52%
ux5000% | 0% | 21% | 35% | 43%
qce0% | 0% | 28% | 31% | 39%
gemini0% | 0% | 39% | 7% | 53%
amlogic0% | 0% | 37% | 18% | 44%
rockchip0% | 0% | 16% | 8% | 74%
virtio0% | 0% | 12% | 31% | 55%
xilinx0% | 0% | 31% | 31% | 36%
vmx0% | 0% | 0% | 6% | 93%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
98 64 12
156 58 2
210 53 1
262 47 2
78 46 1
201 46 1
139 44 2
124 44 4
176 42 1
173 41 1
229 37 3
55 36 1
82 35 3
177 35 1
219 35 1
171 32 11
180 32 11
121 32 2
160 32 1
97 32 1
37 31 1
169 31 1
137 29 1
156 28 4
136 28 1
127 28 1
160 28 1
93 27 4
121 27 1
126 27 1
139 27 2
70 26 1
132 26 1
178 26 1
82 26 1
91 25 4
97 25 5
153 25 6
105 25 5
124 25 1
87 24 3
88 24 2
111 24 1
113 24 1
176 24 2
41 24 3
127 24 1
100 23 4
107 23 1
101 23 3