facebookincubator / velox
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 7,446 units with 84,711 lines of code in units (60.6% of code).
    • 0 very complex units (0 lines of code)
    • 18 complex units (2,180 lines of code)
    • 211 medium complex units (12,565 lines of code)
    • 584 simple units (18,262 lines of code)
    • 6,633 very simple units (51,704 lines of code)
0% | 2% | 14% | 21% | 61%
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
cpp0% | 3% | 17% | 24% | 53%
h0% | <1% | 9% | 15% | 74%
py0% | 0% | 14% | 27% | 58%
c0% | 0% | 0% | 33% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
velox/dwio0% | 4% | 21% | 22% | 52%
velox/exec0% | 4% | 14% | 23% | 57%
velox/functions0% | 1% | 8% | 24% | 65%
velox/expression0% | 5% | 19% | 18% | 57%
velox/type0% | 5% | 25% | 13% | 55%
velox/experimental0% | 3% | 11% | 10% | 73%
velox/vector0% | 0% | 15% | 26% | 58%
build/fbcode_builder0% | 0% | 13% | 26% | 59%
velox/common0% | 0% | 7% | 19% | 73%
velox/duckdb0% | 0% | 27% | 18% | 53%
velox/serializers0% | 0% | 24% | 26% | 49%
velox/substrait0% | 0% | 38% | 24% | 37%
scripts0% | 0% | 18% | 36% | 45%
velox/parse0% | 0% | 21% | 14% | 63%
velox/connectors0% | 0% | 12% | 19% | 68%
velox/row0% | 0% | 1% | 20% | 78%
velox/buffer0% | 0% | 0% | 16% | 83%
velox/benchmarks0% | 0% | 0% | 9% | 90%
velox/core0% | 0% | 0% | 2% | 97%
velox/codegen0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
139 48 0
202 45 4
165 41 3
91 38 5
153 38 2
120 38 1
129 35 6
63 34 2
112 29 0
92 28 3
206 28 10
102 28 4
146 27 3
52 27 3
119 26 3
105 26 0
73 26 0
111 26 4
87 25 3
73 25 4
72 25 5
80 25 0
76 25 4
120 24 6
84 24 4
71 24 1
87 24 8
118 23 2
67 23 1
95 23 3
76 23 3
70 23 1
113 22 1
113 22 3
138 22 6
79 22 2
65 22 1
48 22 1
62 22 1
76 21 3
68 21 1
137 21 2
87 20 4
82 20 0
71 20 5
48 19 2
93 19 6
48 19 3
68 19 1
71 19 0