(t *testing.T)
| 1179 | ) |
| 1180 | |
| 1181 | func buildTestChunks(t *testing.T) []prompb.Chunk { |
| 1182 | startTime := int64(0) |
| 1183 | chks := make([]prompb.Chunk, 0, numTestChunks) |
| 1184 | |
| 1185 | time := startTime |
| 1186 | |
| 1187 | for i := range numTestChunks { |
| 1188 | c := chunkenc.NewXORChunk() |
| 1189 | |
| 1190 | a, err := c.Appender() |
| 1191 | require.NoError(t, err) |
| 1192 | |
| 1193 | minTimeMs := time |
| 1194 | |
| 1195 | for j := range numSamplesPerTestChunk { |
| 1196 | a.Append(0, time, float64(i+j)) |
| 1197 | time += int64(1000) |
| 1198 | } |
| 1199 | |
| 1200 | chks = append(chks, prompb.Chunk{ |
| 1201 | MinTimeMs: minTimeMs, |
| 1202 | MaxTimeMs: time, |
| 1203 | Type: prompb.Chunk_XOR, |
| 1204 | Data: c.Bytes(), |
| 1205 | }) |
| 1206 | } |
| 1207 | |
| 1208 | return chks |
| 1209 | } |
no test coverage detected
searching dependent graphs…