Reporter
Technical deep-dive on how poly-bench formats and outputs benchmark results
The poly-bench-reporter crate generates output from benchmark results. It supports console tables, markdown reports, JSON for CI, and SVG charts. This page covers the output formats, chart execution, and how results flow from the executor to the reporter.
The reporter produces:
| Format | Use case | Module |
|---|---|---|
| Console | Interactive terminal output | console.rs |
| Markdown | Documentation-ready reports | markdown.rs |
| JSON | CI integration, automation | json.rs |
| SVG | Charts (tables, bar, line, speedup) | svg.rs, charts/ |
The console reporter (poly-bench-reporter/src/console.rs) produces vitest/tinybench-style output:
The markdown reporter (poly-bench-reporter/src/markdown.rs) generates documentation-ready reports:
The JSON reporter (poly-bench-reporter/src/json.rs) outputs structured data:
results.json — Full benchmark results for poly-bench plotThe chart executor (poly-bench-reporter/src/chart_executor.rs) runs chart directives from after blocks:
ChartDirectiveIR from IR, BenchmarkResults, and output dirdrawTable, drawBarChart, drawLineChart, drawSpeedupChartCharts are written as SVG files to the output directory.
The charts/ module implements: