Repository navigation
Description
Context
Follow-up bench from PR #1228 review (item 1 in coverage gaps). The query planner's weighted-width gate (memory: mem:fact-01kmt5bw0782hg138vkahvnha3) and fused star-path selection (memory: mem:fact-01kmt9rs6m9d4rxt2ges55teq1) drove ~176×–933× perf wins recently. A regression in analyze_property_join_plan would not be caught by query_hot_bsbm unless the wins were end-to-end-visible — by which point the regression has already shipped to production.
Scope
Add fluree-db-api/benches/query_hot_property_join.rs (or a more focused location under fluree-db-query/benches/ if the bench can avoid the full Fluree stack) covering the analyze_property_join_plan decision boundary. Specifically:
- Inputs that fall on either side of the weighted-width thresholds (2.0 / 3.0 / 4.0). The bench should construct datasets that deterministically produce widths just below and just above each threshold so a regression that flips the gate's decision is detectable.
- A scenario per gate output: "wide-row property-join chosen", "fused star-path chosen", "fallback nested-loop chosen". Whatever the planner emits today is the baseline; the bench locks it in.
- Use the chassis pattern.
fluree_bench_support::gen::*for datasets;bench_runtime()/current_profile()/current_scale()for env-driven sizing;next_ledger_alias()for unique aliases per iteration. Register a budget inregression-budget.jsonfor(crate, query_hot_property_join).
Acceptance
- Bench compiles and runs
--testgreen attinyscale. -
regression-budget.jsonhas an entry under the appropriate crate. -
BENCHMARKING.md's "Current benches" table gets a row. - If the bench introduces a new category, add a row to
docs/contributing/benches.md. - Bench-gate CI job picks it up via the existing
cargo bench --workspace -- --teststep.
References
- PR Workspace-Wide Benchmarking Foundation #1228 review (
pr-1228-review.mdin repo or comment thread): coverage gap#1. - Memory:
mem:fact-01kmt5bw0782hg138vkahvnha3(planner weighted-width gate),mem:fact-01kmt9rs6m9d4rxt2ges55teq1(fused star-path selection). - Chassis docs:
BENCHMARKING.md,docs/contributing/benches.md,fluree-bench-support/README.md.
Out of scope
This is a targeted regression bench, not a planner correctness suite. Correctness is owned by the existing integration tests; this bench locks in the perf decisions only.
Activity
address PR review feedback (1228): fix vector_math determinism, retro…
aaj3f commentedon Aug 25, 2026
Sweep re-verification at
47e96b7b6: still undelivered — no bench targetsanalyze_property_join_plan; the nearest coverage isquery_overlay_matrix'sstarscenario, which is macro-level, not the boundary. And the ask has gotten more valuable, not less: 43 commits have touchedwhere_plan.rssince this was filed.Updating the body to match current code: the 2.0/3.0/4.0 threshold trio is gone — it's a single
PROPERTY_JOIN_MIN_WIDTH_SCORE = 3.0(where_plan.rs:854), and the gate's output space is now {property-join, fused star-path, fallback} driven by width + selective-anchor + eligibility. The unit tests atwhere_plan.rs:4513-4576already pin the score math, so the bench should focus on the perf cliff between chosen plans, not the arithmetic. (Also dropping the stalemem:fact-*references — those were session-local and aren't readable by anyone picking this up.)