pub fn populate_run_pooled_taobench(stats: &mut ScenarioStats)Expand description
Inject the whole-run taobench engine’s CPU-throughput + hit Rate components into
stats.ext_metrics, pooled across the run’s WorkType::Taobench cgroups.
Each cgroup carries its workers’ merged whole-run aggregate
(crate::assert::CgroupStats::taobench_whole); this folds those across
cgroups (Σ ops, MAX wall window, Σ client CPU — per TaobenchStats::merge)
and writes the total_taobench_* Counter components (ops, fast_ops,
slow_ops, wall_sec, cpu_sec, plus the command-time get_cmds /
get_hits), from which crate::stats::derive_rate_metrics derives the
CPU-SECOND-denominated taobench_total_ops_per_cpu_sec_whole,
taobench_fast_ops_per_cpu_sec_whole,
taobench_slow_ops_per_cpu_sec_whole (Σops / Σclient
CPU-sec — dilation-safe; wall reconstructs as rate / D or exactly as
Σops / total_taobench_wall_sec), the response-time
taobench_hit_fraction (Σfast/Σcompleted), and the command-time
taobench_command_hit_rate (Σhits/Σcmds). The whole-run Rate keys are
registered METRICS, so — unlike the per-phase
taobench_*_ops_per_cpu_sec
(MetricKind::PerPhase, invisible to the whole-run cross-run fold) — they
reach the perf-delta --noise-adjust spread analysis. The open-loop
serve-latency distribution is a SEPARATE pool
(populate_run_pooled_taobench_distribution, the *_us_whole keys).
MUST run post-merge (after every cgroup-bearing merge has populated
stats.cgroups), exactly like populate_run_pooled_iteration_rate:
an earlier run would pool over an incomplete cgroup set. A run with no
Taobench cgroup writes nothing (the pool is None) — the keys stay absent,
keeping a non-taobench run distinct from a measured zero.
Numerators are retained whenever a Taobench carrier exists. Wall and CPU
denominators are inserted independently only when positive, so a missing
wall window cannot suppress a valid CPU-denominated rate (and vice versa).
The three throughput Rates derive only with measured client CPU time;
taobench_hit_fraction =
total_taobench_fast_ops / total_taobench_ops derives iff ops completed
(total_taobench_ops > 0) and taobench_command_hit_rate =
total_taobench_get_hits / total_taobench_get_cmds iff lookups issued
(get_cmds > 0); derive_rate_metrics skips a zero-denominator rate, so a
window-but-no-ops run gets qps=0 keys but no false hit fraction / hit rate.
The ns→s /1e9 is applied ONCE here (not in derive_rate_metrics, a bare
num/den), mirroring total_cpu_time_sec. Cross-RUN the components SUM-fold
(Counter), so each Rate re-pools as Σnumerator / Σdenominator over the cohort
— the aggregate throughput / hit rate, not a mean of per-run values.