Repository navigation
eval: PromQL and metrics for end-to-end runs in classic tables (#204 P2) - #208
Merged
Merged
Conversation
export_autosketch_eval_table.py --synthetic adds workloads[0].e2e to classic tables: each PromQL query with its repeat interval and the RQEs it reads (template 10's ratio reads two), and the metrics to generate (gauge data, counter data_total; job and label_0 child_of job). The runner does not read it, so the RQEs and the committed plans are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
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.
Before this PR
The workload tables in
rqe-optimizer/results/autosketch-vs-asap-hydra/inputs/tables/are built as RQEs directly. They name queries (sum_by_job) but have no PromQL, and they don't say which metrics and labels to generate. ASAPQuery can't run a saved plan end to end without both (ProjectASAP/ASAPQuery#824).After this PR
export_autosketch_eval_table.py --syntheticaddsworkloads[0].e2eto every classic table:e2e.queries: one{promql, interval_secs, rqes}per query and repeat interval. Template 10's ratioquantile_over_time(0.9, data[w]) / quantile_over_time(0.5, data[w])reads two RQEs. Classic base: 54 queries over 50 RQEs.e2e.metrics: gaugedata(sums, quantiles, top-k by sum) and counterdata_total(rates), ordata_i/data_i_totalin the metric copies. Labels use theschemasformat:job(10) andlabel_0(1,000 per job,child_of: job, so 1e4 series), plus 200 samples/s per series and each stream's value shape.The runner does not read
e2e. The existingschemasand per-RQEgroupingfields are not reused, because the runner reads them and they would allow roll-ups and change the plans.plans/still match them, and each keeps itssketch_bench_revision. The pre-commit hook added a trailing newline to each.rqe-optimizer/README.mddocuments the block.alltables get no block: those templates have no PromQL yet.ASAPQuery#824 builds its
ControllerConfigfrome2eand usese2e.queriesto link its RQEs to the plan's RQE ids.Note: in the r = 8 table, 47 PromQL strings repeat at more than one interval and read different RQEs. ASAPQuery's inference config is keyed by query string, so #824 B2 refuses them. The base table has none.
Closes P2 of #204.
Example
Excerpt of
workloads[0].e2einsynthetic-templatesclassic-shared1.json: 4 of the 54 queries (a spatial sum, a rate, a top-k and template 10's ratio, which reads two RQEs) and both metrics in full. View the whole block withjq '.workloads[0].e2e' <table>.{ "queries": [ { "interval_secs": 1, "promql": "sum by (job) (data)", "rqes": [ "synthetic/templates=classic/shared=1/sum_by_job/keys/1s" ] }, { "interval_secs": 60, "promql": "topk(32, sum by (label_0) (sum_over_time(data[15m])))", "rqes": [ "synthetic/templates=classic/shared=1/topk32_sum_by_label0_sum_over_time/keys/15m" ] }, { "interval_secs": 60, "promql": "sum by (job) (rate(data_total[15m]))", "rqes": [ "synthetic/templates=classic/shared=1/sum_by_job_rate/keys/15m" ] }, { "interval_secs": 60, "promql": "quantile_over_time(0.9, data[15m]) / quantile_over_time(0.5, data[15m])", "rqes": [ "synthetic/templates=classic/shared=1/quantile_over_time_p0.9/values/15m", "synthetic/templates=classic/shared=1/quantile_over_time_p0.5/values/15m" ] } ], "metrics": { "data": { "labels": [ { "cardinality": 10, "name": "job" }, { "cardinality": 1000, "child_of": "job", "name": "label_0" } ], "samples_per_sec_per_series": 200, "type": "gauge", "values": { "dist": { "pareto": 2 }, "value": { "keys": 10000, "zipf": 1.1 } } }, "data_total": { "labels": [ { "cardinality": 10, "name": "job" }, { "cardinality": 1000, "child_of": "job", "name": "label_0" } ], "samples_per_sec_per_series": 200, "type": "counter", "values": { "increment": { "keys": 10000, "zipf": 1.1 } } } } }Validation
python3 scripts/test_export_autosketch_eval_table.py: 26 tests pass. New: every classic RQE is read by a query and no query names an unknown RQE, the 54-query count, template 10's ratio, intervals, and the block's presence and metrics per table. The byte-for-byte test against the older committed tables ignorese2e.--syntheticregenerates all 12 committed tables andplan.tsvexactly; after it, they match apart frome2e.🤖 Generated with Claude Code