Skip to content

[bench] Property-join planner regression bench (analyze_property_join_plan boundaries) #1229

@aaj3f

Description

@aaj3f

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 in regression-budget.json for (crate, query_hot_property_join).

Acceptance

  • Bench compiles and runs --test green at tiny scale.
  • regression-budget.json has 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 -- --test step.

References

  • PR Workspace-Wide Benchmarking Foundation #1228 review (pr-1228-review.md in 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions