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

Function TestEncoderDecoderEmptyStream

pkg/ingest/encoding_test.go:85–97  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

83}
84
85func TestEncoderDecoderEmptyStream(t *testing.T) {
86 decoder := NewDecoder()
87
88 req := &tempopb.PushBytesRequest{}
89
90 records, err := Encode(0, "test-tenant", req, 10<<20)
91 require.NoError(t, err)
92 require.Len(t, records, 1)
93
94 decodedReq, err := decoder.Decode(records[0].Value)
95 require.NoError(t, err)
96 require.Equal(t, req.Traces, decodedReq.Traces)
97}
98
99func BenchmarkEncodeDecode(b *testing.B) {
100 decoder := NewDecoder()

Callers

nothing calls this directly

Calls 5

DecodeMethod · 0.95
NewDecoderFunction · 0.85
EncodeFunction · 0.85
LenMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected