|
|
@ -492,7 +492,7 @@ func TestDropMetrics(t *testing.T) {
|
|
|
|
t.Errorf("unexpected number of fingerprints: %d", len(fps2))
|
|
|
|
t.Errorf("unexpected number of fingerprints: %d", len(fps2))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_, it, err := s.preloadChunksForRange(fpList[0], model.Earliest, model.Latest, false)
|
|
|
|
_, it, err := s.preloadChunksForRange(fpList[0], model.Earliest, model.Latest)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -500,7 +500,7 @@ func TestDropMetrics(t *testing.T) {
|
|
|
|
t.Errorf("unexpected number of samples: %d", len(vals))
|
|
|
|
t.Errorf("unexpected number of samples: %d", len(vals))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_, it, err = s.preloadChunksForRange(fpList[1], model.Earliest, model.Latest, false)
|
|
|
|
_, it, err = s.preloadChunksForRange(fpList[1], model.Earliest, model.Latest)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -525,7 +525,7 @@ func TestDropMetrics(t *testing.T) {
|
|
|
|
t.Errorf("unexpected number of fingerprints: %d", len(fps3))
|
|
|
|
t.Errorf("unexpected number of fingerprints: %d", len(fps3))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_, it, err = s.preloadChunksForRange(fpList[0], model.Earliest, model.Latest, false)
|
|
|
|
_, it, err = s.preloadChunksForRange(fpList[0], model.Earliest, model.Latest)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -533,7 +533,7 @@ func TestDropMetrics(t *testing.T) {
|
|
|
|
t.Errorf("unexpected number of samples: %d", len(vals))
|
|
|
|
t.Errorf("unexpected number of samples: %d", len(vals))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_, it, err = s.preloadChunksForRange(fpList[1], model.Earliest, model.Latest, false)
|
|
|
|
_, it, err = s.preloadChunksForRange(fpList[1], model.Earliest, model.Latest)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -662,7 +662,7 @@ func testValueAtOrBeforeTime(t *testing.T, encoding chunkEncoding) {
|
|
|
|
|
|
|
|
|
|
|
|
fp := model.Metric{}.FastFingerprint()
|
|
|
|
fp := model.Metric{}.FastFingerprint()
|
|
|
|
|
|
|
|
|
|
|
|
_, it, err := s.preloadChunksForRange(fp, model.Earliest, model.Latest, false)
|
|
|
|
_, it, err := s.preloadChunksForRange(fp, model.Earliest, model.Latest)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -739,7 +739,7 @@ func benchmarkValueAtOrBeforeTime(b *testing.B, encoding chunkEncoding) {
|
|
|
|
|
|
|
|
|
|
|
|
fp := model.Metric{}.FastFingerprint()
|
|
|
|
fp := model.Metric{}.FastFingerprint()
|
|
|
|
|
|
|
|
|
|
|
|
_, it, err := s.preloadChunksForRange(fp, model.Earliest, model.Latest, false)
|
|
|
|
_, it, err := s.preloadChunksForRange(fp, model.Earliest, model.Latest)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
b.Fatalf("Error preloading everything: %s", err)
|
|
|
|
b.Fatalf("Error preloading everything: %s", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -820,7 +820,7 @@ func testRangeValues(t *testing.T, encoding chunkEncoding) {
|
|
|
|
|
|
|
|
|
|
|
|
fp := model.Metric{}.FastFingerprint()
|
|
|
|
fp := model.Metric{}.FastFingerprint()
|
|
|
|
|
|
|
|
|
|
|
|
_, it, err := s.preloadChunksForRange(fp, model.Earliest, model.Latest, false)
|
|
|
|
_, it, err := s.preloadChunksForRange(fp, model.Earliest, model.Latest)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -975,7 +975,7 @@ func benchmarkRangeValues(b *testing.B, encoding chunkEncoding) {
|
|
|
|
|
|
|
|
|
|
|
|
fp := model.Metric{}.FastFingerprint()
|
|
|
|
fp := model.Metric{}.FastFingerprint()
|
|
|
|
|
|
|
|
|
|
|
|
_, it, err := s.preloadChunksForRange(fp, model.Earliest, model.Latest, false)
|
|
|
|
_, it, err := s.preloadChunksForRange(fp, model.Earliest, model.Latest)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
b.Fatalf("Error preloading everything: %s", err)
|
|
|
|
b.Fatalf("Error preloading everything: %s", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1024,7 +1024,7 @@ func testEvictAndPurgeSeries(t *testing.T, encoding chunkEncoding) {
|
|
|
|
|
|
|
|
|
|
|
|
// Drop ~half of the chunks.
|
|
|
|
// Drop ~half of the chunks.
|
|
|
|
s.maintainMemorySeries(fp, 10000)
|
|
|
|
s.maintainMemorySeries(fp, 10000)
|
|
|
|
_, it, err := s.preloadChunksForRange(fp, model.Earliest, model.Latest, false)
|
|
|
|
_, it, err := s.preloadChunksForRange(fp, model.Earliest, model.Latest)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1045,7 +1045,7 @@ func testEvictAndPurgeSeries(t *testing.T, encoding chunkEncoding) {
|
|
|
|
|
|
|
|
|
|
|
|
// Drop everything.
|
|
|
|
// Drop everything.
|
|
|
|
s.maintainMemorySeries(fp, 100000)
|
|
|
|
s.maintainMemorySeries(fp, 100000)
|
|
|
|
_, it, err = s.preloadChunksForRange(fp, model.Earliest, model.Latest, false)
|
|
|
|
_, it, err = s.preloadChunksForRange(fp, model.Earliest, model.Latest)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
t.Fatalf("Error preloading everything: %s", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|