mirror of https://github.com/zcash/orchard.git
Collect benchmarks on criterion.dev
This commit is contained in:
parent
f4f1b77534
commit
7360a22776
|
@ -0,0 +1,33 @@
|
||||||
|
name: Benchmarks
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Run pollard benchmarks
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
CRITERION_TOKEN: ${{ secrets.CRITERION_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Run benchmarks
|
||||||
|
run: |
|
||||||
|
# run benchmarks and save baseline to "criterion.dev.temp"
|
||||||
|
cargo bench -- --verbose --noplot --save-baseline criterion.dev.temp
|
||||||
|
|
||||||
|
# set the path to the file to upload to criterion.dev
|
||||||
|
echo "::set-env name=CRITERION_FILE_PATH::$(find $(find . -type d -name criterion.dev.temp) -name raw.csv)"
|
||||||
|
- name: Upload benchmarks
|
||||||
|
run: |
|
||||||
|
# upload the file
|
||||||
|
curl -F 'raw.csv=@${{ env.CRITERION_FILE_PATH }}' \
|
||||||
|
'https://api.criterion.dev/v1/${{ github.repository }}/measurements?token=${{ secrets.CRITERION_TOKEN }}&commit=${{ github.sha }}'
|
|
@ -17,3 +17,9 @@ publish = false
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
rustdoc-args = [ "--html-in-header", "katex-header.html" ]
|
rustdoc-args = [ "--html-in-header", "katex-header.html" ]
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
criterion = "0.3"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
bench = false
|
||||||
|
|
Loading…
Reference in New Issue