MCPcopy Index your code
hub / github.com/syncthing/syncthing / BenchmarkJobQueuePushPopDone10k

Function BenchmarkJobQueuePushPopDone10k

lib/model/queue_test.go:183–197  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

181}
182
183func BenchmarkJobQueuePushPopDone10k(b *testing.B) {
184 files := genFiles(10000)
185
186 b.ResetTimer()
187 for i := 0; i < b.N; i++ {
188 q := newJobQueue()
189 for _, f := range files {
190 q.Push(f.Name, 0, time.Time{})
191 }
192 for range files {
193 n, _ := q.Pop()
194 q.Done(n)
195 }
196 }
197}
198
199func TestQueuePagination(t *testing.T) {
200 q := newJobQueue()

Callers

nothing calls this directly

Calls 5

genFilesFunction · 0.85
newJobQueueFunction · 0.85
DoneMethod · 0.80
PushMethod · 0.45
PopMethod · 0.45

Tested by

no test coverage detected