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

Commit

Permalink
pass correct interval to NewAggMetric()
Browse files Browse the repository at this point in the history
  • Loading branch information
Dieterbe committed Apr 10, 2019
1 parent 0393da0 commit f1f3de0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mdata/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,31 @@ func NewAggregator(store Store, cachePusher cache.CachePusher, key schema.AMKey,
case conf.Avg:
if aggregator.sumMetric == nil {
key.Archive = schema.NewArchive(schema.Sum, span)
aggregator.sumMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, 0, nil, dropFirstChunk)
aggregator.sumMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, span, nil, dropFirstChunk)
}
if aggregator.cntMetric == nil {
key.Archive = schema.NewArchive(schema.Cnt, span)
aggregator.cntMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, 0, nil, dropFirstChunk)
aggregator.cntMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, span, nil, dropFirstChunk)
}
case conf.Sum:
if aggregator.sumMetric == nil {
key.Archive = schema.NewArchive(schema.Sum, span)
aggregator.sumMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, 0, nil, dropFirstChunk)
aggregator.sumMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, span, nil, dropFirstChunk)
}
case conf.Lst:
if aggregator.lstMetric == nil {
key.Archive = schema.NewArchive(schema.Lst, span)
aggregator.lstMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, 0, nil, dropFirstChunk)
aggregator.lstMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, span, nil, dropFirstChunk)
}
case conf.Max:
if aggregator.maxMetric == nil {
key.Archive = schema.NewArchive(schema.Max, span)
aggregator.maxMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, 0, nil, dropFirstChunk)
aggregator.maxMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, span, nil, dropFirstChunk)
}
case conf.Min:
if aggregator.minMetric == nil {
key.Archive = schema.NewArchive(schema.Min, span)
aggregator.minMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, 0, nil, dropFirstChunk)
aggregator.minMetric = NewAggMetric(store, cachePusher, key, conf.Retentions{ret}, 0, span, nil, dropFirstChunk)
}
}
}
Expand Down

0 comments on commit f1f3de0

Please sign in to comment.