Skip to content

Commit e5a4e66

Browse files
authored
ci: disable CodSpeed process isolation for Rust simulation benchmarks (#10796)
## Summary `codspeed` 6.0.0 (#10784, #10785) adds process isolation, which is on by default. `codspeed-divan-compat` now runs each benchmark in a new copy of the benchmark binary. Simulation mode measures one iteration without warmup, so each benchmark also pays for allocator setup (mimalloc) and for simulated cache misses on memory it touches for the first time. Before, an earlier benchmark in the same process had already paid these costs. The CodSpeed report on #10785 shows a near-constant ~15 µs added to short benchmarks.
1 parent 6007f56 commit e5a4e66

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎.github/workflows/codspeed.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ jobs:
116116
run: cargo codspeed build --locked ${{ matrix.features }} $(printf -- '-p %s ' ${{ matrix.packages }}) ${{ steps.select.outputs.benches }} --profile bench
117117
- name: Run benchmarks
118118
uses: CodSpeedHQ/action@78102a468f96d8e0ccb92d0ec49425753fc42062 # v5
119+
env:
120+
# codspeed-divan-compat 6 runs each benchmark in a new process by default. Simulation
121+
# measures one iteration without warmup, so each benchmark then also pays for a cold
122+
# allocator and cold caches. This adds about 15 µs to each benchmark and hides small
123+
# changes in short benchmarks. Run all benchmarks of a target in one process, as before.
124+
CODSPEED_PROCESS_ISOLATION: "false"
119125
with:
120126
run: cargo codspeed run
121127
token: ${{ secrets.CODSPEED_TOKEN }}

0 commit comments

Comments
 (0)