//! The repo-level nornir Bencher entrypoint for **edda**.
//!
//! edda is a *samling* of leaf crates, and each leaf owns its own bencher behind its
//! own off-by-default `bench` feature:
//!
//! | arm | leaf | what it measures |
//! |---|---|---|
//! | `autonom.function_scan` | `crates/autonom` | the source-scan → Function-surface fold |
//! | `nornir-flight.put_get_throughput` | `crates/nornir-flight` | Arrow Flight put/get round-trip |
//! | `saga-replay-fold` | `crates/nornir-saga` | folding a whole saga through the viewer |
//!
//! Each of those has a per-leaf `examples/nornir-bench.rs` you can run by hand
//! (`cargo run --release -p autonom --features bench --example nornir-bench`), but
//! `nornir`'s `run_bench_example` only discovers `<repo>/examples/`,
//! `<repo>/xtask/examples/` and `<repo>/bench/examples/`. This file is the third of
//! those: ONE run, for the `edda` repo, carrying every leaf's arms — which is what
//! populates the `benches` block in the generated `README.md`.
//!
//! `inventory` collects at LINK time, so each leaf must actually be *referenced*
//! here or the linker is free to drop its registration. `touch()` below is that
//! reference and nothing more — it constructs each bencher and drops it.
//!
//! Run: `nornir bench run edda` (or `cargo run --release --example nornir-bench`
//! from this directory). `NORNIR_BENCH_PREVIEW=1` gives the fast verification pass:
//! every arm still runs through the same code paths and emits the same metric keys,
//! and the run is stamped `<host>-preview` so it can never be mistaken for — or
//! overwrite — a published host row.
/// Reference every leaf's bencher so `inventory` keeps its registration linked.
///
/// This is a RED-when-broken guard, not decoration: if a leaf's `bench` feature or
/// its bencher type is renamed/removed, this stops compiling, instead of the run
/// silently shrinking to fewer arms and the README quietly losing a row.
fn touch() {
let _ = autonom::bench::ScanFold::default();
let _ = nornir_flight::bench::FlightThroughput::default();
let _ = nornir_saga::bench::ReplayFold::default();
}
fn main() -> anyhow::Result<()> {
touch();
nornir_bench::api::run_main_json()
}