Skip to content

Add end-to-end acceptance on real collector containers, and cost/accuracy experiment tooling - #30

Merged
zzylol merged 1 commit into
mainfrom
feat/e2e-acceptance
Oct 19, 2026
Merged

zzylol merged 1 commit into
mainfrom
feat/e2e-acceptance

Conversation

@zzylol

@zzylol zzylol commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Part 8 of the telemetry-functions stack: the end-to-end acceptance, plus the tooling for experiments 1 and 2. The measured results come in the last PR of the stack.

deploy/telemetry-functions/acceptance.py

Runs all four use cases on the real collector containers: the sketch, exact and raw pipelines (18 stages) with Prometheus, Loki and loki-raw. It checks the sketch answers against the exact pipeline's ground truth through Prometheus and Loki, checks that every pipeline reports its window completion delay, prints PASS or FAIL per check, and exits non-zero on any failure.

To keep it to a few minutes per use case, time is scaled down 6×: 10-second windows, a 2-second grace (raised back to the deployed 5 s in #31, after the first real CI run showed sketches arriving later than 2 s on a shared 4-CPU runner), changes at second 100, and growth 6× faster. Rules counted in windows (baselines, thresholds) are as deployed. Comparisons are pinned to one window answered by both methods, with PromQL's @ modifier.

Result on a 56-core x86 server: 29/29 checks passed.

Use case Checks (all passed)
all four 18/18 stages up; 400,000 points in every window, the full offered rate; sketch and exact windows hold identical point counts; every pipeline reports its window completion delay
latency exact p50/p99 inside the sketch's bound: 40/40
cardinality sketch and exact give every key the same class (user.id identifier-like, k8s.pod.name growing, http.route and http.method stable); distinct error ≤ 1.13%; class events in Loki
drift route-3 drift detected by both methods (KS 0.33); no other route flagged; drift event in Loki
top-k /new/hot-route in both top-10s; recall@10 = 1.00; novelty event in Loki

Window completion delay (10-second windows, 5 s merge grace): sketch 5.2–5.6 s and exact 5.2–5.7 s in every use case. The raw pipeline's rate is reported, not required, because whether it keeps up is what it measures: it delivered every point with 4.6 s (latency), 9.6 s (drift) and 14.7 s (top-k), but for cardinality loki-raw stored only about 190,000 of 400,000 points per window, 39 s late, since every user.id is new to it.

Informational, not a pass condition: with 10-second windows, the p99 relative error for routes with ≥ 20,000 points reached 12.8%. That is KLL's rank error in a log-normal tail (see #25).

experiments.py and report_experiments.py

  • pipelines: the three pipelines side by side over offered rates, fed identical points: CPU and memory of each stage, points delivered per second and window completion delay per pipeline. The raw branch only forwards points, so the sketch branch's CPU minus the raw branch's is the cost of the function.
  • accuracy-size: error against exact as KLL k and Count-Min width change (100,000 keys), with the bytes merge receives per window.
  • report_experiments.py turns the CSVs into a Markdown report with tables and a figure.

Also includes PIPELINES/COMMON and the published Loki port in compose, run.sh --build-only, and a README covering every use case.

cargo fmt --check, cargo clippy ... -D warnings and cargo test --features otap-engine,stream-benchmark pass at this PR's head.

@zzylol
zzylol force-pushed the feat/e2e-acceptance branch from 9a62ef4 to ff1cc27 Compare October 13, 2026 00:20
@zzylol
zzylol force-pushed the feat/merge-bench branch 2 times, most recently from 3191eeb to 81a2f89 Compare October 19, 2026 02:31
@zzylol
zzylol force-pushed the feat/e2e-acceptance branch 2 times, most recently from 70b60ab to 2f1564b Compare October 19, 2026 14:57
@zzylol
zzylol force-pushed the feat/e2e-acceptance branch 2 times, most recently from deaf7ed to 9906188 Compare October 19, 2026 20:15
@zzylol
zzylol force-pushed the feat/e2e-acceptance branch from 9906188 to 184bf71 Compare October 19, 2026 20:16
@zzylol
zzylol force-pushed the feat/merge-bench branch 2 times, most recently from 1576e2d to c261c17 Compare October 19, 2026 20:16
@zzylol
zzylol force-pushed the feat/e2e-acceptance branch from 184bf71 to 093aa7b Compare October 19, 2026 20:16
@zzylol
zzylol force-pushed the feat/e2e-acceptance branch 2 times, most recently from 16fa6ad to ae85b5d Compare October 19, 2026 20:17
@zzylol
zzylol force-pushed the feat/merge-bench branch 2 times, most recently from 523dbff to 9cf249a Compare October 19, 2026 20:17
@zzylol
zzylol force-pushed the feat/e2e-acceptance branch from ae85b5d to 3aed20f Compare October 19, 2026 20:17
@zzylol
zzylol force-pushed the feat/e2e-acceptance branch from 3aed20f to d284043 Compare October 19, 2026 20:18
@zzylol
zzylol force-pushed the feat/e2e-acceptance branch from d284043 to 5f11337 Compare October 19, 2026 20:18
acceptance.py runs each use case (latency, cardinality, drift, top-k) on the
real collector containers with time scaled 6x and checks sketch answers
against the exact pipeline's ground truth through Prometheus and Loki: every
stage up, full rate delivered, identical points per window, bounds containing
the exact answer, classes, drift and novelty detected with no false
positives, events in Loki, and a window completion delay from each of the
three pipelines. Exits non-zero on any failure. experiments.py pipelines runs
the sketch, exact and raw pipelines side by side over offered rates (CPU,
memory, delivered rate, delay per pipeline); experiments.py accuracy-size
measures error vs sketch size (KLL k, Count-Min width).
@zzylol
zzylol force-pushed the feat/e2e-acceptance branch from 5f11337 to 3f5525f Compare October 19, 2026 20:18
@zzylol
zzylol changed the base branch from feat/merge-bench to main October 19, 2026 20:19
@zzylol
zzylol merged commit d0f11d1 into main Oct 19, 2026
@zzylol
zzylol deleted the feat/e2e-acceptance branch October 19, 2026 20:20
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