diff --git a/store/storeBenchmark_test.go b/store/storeBenchmark_test.go index ff9f792a0dbb15a7a0545a5230f28b42b3f93374..c96599579b38b64996c66f6a199c36d44fdcb0b3 100644 --- a/store/storeBenchmark_test.go +++ b/store/storeBenchmark_test.go @@ -115,7 +115,7 @@ func BenchmarkAddGet(b *testing.B) { } } -func BenchmarkGetParallel(b *testing.B) { +func BenchmarkAddParallel(b *testing.B) { if testing.Short() { b.Skip("skipping parallel tests in short mode") } @@ -166,14 +166,17 @@ func BenchmarkGetParallel(b *testing.B) { b.SetParallelism(bm.iterations) b.RunParallel(func(pb *testing.PB) { for pb.Next() { - bm.s.Get(uuid.Nil) + b.StopTimer() + item := &testItem{id: uuid.New()} + b.StartTimer() + bm.s.Add(item) } }) }) } } -func BenchmarkAddParallel(b *testing.B) { +func BenchmarkGetParallel(b *testing.B) { if testing.Short() { b.Skip("skipping parallel tests in short mode") } @@ -224,10 +227,7 @@ func BenchmarkAddParallel(b *testing.B) { b.SetParallelism(bm.iterations) b.RunParallel(func(pb *testing.PB) { for pb.Next() { - b.StopTimer() - item := &testItem{id: uuid.New()} - b.StartTimer() - bm.s.Add(item) + bm.s.Get(uuid.Nil) } }) })