Skip to content

Commit

Permalink
Pin to one CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
Kijewski committed Aug 17, 2024
1 parent b8763dd commit dfa15b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,12 @@ jobs:
- name: Remove any stale results
run: rm -rf target/criterion

- name: Build benchmarks
run: cargo build --release --bench template-benchmark

- name: Run benchmarks
run: cargo bench --bench template-benchmark
# Pin to one CPU, skipping the first core, to hopefully get fewer outliers.
run: taskset --cpu-list "$(( $RANDOM % ($(nproc) - 2) + 2 ))" cargo bench --bench template-benchmark

- name: Fixup paths
run: sed -e 's,href="../,href=",' < target/criterion/report/index.html > target/criterion/index.html
Expand Down

0 comments on commit dfa15b7

Please sign in to comment.