# 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 optional `change/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_dir` points to a Criterion output directory (for example, `target/criterion`).
- `allowlist` is an iterable of benchmark ids (`Vec<String>`, `&[String]`, `Vec<&str>`, etc.).
- If `allowlist` is 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-table` is 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:
```bash
cargo +nightly fmt --check
cargo test
cargo clippy --all-targets -- -D warnings
```