Expand description
The CLI frontend for benchmark applications built with this crate.
App provides a clap-based command line interface that handles input parsing,
benchmark dispatch, and regression checking. Consumers build a binary by registering
Inputs and Benchmarks, then forwarding to
App::parse and App::run.
§Subcommands
§Standard Workflow
inputs [NAME]: List available input kinds, or describe one by name.benchmarks: List registered benchmarks and their descriptions.skeleton: Print a skeleton input JSON file.run --input-file <FILE> --output-file <FILE> [--dry-run]: Run benchmarks.
§Regression Checks
These are accessed via check <SUBCOMMAND>:
check skeleton: Print a skeleton tolerance JSON file.check tolerances [NAME]: List tolerance kinds, or describe one by name.check verify --tolerances <FILE> --input-file <FILE>: Validate a tolerance file against an input file.check run --tolerances <FILE> --input-file <FILE> --before <FILE> --after <FILE> [--output-file <FILE>]: Run regression checks.
§Example
A typical binary using this crate:
use diskann_benchmark_runner::{App, registry};
fn main() -> anyhow::Result<()> {
let mut registry = registry::Registry::new();
// registry.register("my-bench", MyBenchmark::default())?;
// registry.register_regression("my-regression", MyRegressionBenchmark::default())?;
let app = App::parse();
let mut output = diskann_benchmark_runner::output::default();
app.run(®istry, &mut output)
}§Regression Workflow
- Run benchmarks twice (e.g. before and after a code change) with
run, producing two output files. - Author a tolerance file describing acceptable variation (use
check skeletonandcheck tolerancesfor guidance). - Validate the tolerance file with
check verify. - Compare the two output files with
check run.
Structs§
- App
- The CLI used to drive a benchmark application.