Repository navigation
feat(asap-tools): run generated2 PromQL workloads on ClickHouse - #837
Merged
Merged
Conversation
…nerated2 workloads Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e SQL configs Adds a client_options.simulated_start_time so templated SQL can be evaluated against bulk-loaded data with fixed timestamps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
added a commit
that referenced
this pull request
Oct 13, 2026
Brings in origin/main (#837, #828) and the switch to the table's ASAPQuery SQL. Conflicts resolved by keeping both sides: the module docstring keeps this branch's per-arm outputs with the new asapquery.sql line; the tests keep PlanViewsTest and FlooredEndDatetimeTest; experiment_run_clickhouse and its test import both _ingest_mode and #828's prebuilt-output helpers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnJ7LocWxguh3q4QWkCYae
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Runs the generated2 workloads (ASAPQuery vs Prometheus/VictoriaMetrics) as a standalone ClickHouse baseline, using SQL with the same semantics as Prometheus 2.53, instead of going through ASAPQuery's SQL support.
datasets/fake_metric/generate_data.py+init.sql: fake_exporter-equivalent data (zipf, valuescale 10000, 3 labels x 20 values, counter with one shared accumulator per instance, 1s scrapes).--num-instancessets the scale (1 = 1x, 10 = 10x).datasets/fake_metric/generate_workloads.py: maps the PromQL shapes used in generated2 to templated ClickHouse SQL and writes one baseline-onlyexperiment_run_clickhouse.pyconfig per workload (to the gitignoredconfig/experiment_type/generated2_clickhouse/). Unknown shapes raise an error.(T-1s, T]; range vectors[d]read(T-d, T].quantileExactInclusive, which interpolates the same way as Prometheusquantile.rate/increasereproduceextrapolatedRatefrom Prometheus 2.53. There is no counter-reset handling because the fake counters never reset.client_options.simulated_start_time. When set,{{ end_time }}advances on a clock anchored at the start of the bulk-loaded data rather than the wall clock. Pacing between repetitions is unchanged. A later paced-feeder run can drop this option and keep the same SQL.Testing
clickhouse-localand compared them against a separate Python implementation of the PromQL semantics. Every statement matched at 3 evaluation times, which together cover both rate-extrapolation branches, the zero clamp, and empty windows.simulated_start_timetogether withstarting_delay,repetition_delay_msandquery_time_offsetrenders the expectedend_time.🤖 Generated with Claude Code