Skip to content

Add CRUD and query benchmarks for core Rust operations - #1851

Merged
mstomar125 merged 1 commit into
mainfrom
wt-137-core-benches
Jul 31, 2026
Merged

mstomar125 merged 1 commit into
mainfrom
wt-137-core-benches

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

Closes #137.
Closes #157.

What

The core package had one Criterion bench (atomic ops, OCC, BM25, playbook) but no coverage of CRUD, query, JSON-path, or vector-search paths. Adds a second hermetic bench (benches/query_crud.rs) — the query group covers #157's ask (query_nodes_simple filters, mentioned_by, large result sets).

Notes

  • Bench-only: no product code changed; runs against a fresh tempfile store. Criterion was already a dev-dependency (existing performance bench); this adds a second [[bench]] target.
  • Full pre-push gate green.

The core package had one Criterion bench (atomic ops, OCC, BM25, playbook) but
no coverage of CRUD, query, JSON-path, or vector-search operations. Add a
second hermetic bench (query_crud) so those paths have regression coverage.

- CRUD: single insert, bulk insert (1000), update, delete, single get
- query: query_nodes_simple by type / content / large result set, and the
  mentioned_by mention-join at 10/100/500
- JSON-path: QueryService on the indexed node_type column vs a non-indexed
  json_extract property over the same corpus
- vector: search_embeddings (vec0 KNN) over precomputed pseudo-random unit
  vectors (no model load — stays hermetic)

Bench-only: no product code changed; runs against a fresh tempfile store.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@mstomar125

Copy link
Copy Markdown
Contributor Author

APPROVE — Bench-only change, no product code touched. Reviewed: hermetic (fresh tempfile store, no network/model — vector bench uses precomputed pseudo-random unit vectors), exercises the real APIs (create_mention→mentioned_by, search_embeddings vec0 KNN), covers both #137 (CRUD/vector/JSON-path) and #157 (query_nodes_simple filters + mentioned_by at scale). Criterion already a dev-dep; adds a second [[bench]] target. Full pre-push gate green.

@mstomar125
mstomar125 merged commit ed165eb into main Jul 31, 2026
2 checks passed
@mstomar125
mstomar125 deleted the wt-137-core-benches branch July 31, 2026 12:56
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.

Add performance benchmarks for query operations Add performance benchmarks for core Rust operations

1 participant