MCPcopy Create free account
hub / github.com/LyricTian/queue / BenchmarkListQueue

Function BenchmarkListQueue

list_queue_test.go:65–79  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

63}
64
65func BenchmarkListQueue(b *testing.B) {
66 q := NewListQueue(100)
67 q.Run()
68
69 b.ResetTimer()
70 b.RunParallel(func(pb *testing.PB) {
71 for pb.Next() {
72 job := NewJob("", func(v interface{}) {
73 _ = v
74 })
75 q.Push(job)
76 }
77 })
78 q.Terminate()
79}

Callers

nothing calls this directly

Calls 5

RunMethod · 0.95
PushMethod · 0.95
TerminateMethod · 0.95
NewListQueueFunction · 0.85
NewJobFunction · 0.85

Tested by

no test coverage detected