xtask/benches/nornir.rs
//! `cargo bench -p xtask` shim for the nornir bench suite.
//!
//! The suite is defined once in `examples/nornir-bench.rs` (run by
//! `nornir bench run` via `cargo run --example`). A `[[bench]]` target is a
//! separate binary, so it must link the same `register_bench!` registrations —
//! we get that by `#[path]`-including the example source (benches may use
//! dev-dependencies, exactly like examples). `inventory` then collects every
//! bencher into this binary too.
//!
//! Output is still nornir's single `BenchRun` JSON line, not criterion's
//! human format — this only gives the familiar `cargo bench` command, with
//! nornir semantics. nornir itself keeps using the example.
#[allow(dead_code)]
#[path = "../examples/nornir-bench.rs"]
mod suite;
fn main() -> anyhow::Result<()> {
nornir::bench::api::run_main_json()
}