Skip to content

Tracking: asap-planner query coverage for olly-bench #738

Description

@milindsrivastava1997

Track asap-planner-rs coverage of the olly-bench PromQL queries (benchmarks/metrics_observability/queries/olly-bench/handwritten_v2.txt).

Current status: 3 / 27 queries planned.

Method: each query planned individually with asap-planner --input_config ... --streaming_engine precompute --data-ingestion-interval-ms 15000, repetition_delay_ms: 60000, metric label hints job, instance, status, le, method, path. A query counts as planned if it appears in the generated inference_config.yaml.

Query buckets (handwritten_v2.txt)

Each query is placed in one bucket by its outermost blocker.

Bucket Count Lines Planned?
sum(rate), including by/offset 6 8, 14, 15, 19, 20, 22 no
Binary: sum(increase) / sum(increase), including offset 3 3, 4, 16 no
Binary sum(increase) ratio wrapped in topk/sort_desc 3 1, 2, 17 no
Subqueries (...)[6h:] 4 10, 13, 24, 27 no
topk(sum by (job) (rate)) 2 11, 26 no
topk(sum by (job) (metric)), a nested aggregation 1 12 no
topk(max_over_time), a nested aggregation 1 23 no
topk(sum(increase) / scalar(sum(increase))) 1 25 no
Comparison: sum(increase) > 0 1 18 no
histogram_quantile 1 21 no
Bare selector 1 7 no
max_over_time(metric[range]) 2 5, 6 yes
sum(metric) 1 9 yes

Coverage by capability added

Add support for Newly planned Cumulative
(today) lines 5, 6, 9 3 / 27
Nested aggregation only 12, 23 5 / 27
sum(rate) / sum(increase) only 8, 14, 15, 19, 20, 22, 3, 4, 16 12 / 27
Both above + 1, 2, 17, 11, 26 19 / 27

The rows above assume that the outer operator (topk, sort_desc) can run at query time on top of a planned inner result. That still needs to be checked against the query engine.

Still failing with both: subqueries (4), scalar() (1), comparison > 0 (1), histogram_quantile (1), bare selector (1).

Blocker notes

  • sum(rate) / sum(increase): rejected on purpose because the combination is non-collapsable (asap-planner-rs/src/planner/patterns.rs, test non_collapsable_combinations_are_rejected). It is the largest blocker: 15 of the 24 failing queries.
  • Subqueries: need the inner expression planned as a per-step sliding computation, with the outer *_over_time over that series.

Tasks

  • sum(rate) / sum(increase) support
  • Nested aggregation / query-time topk and sort_desc over planned results
  • Subqueries
  • scalar(), comparison operators, histogram_quantile, bare selectors

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions