This directory shows how to use github-action-benchmark
with cargo bench.
Official documentation for usage of cargo bench:
https://doc.rust-lang.org/unstable-book/library-features/test.html
e.g.
- name: Run benchmark
run: cargo +nightly bench | tee output.txtNote that cargo bench is available only with nightly toolchain.
Note that this example does not use LTO for benchmarking because entire code in benchmark iteration
will be removed as dead code. For normal use case, please enable it in Cargo.toml for production
performance.
[profile.bench]
lto = trueStore the benchmark results with step using the action. Please set cargo to tool input.
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'cargo'
output-file-path: output.txtPlease read 'How to use' section for common usage.