Benchmarks #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Benchmarks | |
on: workflow_dispatch | |
jobs: | |
bench: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare Environment | |
run: | | |
rustup update nightly | |
rustup default nightly | |
cargo install cargo-export --version 0.2.0 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
./target/ | |
./baseline-branch/target/ | |
key: Bench/${{ runner.os }} | |
- name: Building Benchmarks | |
run: cargo export target/benchmarks -- bench --bench='search-*' | |
- name: Run Benchmarks | |
run: | | |
set -eo pipefail | |
mkdir -p target/dumps | |
target/benchmarks/search_ord --color=never compare target/benchmarks/search_ord \ | |
-t 1 -o -d target/dumps | tee target/benchmark.txt | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: benchmark-results | |
path: | | |
target/benchmark.txt | |
target/dumps/*.csv |