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

Function BenchmarkProtoToParquet

tempodb/encoding/vparquet4/schema_test.go:738–761  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

736}
737
738func BenchmarkProtoToParquet(b *testing.B) {
739 meta := backend.BlockMeta{
740 DedicatedColumns: test.MakeDedicatedColumns(),
741 }
742
743 batchCount := 100
744 spanCounts := []int{
745 100, 1000,
746 10000,
747 }
748
749 for _, spanCount := range spanCounts {
750 b.Run("SpanCount:"+humanize.SI(float64(batchCount*spanCount), ""), func(b *testing.B) {
751 id := test.ValidTraceID(nil)
752 tr := test.AddDedicatedAttributes(test.MakeTraceWithSpanCount(batchCount, spanCount, id))
753
754 b.ResetTimer()
755
756 for i := 0; i < b.N; i++ {
757 _, _ = traceToParquet(&meta, id, tr, nil)
758 }
759 })
760 }
761}
762
763func BenchmarkEventToParquet(b *testing.B) {
764 s := &v1_trace.Span{

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