MCPcopy
hub / github.com/grafana/tempo / BenchmarkSortTrace

Function BenchmarkSortTrace

tempodb/encoding/vparquet4/combiner_test.go:545–563  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

543}
544
545func BenchmarkSortTrace(b *testing.B) {
546 batchCount := 100
547 spanCounts := []int{
548 100, 1000, 10000,
549 }
550
551 for _, spanCount := range spanCounts {
552 b.Run("SpanCount:"+humanize.SI(float64(batchCount*spanCount), ""), func(b *testing.B) {
553 id := test.ValidTraceID(nil)
554 tr, _ := traceToParquet(&backend.BlockMeta{}, id, test.MakeTraceWithSpanCount(batchCount, spanCount, id), nil)
555
556 b.ResetTimer()
557
558 for i := 0; i < b.N; i++ {
559 SortTrace(tr)
560 }
561 })
562 }
563}

Callers

nothing calls this directly

Calls 5

ValidTraceIDFunction · 0.92
MakeTraceWithSpanCountFunction · 0.92
traceToParquetFunction · 0.70
SortTraceFunction · 0.70
RunMethod · 0.45

Tested by

no test coverage detected