1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-09-16 05:50:41 +02:00

Update buffered_queue_test.go

This commit is contained in:
chrislu 2024-01-27 14:46:12 -08:00
parent b6de35cdb2
commit fa835c9319

View file

@ -86,15 +86,11 @@ func BenchmarkBufferedQueue(b *testing.B) {
queue := NewBufferedQueue[Job[string]](1024, true)
b.Run("Enqueue", func(b *testing.B) {
for i := 0; i < b.N; i++ {
queue.Enqueue(Job[string]{ID: i, Action: "task", Data: "data"})
}
})
for i := 0; i < b.N; i++ {
queue.Enqueue(Job[string]{ID: i, Action: "task", Data: "data"})
}
for i := 0; i < b.N; i++ {
_, _ = queue.Dequeue()
}
b.Run("Dequeue", func(b *testing.B) {
for i := 0; i < b.N; i++ {
_, _ = queue.Dequeue()
}
})
}