metrale_bench/
lib.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2#![deny(warnings)]
3#![deny(clippy::all)]
4
5//! 2026-09-26: Metrale Engine plugins, and the benchmark suite the `met serve`
6//! TUI and `met benchmark` drive.
7//!
8//! [`Plugin`] is the general abstraction: [`Plugin::load`] receives a
9//! [`PluginHandle`] (status, log, progress and glow events, the artifact
10//! store, the target endpoint and a cancellation flag). [`Benchmark`]
11//! specialises it into a drivable state machine: the implementor does one
12//! step per [`Benchmark::next`], and [`Benchmark::run`] streams the
13//! [`BenchmarkResult`] frames.
14//!
15//! `impl Stream` and `async fn` in a trait are not dyn-compatible, so
16//! [`DynBenchmark`] carries the same contract with boxed futures and is
17//! blanket-implemented for every `Benchmark`; [`executor::drive`] consumes
18//! it.
19//!
20//! Owner: bench.
21//! Invariants: none beyond the types.
22
23pub mod artifacts;
24pub mod benchmark;
25pub mod benchmarks;
26pub mod coherence;
27pub mod dynamic;
28pub mod executor;
29pub mod gate;
30pub mod hardware;
31pub mod headless;
32pub mod history;
33pub mod http;
34pub mod metadata;
35pub mod param_text;
36pub mod params;
37pub mod plugin;
38pub mod python;
39pub mod registry;
40pub mod result;
41pub mod serve_env;
42pub mod serve_identity;
43
44pub use artifacts::ArtifactStore;
45pub use benchmark::{Benchmark, BenchmarkDescriptor};
46pub use coherence::CoherencePolicy;
47pub use dynamic::DynBenchmark;
48pub use executor::{BenchmarkExecutor, ExecutorMessage, RunHandle};
49pub use hardware::{Hardware, HardwareState, HardwareStateReport, Sensitivity};
50pub use history::{RunRecord, RunSource};
51pub use metadata::PluginMetadata;
52pub use params::{ParamKind, ParamSpec, ParamValue, ParamValues};
53pub use plugin::{Plugin, PluginEvent, PluginHandle, TargetEndpoint};
54pub use result::{
55    Align, BenchmarkResult, Cell, CellStyle, Column, LogLevel, LogLine, ResultTable, RunStatus,
56    Stat, Verdict, VerdictKind,
57};