anthropics / buffa
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 2,348 units with 30,555 lines of code in units (54.4% of code).
    • 1 very complex units (573 lines of code)
    • 5 complex units (589 lines of code)
    • 34 medium complex units (3,369 lines of code)
    • 67 simple units (3,131 lines of code)
    • 2,241 very simple units (22,893 lines of code)
1% | 1% | 11% | 10% | 74%
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
rs1% | 1% | 10% | 9% | 76%
py0% | 7% | 39% | 23% | 29%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
buffa-codegen5% | 1% | 21% | 15% | 55%
benchmarks0% | 10% | 19% | 16% | 52%
conformance0% | 24% | 0% | 1% | 73%
buffa-descriptor0% | 0% | 9% | 13% | 76%
buffa0% | 0% | 3% | 4% | 92%
protoc-gen-buffa0% | 0% | 0% | 26% | 73%
stress0% | 0% | 0% | 91% | 8%
scripts0% | 0% | 0% | 34% | 65%
buffa-types0% | 0% | 0% | <1% | 99%
buffa-test0% | 0% | 0% | 0% | 100%
buffa-yaml0% | 0% | 0% | 0% | 100%
buffa-build0% | 0% | 0% | 0% | 100%
fuzz0% | 0% | 0% | 0% | 100%
protoc-gen-buffa-packaging0% | 0% | 0% | 0% | 100%
buffa-smolstr0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
573 55 4
109 41 1
98 38 2
80 31 0
166 30 4
136 27 6
84 24 7
71 21 2
163 20 6
183 18 1
112 17 4
110 17 4
165 17 6
89 16 5
59 16 0
171 15 4
124 15 5
108 15 5
92 14 2
136 14 3
96 13 5
39 13 2
91 13 3
83 13 3
106 13 5
40 13 3
66 12 1
92 12 8
116 12 4
127 12 7
64 12 1
155 12 6
120 12 3
26 12 1
52 11 4
80 11 2
72 11 4
69 11 5
88 11 3
120 11 4
73 10 1
54 10 6
75 10 11
127 10 6
72 10 5
50 10 6
15 10 1
24 10 2
28 9 2
39 9 1