(b *testing.B, initIDs, mergePgids common.Pgids)
| 299 | } |
| 300 | |
| 301 | func benchmarkHashMapMergeSpansNonBatch(b *testing.B, initIDs, mergePgids common.Pgids) { |
| 302 | b.ReportAllocs() |
| 303 | b.ResetTimer() |
| 304 | for i := 0; i < b.N; i++ { |
| 305 | b.StopTimer() |
| 306 | f := newTestHashMapFreelist() |
| 307 | f.Init(initIDs) |
| 308 | |
| 309 | mergeIDs := append(common.Pgids(nil), mergePgids...) |
| 310 | |
| 311 | b.StartTimer() |
| 312 | for _, id := range mergeIDs { |
| 313 | f.mergeWithExistingSpan(id, id) |
| 314 | } |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | func newTestHashMapFreelist() *hashMap { |
| 319 | f := NewHashMapFreelist() |
no test coverage detected