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

Function BenchmarkProtoToParquet

tempodb/encoding/vparquet3/schema_test.go:331–354  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

329}
330
331func BenchmarkProtoToParquet(b *testing.B) {
332 meta := backend.BlockMeta{
333 DedicatedColumns: test.MakeDedicatedColumns(),
334 }
335
336 batchCount := 100
337 spanCounts := []int{
338 100, 1000,
339 10000,
340 }
341
342 for _, spanCount := range spanCounts {
343 b.Run("SpanCount:"+humanize.SI(float64(batchCount*spanCount), ""), func(b *testing.B) {
344 id := test.ValidTraceID(nil)
345 tr := test.AddDedicatedAttributes(test.MakeTraceWithSpanCount(batchCount, spanCount, id))
346
347 b.ResetTimer()
348
349 for i := 0; i < b.N; i++ {
350 _, _ = traceToParquet(&meta, id, tr, nil)
351 }
352 })
353 }
354}
355
356func BenchmarkEventToParquet(b *testing.B) {
357 e := &v1_trace.Span_Event{

Callers

nothing calls this directly

Calls 6

MakeDedicatedColumnsFunction · 0.92
ValidTraceIDFunction · 0.92
AddDedicatedAttributesFunction · 0.92
MakeTraceWithSpanCountFunction · 0.92
traceToParquetFunction · 0.70
RunMethod · 0.45

Tested by

no test coverage detected