pub fn assert_throughput_parity(
reports: &[WorkerReport],
max_cv: Option<f64>,
min_rate: Option<f64>,
) -> AssertResultExpand description
Check throughput parity across workers: coefficient of variation and minimum work rate.
max_cv: maximum allowed coefficient of variation (stddev/mean) for
work_units / cpu_time_ns across workers. None skips the CV check.
min_rate: minimum work_units per CPU-second. None skips the floor check.
When every worker recorded cpu_time_ns == 0, both gates record
their OWN Inconclusive outcome (the CV gate emits a “CV cannot be
computed” detail; the min_rate gate emits a “rates cannot be
computed” detail). Each gate carries its own diagnostic so a
caller that supplies only one of the two threshold parameters
sees the matching Inconclusive message and an operator reading
AssertResult::inconclusive_details can identify which gate(s)
misfired without re-deriving the inputs.
// Equal throughput -> low CV -> passes.
let reports = [mk(1000, 1_000_000_000), mk(1000, 1_000_000_000)];
assert!(assert_throughput_parity(&reports, Some(0.5), None).is_pass());