pub fn assert_thresholds(
reports: &[WorkerReport],
thresholds: &AbsoluteThresholds,
) -> AssertResultExpand description
Run every check in thresholds against reports, merging results
into a single AssertResult. A None field on the thresholds
skips that check.
An empty reports slice short-circuits to a skip ("no worker reports to evaluate") regardless of thresholds content — silently
passing thresholds against zero samples would let them look
“green” on a run that produced no measurement.
Field-to-check mapping:
max_p99_wake_latency_ns-> pooled p99 across every worker’swake_latencies_ns; taggedDetailKind::Benchmark.max_iteration_cost_p99_ns-> pooled p99 across every worker’siteration_costs_ns; taggedDetailKind::Benchmark.max_migrations-> sum ofmigration_countacross workers; taggedDetailKind::Migration.min_work_units-> per-workerwork_units >= floor; taggedDetailKind::NoProgresswhen a worker is below the floor.
The wake-latency check delegates to assert_benchmarks for the
percentile path so the same nearest-rank algorithm applies; the
iteration-cost check uses an inline percentile call against the
pooled iteration_costs_ns reservoir.
// Strict preset on a healthy run — passes.
let r = assert_thresholds(&[report], &AbsoluteThresholds::strict());
assert!(r.is_pass());