criterion-markdown
criterion-markdown reads Criterion benchmark JSON output from target/criterion and renders a markdown summary table.
What It Does
- Walks a Criterion result directory and discovers benchmark runs.
- Reads
benchmark.json,estimates.json, and optionalchange/estimates.json. - Produces grouped markdown tables with human-readable timings and change indicators.
Usage
This crate currently exposes a single entrypoint:
criterion_markdown::render(criterion_dir, allowlist)
Where:
criterion_dirpoints to a Criterion output directory (for example,target/criterion).allowlistis an iterable of benchmark ids (Vec<String>,&[String],Vec<&str>, etc.).- If
allowlistis empty, no filtering is applied.
How This Differs From criterion-table
- This crate reads benchmark data directly from the JSON files generated by Criterion in
target/criterion. - It does not depend on
cargo-criterion. - This crate is a library you can embed and call from your own project code;
criterion-tableis primarily used as a standalone binary tool. - You can point it at an existing Criterion output directory and render markdown without changing how benchmarks are run.
Development
Run checks locally: