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

Function BenchmarkSortTrace

tempodb/encoding/vparquet3/combiner_test.go:261–279  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

259}
260
261func BenchmarkSortTrace(b *testing.B) {
262 batchCount := 100
263 spanCounts := []int{
264 100, 1000, 10000,
265 }
266
267 for _, spanCount := range spanCounts {
268 b.Run("SpanCount:"+humanize.SI(float64(batchCount*spanCount), ""), func(b *testing.B) {
269 id := test.ValidTraceID(nil)
270 tr, _ := traceToParquet(&backend.BlockMeta{}, id, test.MakeTraceWithSpanCount(batchCount, spanCount, id), nil)
271
272 b.ResetTimer()
273
274 for i := 0; i < b.N; i++ {
275 SortTrace(tr)
276 }
277 })
278 }
279}

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