Repository navigation
feat(asap-tools): generate the paced feeder's data from a workload table - #842
Merged
Merged
Conversation
…n (t, t+1s] Remote write sent one sub-second slot at a time, so at most one request was in flight per slot. At 200 samples/s per series ASAPQuery's ingest took about 45 ms per 1e4-row request and the feeder reached only 0.2-0.27M rows/s. Each tick now goes out concurrently. Its samples sit in (t, t+1s], the same left-open interval as ASAPQuery's one-second windows, so the reordering within a tick never crosses a window boundary and stays within the allowed lateness. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnJ7LocWxguh3q4QWkCYae
`--workload-table FILE` reads `workloads[0].e2e.metrics` of a sketch-bench workload table and sends its gauge and counter metrics (or only `--metric`): labels with `child_of` fan out under their parent, the others form a cross product; series get Zipf scales from a seeded rank shuffle; gauges are scaled Pareto draws and counters grow by their scale per sample. `--verify-facts` checks, for every label subset, the distinct label-value tuples of the generated series against the description. The `--groups` workload sends the same bytes as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnJ7LocWxguh3q4QWkCYae
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnJ7LocWxguh3q4QWkCYae
…equest Concurrent requests split a tick by time slot, so a series' later sample could arrive first and ASAPQuery's increase accumulator, which reads samples in arrival order, took the lower counter value for a reset. A tick's rows are now series-major and requests are cut only between series (the batch size rounded down to whole series, at least one), so each series' samples of a tick arrive in one request in timestamp order; requests stay concurrent. Prometheus therefore needs no out-of-order window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnJ7LocWxguh3q4QWkCYae
Table-mode gauge and counter metrics are now series-major too: each metric's tick is cut into requests only between series, so a series' samples of a tick arrive in one request, in timestamp order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnJ7LocWxguh3q4QWkCYae
This was referenced Oct 14, 2026
Contributor
Code review
Tests: none cover findings 1–3. |
A tick straddling a 1s boundary can close a window before its other series' samples arrive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to feat/paced-feeder-facts
# Conflicts: # asap-tools/data-sources/paced-feeder/src/encode.rs # asap-tools/data-sources/paced-feeder/src/main.rs # asap-tools/data-sources/paced-feeder/src/workload.rs
milindsrivastava1997
changed the base branch from
fix/paced-feeder-tick-window
to
main
October 14, 2026 15:55
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.
Stacked on #840 (ticks sent concurrently, samples in
(t, t+1s]).Summary
The paced feeder can now generate its data from a sketch-bench #777 workload table, so an end-to-end run gets the data the optimizer assumed (#824 B4).
--workload-table FILEreadsworkloads[0].e2e.metricsand sends every metric in it, or one with--metric NAME. The existing--groups/--series-per-groupmode is unchanged.cardinalityvalues, or withchild_ofthat many under each parent value. A child value names its parent (job="3",label_0="3.17"), so it is unique across parents. Labels withoutchild_ofform a cross product.N·(r+1)^-θ / Σ_j (j+1)^-θ, so scales average 1. Ranks are a seeded shuffle, so heavy series spread across parents.scale_i · Pareto(a).(n+1)·scale_i: stateless, strictly increasing, never resets.--verify-facts: for every non-empty label subset it compares the generated series' distinct tuples with the expected cardinality (the product of fan-outs, closed underchild_ofancestors), then exits without sending. It is non-zero on a mismatch.ts, the labels in order, thenvalue. TheCREATE TABLEstatements are in the README.--samples-per-secscales a run down.Testing
job10,label_010,000 and(job, label_0)10,000 for bothdataanddata_total; exit 0.label_0sits under itsjob. The counter strictly increases per series with a constant increment. The 32 heaviestlabel_0sums spread over all 10 jobs.[t−5s, t]sums match ClickHouse's on the same window.precompute_engine: all 20M samples arrived, and with allowed lateness 0 none was dropped as late.🤖 Generated with Claude Code
https://claude.ai/code/session_01AnJ7LocWxguh3q4QWkCYae