Skip to content

Wind tunnel infrastructure: design, harness, and Criterion benchmarks - #10

Merged
nnunley merged 3 commits into
forest-rs:mainfrom
nnunley:wind-tunnel
Jun 10, 2026
Merged

Wind tunnel infrastructure: design, harness, and Criterion benchmarks#10
nnunley merged 3 commits into
forest-rs:mainfrom
nnunley:wind-tunnel

Conversation

@nnunley

@nnunley nnunley commented May 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the wind tunnel — the Phase 2 performance-measurement foundation: a deterministic synthetic corpus generator plus Criterion benchmarks over the existing Phase 1 search stack, across indexing and all five query execution paths. This is the baseline all later Phase 2 performance work measures against.

What's included

  • Design doc (docs/2026-05-04-wind-tunnel-infrastructure-design.md) — the infrastructure spec.
  • leit_wind_tunnel (harness, publish = false) — deterministic CorpusGenerator (seeded rapidhash::v1, byte-identical from a seed), Zipfian vocabulary (s=1.0, 500 words, CDF + binary search), and query fixtures (single-term / OR / AND / fielded / BM25F cross-field).
  • leit_wind_tunnel_index + leit_wind_tunnel_query (Criterion bench crates, publish = false) — indexing throughput (index_build/{1k,10k}) and query latency across the five execution paths at 1K/10K corpus sizes. Index built once outside the timed region; ExecutionWorkspace reused across iterations.

Dependency & CI isolation

  • Criterion lives only in the two bench crates' [dev-dependencies]; the primary crates and leit_benchmark are unchanged (no Criterion in their graphs).
  • Dependencies are classified by usage site (library/binary code → [dependencies]; test/bench-only → [dev-dependencies]).
  • The three wind-tunnel crates are std-only (Criterion + the in-memory index builder), so they're excluded from the no_std/wasm CI jobs and the local clippy-no-std.sh hook, mirroring leit_benchmark.

Testing

  • 17 harness unit tests (determinism, doc counts, token ranges, Zipfian skew, fixture hits).
  • cargo bench -p leit_wind_tunnel_index / -p leit_wind_tunnel_query produce Criterion statistical output + HTML reports.
  • CI runs the unit tests but not the benchmarks (too slow/noisy for CI); benches are manual / dedicated-job.

…paths)

Completes ITER-0000 walking skeleton (T6-T9) atop the leit_wind_tunnel
harness:

- leit_wind_tunnel_index: index_build/{1k,10k} indexing-throughput benches
- leit_wind_tunnel_query: five execution paths (single/OR/AND/fielded +
  BM25F cross-field) x {1k,10k}, index built once outside the timed region,
  ExecutionWorkspace reused across iterations
- Criterion isolated to the two bench crates (dev-dependencies only);
  primary crates and leit_benchmark untouched
- CI: exclude the three wind-tunnel crates from the no_std/wasm jobs
  (std-only, mirroring leit_benchmark); no cargo bench step added
- harness docs: note the relationship to leit_benchmark (smoke test vs
  performance lab)
@nnunley
nnunley merged commit b1ac00b into forest-rs:main Jun 10, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant