Skip to content

feat(planner): infer label groups from series dataset - #697

Merged
milindsrivastava1997 merged 1 commit into
mainfrom
issue-693-dataset-cardinality
Sep 3, 2026
Merged

feat(planner): infer label groups from series dataset#697
milindsrivastava1997 merged 1 commit into
mainfrom
issue-693-dataset-cardinality

Conversation

@milindsrivastava1997

Copy link
Copy Markdown
Contributor

Summary

Implements #693, the offline dataset-backed path for inferring label-group cardinality N_g.

  • Adds a CSV series-inventory loader: one row per unique metric series, with a fixed metric column.
  • Derives per-metric schemas and per-profile distinct grouping counts after exact label filters.
  • Requires --dataset for the greedy optimizer CLI and fails loudly on missing metrics, labels, filters, empty matches, schema drift, duplicates, and unused columns.
  • Threads integer counts into candidates and applies them only to non-subpopulation-aware ingest/query costs.
  • Keeps dataset parsing separate from optimizer core so Optimizer: auto-infer N_g from Prometheus #525 can later supply an equivalent Prometheus-backed profile provider.

Verification

  • cargo fmt --all -- --check
  • cargo clippy -p asap_planner --all-targets -- -D warnings
  • cargo test --workspace (all tests passed)

Sketch-bench PR 123 adds explicit, bounded timestamped external trace adapters and metadata. It is complementary infrastructure; this PR consumes a static series inventory for planner cardinality and does not couple the planner to those trace formats.

Part of #525.

@milindsrivastava1997
milindsrivastava1997 marked this pull request as ready for review September 3, 2026 19:41
@milindsrivastava1997
milindsrivastava1997 merged commit d5b5b3b into main Sep 3, 2026
15 checks passed
@milindsrivastava1997
milindsrivastava1997 deleted the issue-693-dataset-cardinality branch September 3, 2026 19:42
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