(b *testing.B)
| 208 | } |
| 209 | |
| 210 | func Benchmark_convertV2RequestToV1(b *testing.B) { |
| 211 | testSeriesNums := []int{100, 500, 1000} |
| 212 | |
| 213 | for _, seriesNum := range testSeriesNums { |
| 214 | b.Run(fmt.Sprintf("%d series", seriesNum), func(b *testing.B) { |
| 215 | series := makeV2ReqWithSeries(seriesNum) |
| 216 | |
| 217 | b.ReportAllocs() |
| 218 | for b.Loop() { |
| 219 | _, err := convertV2RequestToV1(series, false) |
| 220 | require.NoError(b, err) |
| 221 | } |
| 222 | }) |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | func makeEncodedPRW2Body(b *testing.B, seriesNum, symbolCount int) (body []byte, contentLength int) { |
| 227 | b.Helper() |
nothing calls this directly
no test coverage detected