Skip to content

Commit f6291c8

Browse files
committed
test: add darwin-only fibonacci benchmark for flamegraph testing
1 parent 235b6bb commit f6291c8

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,12 @@ jobs:
8585

8686
- name: Run the benchmarks
8787
uses: CodSpeedHQ/action@main
88-
env:
89-
CODSPEED_SKIP_UPLOAD: "true"
9088
with:
91-
run: cargo r --release --manifest-path ../go-runner/Cargo.toml -- test -bench=. example -benchtime=500ms
89+
run: cargo r --release --manifest-path ../go-runner/Cargo.toml -- test -bench=BenchmarkFibonacciDarwin example -benchtime=500ms
9290
working-directory: example
9391
mode: walltime
94-
# TODO: Remove this once the runner has been released with macos support
95-
runner-version: branch:main
92+
# TODO: Remove this once the runner has been released with the fix
93+
runner-version: branch:cod-2762-samply-sigkills-dsymutil
9694

9795
go-runner-benchmarks:
9896
runs-on: codspeed-macro

example/fib_darwin_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//go:build darwin
2+
3+
package example
4+
5+
import "testing"
6+
7+
func BenchmarkFibonacciDarwin(b *testing.B) {
8+
for b.Loop() {
9+
fibonacci(25)
10+
}
11+
}

0 commit comments

Comments
 (0)