Skip to content

Commit ca2f5f7

Browse files
committed
fixup: timing test - remove keepalive
1 parent 530449a commit ca2f5f7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

example/timing_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
package example
22

33
import (
4-
"runtime"
54
"testing"
65
)
76

87
func BenchmarkLargeSetup(b *testing.B) {
9-
res := expensiveOperation()
8+
expensiveOperation()
109
b.ResetTimer()
1110

1211
for i := 0; i < b.N; i++ {
1312
actualWork()
1413
}
15-
16-
runtime.KeepAlive(res)
1714
}
1815

1916
func BenchmarkLargeSetupInLoop(b *testing.B) {

0 commit comments

Comments
 (0)