Make slices automatable #892
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: Run benchmark suite | |
on: [push, pull_request] | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_TERM_COLOR: always | |
jobs: | |
run-benchmark: | |
name: Run benchmark suite on Linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Install dependencies | |
run: sudo apt update && sudo apt install libasound2-dev libudev-dev | |
- name: Build latest microwave version | |
run: | | |
mkdir -p target/bench/historic | |
target=target/bench/latest | |
echo "Building ${target}" | |
cargo build -p microwave --release | |
cp target/release/microwave ${target} | |
- name: Build historic microwave versions | |
run: | | |
count=0 | |
for commit in $(git rev-list -n 50 HEAD); do | |
target=target/bench/historic/$(printf %04d ${count})-${commit:0:12} | |
echo "Building ${target}" | |
git checkout ${commit} | |
cargo build -p microwave --release | |
cp target/release/microwave ${target} | |
count=$((count+1)) | |
done | |
- name: Run benchmarks | |
run: | | |
for batch_number in $(seq 1 50); do | |
echo "Running batch number $batch_number" | |
for executable in $(find target/bench/historic -type f | shuf); do | |
echo "Running benchmark for ${executable}" | |
${executable} bench | |
done | |
done | |
- name: Analyze performance report | |
run: | | |
target/bench/latest bench --analyze | |
- name: Upload performance results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: perf-results | |
path: | | |
perf-report.yml | |
perf-analysis.csv | |
if-no-files-found: error |