(b *testing.B)
| 233 | } |
| 234 | |
| 235 | func BenchmarkCombine(b *testing.B) { |
| 236 | batchCount := 100 |
| 237 | spanCounts := []int{ |
| 238 | 100, 1000, 10000, |
| 239 | } |
| 240 | |
| 241 | for _, spanCount := range spanCounts { |
| 242 | b.Run("SpanCount:"+humanize.SI(float64(batchCount*spanCount), ""), func(b *testing.B) { |
| 243 | id1 := test.ValidTraceID(nil) |
| 244 | tr1, _ := traceToParquet(&backend.BlockMeta{}, id1, test.MakeTraceWithSpanCount(batchCount, spanCount, id1), nil) |
| 245 | |
| 246 | id2 := test.ValidTraceID(nil) |
| 247 | tr2, _ := traceToParquet(&backend.BlockMeta{}, id2, test.MakeTraceWithSpanCount(batchCount, spanCount, id2), nil) |
| 248 | |
| 249 | b.ResetTimer() |
| 250 | |
| 251 | for i := 0; i < b.N; i++ { |
| 252 | c := NewCombiner() |
| 253 | c.ConsumeWithFinal(tr1, false) |
| 254 | c.ConsumeWithFinal(tr2, true) |
| 255 | c.Result() |
| 256 | } |
| 257 | }) |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | func BenchmarkSortTrace(b *testing.B) { |
| 262 | batchCount := 100 |
nothing calls this directly
no test coverage detected