Skip to content

Commit 5ea010e

Browse files
committed
bench
1 parent ef0e202 commit 5ea010e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bench_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ var parallelRequests = []int{8, 16, 24}
1212
// Global variable for Benchmarking - https://itnext.io/the-top-10-most-common-mistakes-ive-seen-in-go-projects-4b79d4f6cd65
1313
var (
1414
s []int
15+
mm []*airmat.Mattress[int]
1516
pool = airmat.NewPool[int]()
1617
)
1718

@@ -31,7 +32,7 @@ func BenchmarkMakeSlices(b *testing.B) {
3132
func BenchmarkPool(b *testing.B) {
3233
for _, requests := range parallelRequests {
3334
b.Run(strconv.Itoa(requests), func(b *testing.B) {
34-
mm := make([]*airmat.Mattress[int], requests)
35+
mm = make([]*airmat.Mattress[int], requests)
3536

3637
for n := 0; n < b.N; n++ {
3738
// emulates parallel requests

0 commit comments

Comments
 (0)