From dfa15b7b32250295b95061c95f8d8cbb811aaae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kijewski?= Date: Sat, 17 Aug 2024 20:55:53 +0200 Subject: [PATCH] Pin to one CPU --- .github/workflows/rust.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7c78398..9edfebc 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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