Skip to content

test(promql-compliance): split quantile suite, drop sparse-cadence fixtures - #737

Merged
milindsrivastava1997 merged 1 commit into
mainfrom
test/promql-compliance-quantile-dataset
Sep 23, 2026
Merged

milindsrivastava1997 merged 1 commit into
mainfrom
test/promql-compliance-quantile-dataset

Conversation

@milindsrivastava1997

Copy link
Copy Markdown
Contributor

Summary

  • New quantiles dataset and suite. ASAPQuery's KLL quantile returns an observed sample (nearest rank), while Prometheus interpolates between neighbours. On 5-sample windows or 6 series, that alone gave 6–15% differences. The new dataset keeps the neighbour spacing small:

    • quantile_dense: 1s cadence, 300 samples per 5m window, below the default KLL K=500.
    • quantile_wide: 120 series (3 jobs × 40 instances).

    A local simulation of both quantile rules gives a worst-case error of 0.5%, under the 1% tolerance, while p10 and p90 stay 17–25% apart, so a query that computed the wrong quantile still fails. All 31 quantile queries moved here from the aggregations suite.

  • Per-series scrape intervals in aggregations.yaml (60/30/20/15/12/10s). count_over_time is now distinct per series, so topk(count_over_time) no longer picks different tied series on each engine.

  • Removed sparse fixtures. For now we assume one data point per scrape interval. The sparse-cadence aggregations.yaml is deleted and the dense variant takes its name. sparse-checkout.yaml is deleted: its checkout_up series were never queried, and its host=b series moved to single-rate.yaml.

  • run-all now has 3 cases. The fixture validation test now checks both aggregations and quantiles (dataset and suite).

make run-all results

Case Passed
single-rate-temporal 1 / 1 ✅
quantiles 31 / 31 ✅
aggregations 42 / 47 ❌

The 5 aggregations failures are all aggregations over rate. ASAPQuery returns bad_data: No result for query for every instant and range evaluation of them, while plain rate(data[5m]) passes:

  • topk(3, rate(data[5m]))
  • topk by (job) (3, rate(data[5m]))
  • topk by (job, instance) (3, rate(data[5m]))
  • sum by (job) (rate(data[5m]))
  • sum by (job, instance) (rate(data[5m]))

These look like an engine or planner gap, not a test issue. They will be tracked separately.

🤖 Generated with Claude Code

…xtures

- Move quantile queries to a new quantiles suite on a dense (1s) and wide
  (120-series) dataset so nearest-rank vs interpolated quantiles differ by
  less than the 1% tolerance.
- Give each aggregations series a distinct scrape interval (60s..10s) so
  topk(count_over_time) has no ties.
- Remove the sparse-cadence aggregations fixture and sparse-checkout; the
  dense dataset becomes aggregations.yaml and host=b moves to single-rate.
- Add new aggregation query shapes (topk/sum over rate, quantile ratios).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@milindsrivastava1997
milindsrivastava1997 merged commit 174a154 into main Sep 23, 2026
1 check passed
@milindsrivastava1997
milindsrivastava1997 deleted the test/promql-compliance-quantile-dataset branch September 23, 2026 18:07
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