(minTime, maxTime int64, maxSamplesPerChunk int)
| 537 | func (nopChunkWriter) Close() error { return nil } |
| 538 | |
| 539 | func samplesForRange(minTime, maxTime int64, maxSamplesPerChunk int) (ret [][]sample) { |
| 540 | var curr []sample |
| 541 | for i := minTime; i <= maxTime; i++ { |
| 542 | curr = append(curr, sample{t: i}) |
| 543 | if len(curr) >= maxSamplesPerChunk { |
| 544 | ret = append(ret, curr) |
| 545 | curr = []sample{} |
| 546 | } |
| 547 | } |
| 548 | if len(curr) > 0 { |
| 549 | ret = append(ret, curr) |
| 550 | } |
| 551 | return ret |
| 552 | } |
| 553 | |
| 554 | func TestCompaction_populateBlock(t *testing.T) { |
| 555 | for _, tc := range []struct { |
no outgoing calls
no test coverage detected
searching dependent graphs…