(b *testing.B)
| 517 | } |
| 518 | |
| 519 | func BenchmarkCombine(b *testing.B) { |
| 520 | batchCount := 100 |
| 521 | spanCounts := []int{ |
| 522 | 100, 1000, 10000, |
| 523 | } |
| 524 | |
| 525 | for _, spanCount := range spanCounts { |
| 526 | b.Run("SpanCount:"+humanize.SI(float64(batchCount*spanCount), ""), func(b *testing.B) { |
| 527 | id1 := test.ValidTraceID(nil) |
| 528 | tr1, _ := traceToParquet(&backend.BlockMeta{}, id1, test.MakeTraceWithSpanCount(batchCount, spanCount, id1), nil) |
| 529 | |
| 530 | id2 := test.ValidTraceID(nil) |
| 531 | tr2, _ := traceToParquet(&backend.BlockMeta{}, id2, test.MakeTraceWithSpanCount(batchCount, spanCount, id2), nil) |
| 532 | |
| 533 | b.ResetTimer() |
| 534 | |
| 535 | for i := 0; i < b.N; i++ { |
| 536 | c := NewCombiner() |
| 537 | c.ConsumeWithFinal(tr1, false) |
| 538 | c.ConsumeWithFinal(tr2, true) |
| 539 | c.Result() |
| 540 | } |
| 541 | }) |
| 542 | } |
| 543 | } |
| 544 | |
| 545 | func BenchmarkSortTrace(b *testing.B) { |
| 546 | batchCount := 100 |
nothing calls this directly
no test coverage detected