Commit d3ff1f1
[claude] feat(bench): emit v3 JSONL records and dual-write to bench server (#7780)
## Summary
Prototype website:
http://ec2-18-219-54-101.us-east-2.compute.amazonaws.com:3000/
This is the first step we should make before we cut over to the new
benchmarks website on #7643
This PR allows the CI actions to additionally post data to a server (on
my EC2 instance for now). We want to check that this actually works
before we start using this for all of our CI.
Note that this does NOT change how the current benchmarks website works,
as this just does a few extra things on top of that.
Also for reviewers, even though this looks like 1k LoC I think the logic
here is not that hard to review, a lot of this is boilerplate you can
skim over.
Below is a bunch of AI-generated description: read at your own
discretion.
<details>
Brings the v3 emitter and CI dual-write plumbing from `ct/benchmarks-v3`
onto `develop` **without** the v3 server/website code. CI continues to
write v2 results to S3 unchanged; v3 ingest is a side channel that
no-ops until the deploy track sets `vars.V3_INGEST_URL`.
This is item 2 ("CI ingestion wiring") of the v3 production-readiness
checklist in
[`benchmarks-website/planning/README.md`](https://github.com/vortex-data/vortex/blob/ct/benchmarks-v3/benchmarks-website/planning/README.md).
The v3 website itself ships in a separate PR off `ct/benchmarks-v3` once
dual-write is verified healthy in production.
### What's included
**Rust emitter (`vortex-bench`)**
- New `vortex-bench/src/v3.rs`: one record per `kind`
(`query_measurement`, `compression_time`, `compression_size`,
`random_access_time`, `vector_search_run`) plus a serde-tagged
`V3Record` enum, JSONL writer, and `insta` snapshot tests. Field shapes
match
[`02-contracts.md`](https://github.com/vortex-data/vortex/blob/ct/benchmarks-v3/benchmarks-website/planning/02-contracts.md).
- `Dataset::v3_dataset_dims()` (default `(name(), None)`) lets Public-BI
map to `(public-bi, <subset>)`.
- `compress` and `runner` capture per-iteration timings and provide
`SqlBenchmarkRunner::v3_records()`.
**Benchmark binaries**
- `compress-bench`, `datafusion-bench`, `duckdb-bench`, `lance-bench`,
`random-access-bench`, `vector-search-bench` all gain `--gh-json-v3
<path>`. Bare records, no envelope. The legacy `-d gh-json -o ...` flow
is untouched.
**`bench-orchestrator`**
- `vx-bench run --gh-json-v3 <path>` plumbs the flag through to the
underlying benchmark binary.
**`scripts/post-ingest.py`** (Python 3, stdlib only)
- Reads JSONL, fills the `commit` envelope from `git show`, wraps in
`{run_meta, commit, records}`, POSTs to `/api/ingest` with
`Authorization: Bearer ${INGEST_BEARER_TOKEN}`. Exits non-zero on
4xx/5xx. No retry/spool — deferred.
**Workflows**
- `.github/workflows/bench.yml` and `sql-benchmarks.yml` add
`--gh-json-v3 results.v3.jsonl` to the bench runs and a follow-up
"Ingest results to v3 server" step.
- New `.github/workflows/v3-commit-metadata.yml` POSTs an empty envelope
on every push to `develop` so the v3 `commits` dim stays populated even
when no benchmark ran.
### What's NOT included (intentionally)
- Anything under `benchmarks-website/` — the v2 React/Node app stays in
production unchanged.
- Workspace member additions for `benchmarks-website/server` and
`benchmarks-website/migrate` — those crates don't exist on `develop`
yet.
- `.github/workflows/ci.yml` and `publish-bench-server.yml` changes —
they reference `vortex-bench-server`, which is also v3-server-only.
## Risk
**Zero.** The v3 ingest step is gated on `vars.V3_INGEST_URL != ''` and
`continue-on-error: true`. If the V3 server is down, the variable is
unset, or the bearer secret is missing, the workflow no-ops and the v2
path keeps writing to S3 unchanged. The Rust emitter writes JSONL to a
local file only; no network egress from the binaries themselves.
## Verify
A CI run on this branch should show the new "Ingest results to v3
server" step running and POSTing successfully to the EC2 host at
`vars.V3_INGEST_URL`.
## Follow-up
The v3 website itself (server, migrator, web UI) ships in a separate PR
off `ct/benchmarks-v3` once dual-write is verified healthy in
production. Outbox-style retry on failed POSTs is also a follow-up — not
built until we observe a failure in the wild.
## Test plan
- [x] `cargo build -p vortex-bench` — clean.
- [x] `cargo nextest run -p vortex-bench` — 49/49 pass, including 7 new
v3 snapshot tests.
- [x] `cargo build -p compress-bench -p datafusion-bench -p duckdb-bench
-p lance-bench -p random-access-bench -p vector-search-bench` — clean.
- [x] All six benchmark binaries print `--gh-json-v3 <GH_JSON_V3>` in
`--help`.
- [x] `python3 scripts/post-ingest.py --help` — clean.
- [x] `pytest bench-orchestrator/tests/test_executor.py` — 5/5 pass,
including 2 new `gh_json_v3` tests.
- [x] `cargo +nightly fmt --all` — no diff.
- [x] `cargo clippy --all-targets --all-features -p vortex-bench` —
clean.
- [x] `cargo clippy --all-targets -p compress-bench -p datafusion-bench
-p lance-bench -p random-access-bench -p vector-search-bench` — clean.
`duckdb-bench` skipped (transitively triggers a pre-existing
`cognitive_complexity` lint in `vortex-duckdb/src/convert/expr.rs:47`,
present on `develop` and unrelated to these changes).
- [x] `yamllint --strict -c .yamllint.yaml` on the three changed/new
workflow files — clean.
- [x] `./scripts/public-api.sh` — N/A. All touched Rust crates have
`publish = false`.
- [ ] Real round-trip against the EC2 host — verifies once this branch
triggers a CI bench run with `V3_INGEST_URL` set.
---
_Generated by [Claude
Code](https://claude.ai/code/session_0154XbxhgQztmbrQfJ4ZSxVo)_
</details>
---------
Signed-off-by: Claude <noreply@anthropic.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent e0a0527 commit d3ff1f1
30 files changed
Lines changed: 1470 additions & 7 deletions
File tree
- .github/workflows
- bench-orchestrator
- bench_orchestrator
- runner
- tests
- benchmarks
- compress-bench/src
- datafusion-bench/src
- duckdb-bench/src
- lance-bench/src
- random-access-bench/src
- vector-search-bench/src
- scripts
- vortex-bench
- src
- compress
- datasets
- snapshots
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
108 | 121 | | |
109 | 122 | | |
110 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
| |||
395 | 396 | | |
396 | 397 | | |
397 | 398 | | |
| 399 | + | |
398 | 400 | | |
399 | 401 | | |
400 | 402 | | |
| |||
499 | 501 | | |
500 | 502 | | |
501 | 503 | | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
502 | 517 | | |
503 | 518 | | |
504 | 519 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
118 | 151 | | |
119 | 152 | | |
120 | 153 | | |
| |||
210 | 243 | | |
211 | 244 | | |
212 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
213 | 250 | | |
214 | 251 | | |
215 | 252 | | |
| |||
276 | 313 | | |
277 | 314 | | |
278 | 315 | | |
279 | | - | |
280 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
281 | 323 | | |
282 | 324 | | |
| 325 | + | |
283 | 326 | | |
284 | 327 | | |
285 | 328 | | |
| |||
294 | 337 | | |
295 | 338 | | |
296 | 339 | | |
| 340 | + | |
297 | 341 | | |
298 | 342 | | |
299 | 343 | | |
| |||
302 | 346 | | |
303 | 347 | | |
304 | 348 | | |
| 349 | + | |
| 350 | + | |
305 | 351 | | |
306 | 352 | | |
307 | 353 | | |
| |||
310 | 356 | | |
311 | 357 | | |
312 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
313 | 362 | | |
314 | 363 | | |
315 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
| |||
128 | 132 | | |
129 | 133 | | |
130 | 134 | | |
| 135 | + | |
131 | 136 | | |
132 | 137 | | |
133 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
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 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
51 | 76 | | |
52 | 77 | | |
53 | 78 | | |
| |||
0 commit comments