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

Commit f1f3de0

Browse files
committed
pass correct interval to NewAggMetric()
1 parent 0393da0 commit f1f3de0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mdata/aggregator.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -43,31 +43,31 @@ func NewAggregator(store Store, cachePusher cache.CachePusher, key schema.AMKey,
4343
case conf.Avg:
4444
if aggregator.sumMetric == nil {
4545
key.Archive = schema.NewArchive(schema.Sum, span)
46-
aggregator.sumMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, 0, nil, dropFirstChunk)
46+
aggregator.sumMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, span, nil, dropFirstChunk)
4747
}
4848
if aggregator.cntMetric == nil {
4949
key.Archive = schema.NewArchive(schema.Cnt, span)
50-
aggregator.cntMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, 0, nil, dropFirstChunk)
50+
aggregator.cntMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, span, nil, dropFirstChunk)
5151
}
5252
case conf.Sum:
5353
if aggregator.sumMetric == nil {
5454
key.Archive = schema.NewArchive(schema.Sum, span)
55-
aggregator.sumMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, 0, nil, dropFirstChunk)
55+
aggregator.sumMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, span, nil, dropFirstChunk)
5656
}
5757
case conf.Lst:
5858
if aggregator.lstMetric == nil {
5959
key.Archive = schema.NewArchive(schema.Lst, span)
60-
aggregator.lstMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, 0, nil, dropFirstChunk)
60+
aggregator.lstMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, span, nil, dropFirstChunk)
6161
}
6262
case conf.Max:
6363
if aggregator.maxMetric == nil {
6464
key.Archive = schema.NewArchive(schema.Max, span)
65-
aggregator.maxMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, 0, nil, dropFirstChunk)
65+
aggregator.maxMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, span, nil, dropFirstChunk)
6666
}
6767
case conf.Min:
6868
if aggregator.minMetric == nil {
6969
key.Archive = schema.NewArchive(schema.Min, span)
70-
aggregator.minMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, 0, nil, dropFirstChunk)
70+
aggregator.minMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, span, nil, dropFirstChunk)
7171
}
7272
}
7373
}

0 commit comments

Comments
 (0)