Fix WAL tests

pull/5805/head
Fabian Reinartz 8 years ago
parent e006bc6dc6
commit 2f02f86b62

@ -32,16 +32,16 @@ func BenchmarkWALWrite(b *testing.B) {
require.NoError(b, err) require.NoError(b, err)
var ( var (
samples [][]hashedSample samples [][]refdSample
ts int64 ts int64
) )
for i := 0; i < 300; i++ { for i := 0; i < 300; i++ {
ts += int64(30000) ts += int64(30000)
scrape := make([]hashedSample, 0, len(series)) scrape := make([]refdSample, 0, len(series))
for ref := range series { for ref := range series {
scrape = append(scrape, hashedSample{ scrape = append(scrape, refdSample{
ref: uint32(ref), ref: uint64(ref),
t: ts, t: ts,
v: 12345788, v: 12345788,
}) })
@ -83,16 +83,16 @@ func BenchmarkWALRead(b *testing.B) {
require.NoError(b, err) require.NoError(b, err)
var ( var (
samples [][]hashedSample samples [][]refdSample
ts int64 ts int64
) )
for i := 0; i < 300; i++ { for i := 0; i < 300; i++ {
ts += int64(30000) ts += int64(30000)
scrape := make([]hashedSample, 0, len(bseries)) scrape := make([]refdSample, 0, len(bseries))
for ref := range bseries { for ref := range bseries {
scrape = append(scrape, hashedSample{ scrape = append(scrape, refdSample{
ref: uint32(ref), ref: uint64(ref),
t: ts, t: ts,
v: 12345788, v: 12345788,
}) })
@ -119,7 +119,7 @@ func BenchmarkWALRead(b *testing.B) {
err = wal.ReadAll(&walHandler{ err = wal.ReadAll(&walHandler{
series: func(lset labels.Labels) { numSeries++ }, series: func(lset labels.Labels) { numSeries++ },
sample: func(smpl hashedSample) { numSamples++ }, sample: func(smpl refdSample) { numSamples++ },
}) })
require.NoError(b, err) require.NoError(b, err)
@ -149,16 +149,16 @@ func BenchmarkWALReadIntoHead(b *testing.B) {
require.NoError(b, err) require.NoError(b, err)
var ( var (
samples [][]hashedSample samples [][]refdSample
ts int64 ts int64
) )
for i := 0; i < 300; i++ { for i := 0; i < 300; i++ {
ts += int64(30000) ts += int64(30000)
scrape := make([]hashedSample, 0, len(bseries)) scrape := make([]refdSample, 0, len(bseries))
for ref := range bseries { for ref := range bseries {
scrape = append(scrape, hashedSample{ scrape = append(scrape, refdSample{
ref: uint32(ref), ref: uint64(ref),
t: ts, t: ts,
v: 12345788, v: 12345788,
}) })

Loading…
Cancel
Save