Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
wu
Browse files Browse the repository at this point in the history
  • Loading branch information
Dieterbe committed May 20, 2018
1 parent 8031b63 commit 4bf5018
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions api/dataprocessor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@ func TestGetSeriesCachedStore(t *testing.T) {
metrics := mdata.NewAggMetrics(store, &cache.MockCache{}, false, 0, 0, 0)
srv.BindMemoryStore(metrics)
metric := test.GetAMKey(1)
var c *cache.CCache
var itgen *chunk.IterGen
var prevts uint32

Expand Down Expand Up @@ -527,7 +526,7 @@ func TestGetSeriesCachedStore(t *testing.T) {
}

// going through all testcases
for _, tc := range testcases {
for j, tc := range testcases {
fmt.Println("TESTCASE", tc)
pattern := tc.Pattern

Expand All @@ -541,12 +540,16 @@ func TestGetSeriesCachedStore(t *testing.T) {
// and various ranges between
// we increment from and to in thirds of a span,
// because incrementing by 1 would be needlessly expensive
step := span / 3
step := span / 2
i := 0
for from := start; from <= lastTs; from += step {
for to := from; to <= lastTs; to += step {
fmt.Println(from, to)
if j == 7 && i%20 == 0 {
fmt.Println(">", i)
}
i++
// use fresh store and cache
c = cache.NewCCache()
c := cache.NewCCache()
srv.BindCache(c)
store.Reset()

Expand Down Expand Up @@ -591,7 +594,7 @@ func TestGetSeriesCachedStore(t *testing.T) {
// we use the tsTracker to increase together with the iterators and compare at each step
tsTracker := expectResFrom

tsSlice := make([]uint32, 0)
var tsSlice []uint32
for i, it := range iters {
for it.Next() {
ts, _ := it.Values()
Expand Down Expand Up @@ -676,8 +679,8 @@ func TestGetSeriesCachedStore(t *testing.T) {
c.Stop()
}
}
fmt.Println("DID", i, "iterations")
}
fmt.Println("all done")
}

func TestGetSeriesAggMetrics(t *testing.T) {
Expand Down

0 comments on commit 4bf5018

Please sign in to comment.