Skip to content

Commit

Permalink
Change yaml bench output format (#994)
Browse files Browse the repository at this point in the history
* Change yaml bench output format
* chore: fix bench
* chore: use cargo-criterion

---------

Co-authored-by: alon.dotan <[email protected]>
  • Loading branch information
shaharsamocha7 and alon-dotan-starkware authored Feb 2, 2025
1 parent 30b2762 commit 394f839
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,14 @@ jobs:
with:
toolchain: nightly-2025-01-02
- name: Run benchmark
run: ./scripts/bench.sh -- --output-format bencher | tee output.txt
run: |
cargo install cargo-criterion
./scripts/bench.sh |& tee output.txt
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-${{github.event.pull_request.base.ref}}-benchmark
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
Expand All @@ -144,12 +146,14 @@ jobs:
with:
toolchain: nightly-2025-01-02
- name: Run benchmark
run: ./scripts/bench.sh --features="parallel" -- --output-format bencher | tee output.txt
run: |
cargo install cargo-criterion
./scripts/bench.sh --features="parallel" |& tee output.txt
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-${{github.event.pull_request.base.ref}}-benchmark
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion scripts/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Can be used as a drop in replacement for `cargo bench`.
# For example, `./scripts/bench.sh` will run all benchmarks.
# or `./scripts/bench.sh M31` will run only the M31 benchmarks.
RUSTFLAGS="-Awarnings -C target-cpu=native -C target-feature=+avx512f -C opt-level=3" cargo bench $@
RUSTFLAGS="-Awarnings -C target-cpu=native -C opt-level=3" cargo criterion --output-format bencher $@

0 comments on commit 394f839

Please sign in to comment.