facebook / kuduraft
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 6,472 units with 70,274 lines of code in units (46.4% of code).
    • 2 very complex units (333 lines of code)
    • 21 complex units (2,720 lines of code)
    • 140 medium complex units (7,659 lines of code)
    • 394 simple units (12,338 lines of code)
    • 5,915 very simple units (47,224 lines of code)
<1% | 3% | 10% | 17% | 67%
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
cc<1% | 4% | 12% | 19% | 62%
pl0% | 44% | 0% | 12% | 42%
py0% | 0% | 25% | 24% | 49%
h0% | 0% | 1% | 5% | 93%
c0% | 0% | 0% | 28% | 71%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/kudu/gutil1% | 6% | 7% | 10% | 75%
src/kudu/consensus1% | 4% | 15% | 15% | 63%
src/kudu/tools0% | 5% | 17% | 23% | 53%
src/kudu/fs0% | 8% | 14% | 18% | 58%
src/kudu/util0% | 1% | 5% | 17% | 75%
src/kudu/rpc0% | 2% | 9% | 22% | 65%
src/kudu/scripts0% | 20% | 16% | 14% | 49%
build-support/iwyu0% | 0% | 38% | 24% | 36%
src/kudu/common0% | 0% | 48% | 23% | 28%
src/kudu/security0% | 0% | 9% | 17% | 73%
build-support0% | 0% | 7% | 28% | 63%
src/kudu/tserver0% | 0% | 6% | 17% | 76%
src/kudu/server0% | 0% | 0% | 37% | 62%
src/kudu/thrift0% | 0% | 0% | 30% | 69%
src/kudu/experiments0% | 0% | 0% | 41% | 58%
src/kudu/clock0% | 0% | 0% | 12% | 87%
src/kudu/kserver0% | 0% | 0% | 0% | 100%
www0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
167 66 5
166 55 5
100 49 7
168 46 0
150 43 5
130 42 3
173 37 3
105 35 1
199 34 3
74 33 4
159 33 5
176 32 0
128 31 0
97 29 0
155 28 1
134 28 2
71 28 3
111 27 7
118 27 12
152 26 6
107 26 3
127 26 2
86 26 1
57 25 5
38 25 7
54 25 5
40 25 3
54 23 3
90 23 3
131 23 0
152 23 3
127 22 2
155 22 2
58 22 2
47 22 1
39 21 1
111 21 3
25 21 1
66 21 0
28 21 3
49 21 1
58 20 1
99 20 0
54 20 3
69 20 6
103 20 1
87 19 5
81 19 3
99 19 1
84 19 1