facebook / mysql-8.0
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 66,065 units with 858,317 lines of code in units (38.3% of code).
    • 232 very complex units (66,363 lines of code)
    • 599 complex units (74,359 lines of code)
    • 2,709 medium complex units (163,244 lines of code)
    • 4,735 simple units (141,911 lines of code)
    • 57,790 very simple units (412,440 lines of code)
7% | 8% | 19% | 16% | 48%
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
js9% | 9% | 18% | 16% | 45%
cc7% | 10% | 22% | 19% | 41%
c12% | 12% | 22% | 18% | 33%
inc10% | 0% | 18% | 11% | 59%
cpp5% | 7% | 24% | 17% | 45%
java2% | 2% | 5% | 9% | 80%
h1% | <1% | 3% | 6% | 87%
pl12% | 8% | 19% | 17% | 42%
pm5% | 11% | 16% | 18% | 48%
php50% | 27% | 0% | 7% | 15%
hpp0% | 1% | 4% | 7% | 85%
py0% | 2% | 20% | 14% | 62%
t0% | 0% | 0% | 4% | 95%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
storage8% | 9% | 18% | 16% | 47%
sql7% | 10% | 22% | 17% | 42%
mysql-test9% | 1% | 18% | 12% | 57%
client16% | 11% | 19% | 15% | 36%
extra4% | 5% | 17% | 14% | 57%
plugin5% | 9% | 15% | 21% | 48%
strings13% | 23% | 21% | 19% | 22%
mysys5% | 8% | 23% | 24% | 37%
mysys_ssl24% | 19% | 13% | 17% | 23%
rapid<1% | 4% | 13% | 18% | 62%
sql-common7% | 16% | 19% | 26% | 30%
dbug17% | 0% | 7% | 27% | 47%
libmysql4% | 6% | 30% | 22% | 35%
libbinlogevents0% | 14% | 6% | 10% | 68%
components0% | 5% | 18% | 25% | 49%
include0% | 2% | 9% | 13% | 74%
utilities0% | 0% | 42% | 25% | 32%
vio0% | 0% | 27% | 29% | 42%
testclients0% | 0% | 41% | 15% | 43%
unittest0% | 0% | 3% | 6% | 89%
packaging0% | 0% | 47% | 0% | 52%
win0% | 0% | 53% | 19% | 27%
scripts0% | 0% | 0% | 83% | 16%
cmake0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
963 225 5
764 222 4
548 211 5
617 189 5
624 183 3
808 179 2
594 172 2
591 172 2
694 168 9
488 159 5
441 156 3
677 150 5
402 149 3
351 148 3
767 148 5
454 146 0
364 144 2
472 143 13
523 138 1
315 137 4
446 131 3
380 130 5
366 128 2
373 128 3
416 127 37
414 125 14
535 125 2
499 124 6
674 123 1
417 121 3
555 120 5
408 120 3
381 118 6
320 118 6
491 118 5
422 117 2
40 115 1
307 114 52
401 109 1
552 109 9
489 108 3
304 106 2
364 104 11
136 104 1
410 103 4
594 103 9
222 103 6
367 102 8
372 100 1
274 99 7