(b *testing.B, seriesNum, symbolCount int)
| 224 | } |
| 225 | |
| 226 | func makeEncodedPRW2Body(b *testing.B, seriesNum, symbolCount int) (body []byte, contentLength int) { |
| 227 | b.Helper() |
| 228 | series := makeV2ReqWithSeriesAndSymbols(seriesNum, symbolCount) |
| 229 | protobuf, err := series.Marshal() |
| 230 | if err != nil { |
| 231 | b.Fatal(err) |
| 232 | } |
| 233 | encoded := snappy.Encode(nil, protobuf) |
| 234 | return encoded, len(encoded) |
| 235 | } |
| 236 | |
| 237 | // runPRW2HandleFromPool simulates handlePRW2 using the sync.Pool |
| 238 | func runPRW2HandleFromPool(ctx context.Context, body []byte, contentLength int, overrides *validation.Overrides, userID string) error { |
no test coverage detected