(b *testing.B)
| 97 | } |
| 98 | |
| 99 | func BenchmarkEncodeDecode(b *testing.B) { |
| 100 | decoder := NewDecoder() |
| 101 | stream := generateRequest(1000, 200) |
| 102 | |
| 103 | b.ResetTimer() |
| 104 | for i := 0; i < b.N; i++ { |
| 105 | records, err := Encode(0, "test-tenant", stream, 10<<20) |
| 106 | if err != nil { |
| 107 | b.Fatal(err) |
| 108 | } |
| 109 | for _, record := range records { |
| 110 | _, err := decoder.Decode(record.Value) |
| 111 | if err != nil { |
| 112 | b.Fatal(err) |
| 113 | } |
| 114 | } |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | func TestResetPushBytesRequest(t *testing.T) { |
| 119 | // Create a request with all fields set to non-zero values |
nothing calls this directly
no test coverage detected