Commit 99f9bf3
committed
fix(bench): add bench-store CLI subcommand and fill ADR with real vscode measurement
The prior apply batch archived the phase-3 store evaluation claiming a
bench-store CLI existed, but it did not. R2 (vscode corpus) and R3
(≤6min SLO) were therefore never verifiable from the CLI. This commit
remediates that gap.
Added: src/cli/bench_store.rs — clap subcommand that wires
run_store_benchmark to the CLI. Flags: --corpus, --corpus-config,
--backend (sqlite-vec | lancedb, feature-gated), --slo-secs,
--output (toml | json), --mock-embedder, --query-sample. Reuses the
shared build_corpus() from benchmark.rs (now pub) — no corpus-parsing
duplication. SLO violation exits with code 75 (EXIT_SLO_VIOLATION) so
CI can detect regressions without parsing the JSON payload.
Bench harness change (src/bench/store_bench.rs): query_sample_size is
now a parameter on run_store_benchmark. Pass 0 to skip the query phase
entirely. Required because the O(N) brute-force sqlite-vec KNN takes
>20 min for 100 queries against 14K vscode vectors — the SLO is on
indexing_secs, not on query wall-clock.
Real vscode measurement (2026-06-21, default release, sqlite-vec, mock
embedder for store isolation):
- indexing_secs: 3.15 (SLO ≤360 → PASS)
- files_indexed: 2138
- chunks_created: 14863
- peak_rss_bytes: 213 MB
- disk_size_bytes: 60 MB
- query latency: O(N) brute-force — 1.55s p50/p95 on 1,668-vector
subset; full vscode extrapolation ~14s/query. Documented in ADR as
a real follow-up (not a re-evaluation trigger).
- LanceDB column: NOT MEASURED — LanceStore is an in-memory shim
(pilar 2 reproducibility; no shim numbers published as LanceDB).
Tests: 739 passing (up from 722). 17 new tests in src/cli/bench_store.rs
cover arg parsing, backend round-trip, output format validation, and
SLO exit-code constants. Two new tests in store_bench.rs cover the
query_sample_size parameter. CI gates green: cargo test, cargo clippy
-D warnings, cargo fmt --check.
ADR 0001 updated with real numbers, LanceDB-honesty note, query-latency
follow-up section, and refreshed verification block.
No push (per task constraint).1 parent c13753c commit 99f9bf3
6 files changed
Lines changed: 564 additions & 40 deletions
File tree
- docs/adr
- src
- bench
- cli
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
| 88 | + | |
| 89 | + | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | | - | |
107 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
108 | 139 | | |
109 | 140 | | |
110 | 141 | | |
| |||
128 | 159 | | |
129 | 160 | | |
130 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
131 | 201 | | |
132 | 202 | | |
133 | 203 | | |
| |||
153 | 223 | | |
154 | 224 | | |
155 | 225 | | |
156 | | - | |
| 226 | + | |
157 | 227 | | |
158 | 228 | | |
159 | 229 | | |
160 | 230 | | |
| 231 | + | |
| 232 | + | |
161 | 233 | | |
162 | 234 | | |
163 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
114 | | - | |
115 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
116 | 127 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
122 | 133 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
129 | 140 | | |
130 | | - | |
| 141 | + | |
| 142 | + | |
131 | 143 | | |
132 | 144 | | |
133 | 145 | | |
| |||
141 | 153 | | |
142 | 154 | | |
143 | 155 | | |
144 | | - | |
| 156 | + | |
145 | 157 | | |
146 | 158 | | |
147 | 159 | | |
| |||
263 | 275 | | |
264 | 276 | | |
265 | 277 | | |
266 | | - | |
| 278 | + | |
267 | 279 | | |
268 | 280 | | |
269 | 281 | | |
| |||
283 | 295 | | |
284 | 296 | | |
285 | 297 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
| 298 | + | |
290 | 299 | | |
291 | 300 | | |
292 | 301 | | |
293 | 302 | | |
294 | 303 | | |
295 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
296 | 325 | | |
297 | 326 | | |
298 | 327 | | |
| |||
0 commit comments