(b *testing.B)
| 208 | } |
| 209 | |
| 210 | func BenchmarkGeneratorDecoderPushBytes(b *testing.B) { |
| 211 | stream := generateRequest(1000, 200) |
| 212 | traceBytes, err := stream.Marshal() |
| 213 | require.NoError(b, err) |
| 214 | |
| 215 | b.ReportAllocs() |
| 216 | decoder := NewPushBytesDecoder() |
| 217 | |
| 218 | b.ResetTimer() |
| 219 | for b.Loop() { |
| 220 | iterator, err := decoder.Decode(traceBytes) |
| 221 | require.NoError(b, err) |
| 222 | for range iterator { // nolint:revive // we want to run the side effects of ranging itself |
| 223 | } |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | // Original implementation without clear() for comparison |
| 228 | func encoderPoolPutOriginal(req *tempopb.PushBytesRequest) { |
nothing calls this directly
no test coverage detected