File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
exporter/exporterhelper/internal/queuebatch Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -198,8 +198,10 @@ func BenchmarkMemoryQueueWaitForResult(b *testing.B) {
198
198
wg := sync.WaitGroup {}
199
199
consumed := & atomic.Int64 {}
200
200
q := newMemoryQueue [int64 ](memoryQueueSettings [int64 ]{sizer : sizerInt64 {}, capacity : 1000 , waitForResult : true })
201
+ require .NoError (b , q .Start (context .Background (), componenttest .NewNopHost ()))
201
202
202
203
// Consume async new data.
204
+ wg .Add (1 )
203
205
go func () {
204
206
defer wg .Done ()
205
207
for {
@@ -212,7 +214,6 @@ func BenchmarkMemoryQueueWaitForResult(b *testing.B) {
212
214
}
213
215
}()
214
216
215
- require .NoError (b , q .Start (context .Background (), componenttest .NewNopHost ()))
216
217
b .ResetTimer ()
217
218
b .ReportAllocs ()
218
219
for i := 0 ; i < b .N ; i ++ {
You can’t perform that action at this time.
0 commit comments