facebookincubator / Portal-Kernel
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 401,362 units with 8,417,864 lines of code in units (57.3% of code).
    • 936 very complex units (260,420 lines of code)
    • 4,274 complex units (576,325 lines of code)
    • 27,477 medium complex units (1,828,811 lines of code)
    • 53,640 simple units (1,917,727 lines of code)
    • 315,035 very simple units (3,834,581 lines of code)
3% | 6% | 21% | 22% | 45%
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% | 7% | 22% | 23% | 44%
pl16% | 8% | 19% | 15% | 40%
h<1% | <1% | 3% | 5% | 90%
cc0% | 8% | 35% | 14% | 41%
py0% | <1% | 14% | 19% | 65%
inl0% | 0% | 0% | 0% | 100%
uc0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
drivers3% | 7% | 22% | 23% | 43%
arch3% | 4% | 13% | 18% | 59%
sound2% | 5% | 21% | 23% | 45%
fs3% | 9% | 25% | 23% | 38%
net3% | 7% | 22% | 23% | 43%
tools3% | 8% | 21% | 22% | 43%
scripts10% | 9% | 24% | 17% | 38%
kernel1% | 4% | 13% | 22% | 57%
crypto4% | 1% | 12% | 16% | 65%
lib4% | 12% | 16% | 18% | 48%
security1% | 9% | 21% | 25% | 42%
mm<1% | 4% | 20% | 23% | 51%
block<1% | 3% | 18% | 24% | 51%
virt0% | 6% | 8% | 21% | 62%
ipc0% | 4% | 24% | 19% | 51%
include0% | <1% | 1% | 4% | 93%
init0% | 0% | 29% | 29% | 41%
usr0% | 0% | 35% | 10% | 54%
firmware0% | 0% | 75% | 3% | 20%
certs0% | 0% | 0% | 83% | 16%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
1145 1138 2
836 831 2
767 767 2
724 716 2
693 686 2
679 672 2
677 670 2
635 628 2
1051 408 0
361 351 2
1239 319 6
489 317 3
638 303 3
908 258 3
1940 255 4
894 253 2
1394 246 1
246 239 2
799 227 4
220 213 2
771 210 4
501 210 4
218 207 2
277 200 8
534 199 5
1010 196 1
202 195 2
1147 194 3
962 194 3
630 193 5
223 193 2
1210 191 2
312 190 3
410 186 3
806 184 3
550 183 5
250 183 1
758 182 2
660 174 3
849 171 3
178 171 2
451 170 2
174 167 2
252 166 3
523 162 3
388 162 4
433 159 5
1088 155 4
664 152 1
843 150 1