Skip to content

asap-tools: generated2 ClickHouse SQL uses left-open windows; Prometheus 2.53 is closed #867

Open

Description

@milindsrivastava1997

datasets/fake_metric/generate_workloads.py (generated2, #837) filters range windows as ts > END - window AND ts <= END, i.e. (T−d, T]. That is Prometheus 3.0's convention. The bare-metal runs install Prometheus 2.53.2, whose range selectors are closed, [T−d, T]. With 1 s scrapes on whole seconds, a [1m] window reads 60 samples in ClickHouse and 61 in Prometheus, so sum/count/quantile differ and rate extrapolation (first_t, to_start) shifts.

#844's sketch_bench_workloads.py uses the closed window for its classic PromQL and checks it against a Prometheus 2.53 reference.

Fix: change > to >= in select() and extrapolated_rate(). generated2's ts is DateTime (seconds), so the DateTime64 pruning issue #844 works around doesn't apply. Results already collected with generated2 are affected.

Raised in review of #844.

🤖 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

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions