(b *testing.B, initIDs, mergePgids common.Pgids)
| 284 | } |
| 285 | |
| 286 | func benchmarkHashMapMergeSpans(b *testing.B, initIDs, mergePgids common.Pgids) { |
| 287 | b.ReportAllocs() |
| 288 | b.ResetTimer() |
| 289 | for i := 0; i < b.N; i++ { |
| 290 | b.StopTimer() |
| 291 | f := newTestHashMapFreelist() |
| 292 | f.Init(initIDs) |
| 293 | |
| 294 | mergeIDs := append(common.Pgids(nil), mergePgids...) |
| 295 | |
| 296 | b.StartTimer() |
| 297 | f.mergeSpans(mergeIDs) |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | func benchmarkHashMapMergeSpansNonBatch(b *testing.B, initIDs, mergePgids common.Pgids) { |
| 302 | b.ReportAllocs() |
no test coverage detected