Skip to content

feat(asap-tools): generate the paced feeder's data from a workload table - #842

Open
zzylol wants to merge 3 commits into
fix/paced-feeder-tick-windowfrom
feat/paced-feeder-facts
Open

zzylol wants to merge 3 commits into
fix/paced-feeder-tick-windowfrom
feat/paced-feeder-facts

Conversation

@zzylol

@zzylol zzylol commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

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 FILE reads workloads[0].e2e.metrics and sends every metric in it, or one with --metric NAME. The existing --groups/--series-per-group mode is unchanged.

  • Labels: a label has cardinality values, or with child_of that many under each parent value. A child value names its parent (job="3", label_0="3.17"), so it is unique across parents. Labels without child_of form a cross product.
  • Values: the series of Zipf rank r is scaled by N·(r+1)^-θ / Σ_j (j+1)^-θ, so scales average 1. Ranks are a seeded shuffle, so heavy series spread across parents.
    • A gauge is scale_i · Pareto(a).
    • A counter is (n+1)·scale_i: stateless, strictly increasing, never resets.
    • Metrics are seeded per name, so two feeders with the same flags send identical data.
  • --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 under child_of ancestors), then exits without sending. It is non-zero on a mismatch.
  • ClickHouse: one table per metric, named after it, with columns ts, the labels in order, then value. The CREATE TABLE statements are in the README.
  • --samples-per-sec scales a run down.

Testing

  • Facts check on sketch-bench's classic table: job 10, label_0 10,000 and (job, label_0) 10,000 for both data and data_total; exit 0.
  • CloudLab (clnode109), ClickHouse 26.10, full rate, one feeder per metric, 10 s: 20M rows each. Every cardinality matches, and every label_0 sits under its job. The counter strictly increases per series with a constant increment. The 32 heaviest label_0 sums spread over all 10 jobs.
  • Prometheus 2.53 remote-write receiver, 10 samples/s: all 400 requests returned 204, with 0 out-of-order samples. Its [t−5s, t] sums match ClickHouse's on the same window.
  • ASAPQuery precompute_engine: all 20M samples arrived, and with allowed lateness 0 none was dropped as late.
  • Timing against a local stub, full rate (4e6 rows/s): about 0.33 s per tick for remote write and 0.25 s for ClickHouse.
  • 18 unit tests: fan-out, unique child values, cross product, facts check pass and fail, Zipf ranks and weights, counter monotonicity, sorted remote-write labels, RowBinary columns. fmt/clippy clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AnJ7LocWxguh3q4QWkCYae

zzylol and others added 3 commits October 13, 2026 01:40
`--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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant