metrale_bench/benchmarks/scheduler_equivalence/
mod.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2
3//! 2026-09-26: Scheduler equivalence: one BFCL draw served under the sync and
4//! the async device router (`--scheduler-config`), compared per `sample_id`
5//! and per concurrency.
6//!
7//! Owner: bench, scheduler-equivalence gate.
8//! Invariants:
9//! - A sample agrees only when its canonical transcript (reasoning, text, tool
10//!   calls with raw arguments, finish reason) and its completion token count
11//!   are equal under both routers; a failed request is unmeasured, never equal.
12//! - Each serve pins its speculation lane (`host::Lane`), because the MTP gate
13//!   otherwise picks verify or plain decode by measured throughput.
14//! - With the control on, the sync serve is measured twice per lane, and a
15//!   control that diverged fails the run before the async column is read.
16//! - The async router's counters are recorded as `async_*` metrics and take no
17//!   part in the verdict.
18//! - Loading fails without an installed [`host::RouterHost`]; the serving
19//!   process installs one as it starts.
20
21pub mod compare;
22pub mod driver;
23pub mod host;
24pub mod report;
25pub mod unmeasured;
26
27pub use driver::{DESCRIPTOR, METADATA};
28
29#[cfg(test)]
30#[path = "compare_tests.rs"]
31mod compare_tests;
32
33#[cfg(test)]
34#[path = "driver_tests.rs"]
35mod driver_tests;
36
37#[cfg(test)]
38#[path = "unmeasured_tests.rs"]
39mod unmeasured_tests;