(b *testing.B)
| 164 | } |
| 165 | |
| 166 | func BenchmarkJobQueueBump(b *testing.B) { |
| 167 | files := genFiles(10000) |
| 168 | |
| 169 | q := newJobQueue() |
| 170 | for _, f := range files { |
| 171 | q.Push(f.Name, 0, time.Time{}) |
| 172 | } |
| 173 | |
| 174 | rng := rand.New(rand.NewSource(int64(b.N))) |
| 175 | |
| 176 | b.ResetTimer() |
| 177 | for i := 0; i < b.N; i++ { |
| 178 | r := rng.Intn(len(files)) |
| 179 | q.BringToFront(files[r].Name) |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | func BenchmarkJobQueuePushPopDone10k(b *testing.B) { |
| 184 | files := genFiles(10000) |
nothing calls this directly
no test coverage detected