pub fn pipe_transfer_report(
achieved_rps: f64,
pipe_transfer_bytes: usize,
nr_workers: usize,
) -> PipeTransferReportExpand description
Pipe-mode (-p) throughput reporting used by the ktstr-schbench-validate
driver to mirror schbench’s avg worker transfer line; clamps the transfer
size + scales bytes/sec exactly like schbench (schbench.c:1979-1982). Not in
the prelude (validation-tool surface, like StandaloneReport).
Derive the pipe-mode avg worker transfer line from a run’s aggregate
achieved_rps (completed cycles/sec over the true elapsed window), the
requested pipe_transfer_bytes, and the resolved nr_workers. The figure is
PER WORKER: schbench divides by loop_runtime = Σ each worker’s runtime
(schbench.c:1697 sums worker->runtime; :1942-1943/:1979 divide by it),
and Σ worker runtimes ≈ nr_workers * elapsed, so the per-worker rate is the
aggregate achieved_rps / nr_workers — the label is literally “avg WORKER
transfer”. (Dividing the aggregate by wall-clock alone would over-report by
nr_workers×.) The transfer size is CLAMPED to PIPE_TRANSFER_BUFFER first —
the engine moves only the clamped size per cycle (run applies the same
.min()), matching schbench’s parse-time clamp (schbench.c:291-294) — so the
throughput reflects the bytes ACTUALLY moved. Scaling is schbench’s
pretty_size (schbench.c:1606). nr_workers is floored at 1 (no division by
zero).