From 2f02f86b62cd5062ef5d4658b651e7da292b83b7 Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Thu, 19 Jan 2017 08:48:11 +0100 Subject: [PATCH] Fix WAL tests --- wal_test.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/wal_test.go b/wal_test.go index 4baabf094..6e6f81ab5 100644 --- a/wal_test.go +++ b/wal_test.go @@ -32,16 +32,16 @@ func BenchmarkWALWrite(b *testing.B) { require.NoError(b, err) var ( - samples [][]hashedSample + samples [][]refdSample ts int64 ) for i := 0; i < 300; i++ { ts += int64(30000) - scrape := make([]hashedSample, 0, len(series)) + scrape := make([]refdSample, 0, len(series)) for ref := range series { - scrape = append(scrape, hashedSample{ - ref: uint32(ref), + scrape = append(scrape, refdSample{ + ref: uint64(ref), t: ts, v: 12345788, }) @@ -83,16 +83,16 @@ func BenchmarkWALRead(b *testing.B) { require.NoError(b, err) var ( - samples [][]hashedSample + samples [][]refdSample ts int64 ) for i := 0; i < 300; i++ { ts += int64(30000) - scrape := make([]hashedSample, 0, len(bseries)) + scrape := make([]refdSample, 0, len(bseries)) for ref := range bseries { - scrape = append(scrape, hashedSample{ - ref: uint32(ref), + scrape = append(scrape, refdSample{ + ref: uint64(ref), t: ts, v: 12345788, }) @@ -119,7 +119,7 @@ func BenchmarkWALRead(b *testing.B) { err = wal.ReadAll(&walHandler{ series: func(lset labels.Labels) { numSeries++ }, - sample: func(smpl hashedSample) { numSamples++ }, + sample: func(smpl refdSample) { numSamples++ }, }) require.NoError(b, err) @@ -149,16 +149,16 @@ func BenchmarkWALReadIntoHead(b *testing.B) { require.NoError(b, err) var ( - samples [][]hashedSample + samples [][]refdSample ts int64 ) for i := 0; i < 300; i++ { ts += int64(30000) - scrape := make([]hashedSample, 0, len(bseries)) + scrape := make([]refdSample, 0, len(bseries)) for ref := range bseries { - scrape = append(scrape, hashedSample{ - ref: uint32(ref), + scrape = append(scrape, refdSample{ + ref: uint64(ref), t: ts, v: 12345788, })