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

Function BenchmarkProtoToParquet

tempodb/encoding/vparquet5/schema_test.go:759–782  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

757}
758
759func BenchmarkProtoToParquet(b *testing.B) {
760 meta := backend.BlockMeta{
761 DedicatedColumns: test.MakeDedicatedColumns(),
762 }
763
764 batchCount := 100
765 spanCounts := []int{
766 100, 1000,
767 10000,
768 }
769
770 for _, spanCount := range spanCounts {
771 b.Run("SpanCount:"+humanize.SI(float64(batchCount*spanCount), ""), func(b *testing.B) {
772 id := test.ValidTraceID(nil)
773 tr := test.AddDedicatedAttributes(test.MakeTraceWithSpanCount(batchCount, spanCount, id))
774
775 b.ResetTimer()
776
777 for i := 0; i < b.N; i++ {
778 _, _ = traceToParquet(&meta, id, tr, nil)
779 }
780 })
781 }
782}
783
784func BenchmarkEventToParquet(b *testing.B) {
785 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