Uses SeriesN instead of copying sketches

Avoids some extra allocations.
pull/8348/head
Jason Wilder 2017-05-04 10:12:38 -06:00
parent bc639c5982
commit fc34d30038
1 changed files with 1 additions and 9 deletions

View File

@ -208,15 +208,7 @@ func (s *Shard) Statistics(tags map[string]string) []models.Statistic {
// Refresh our disk size stat
_, _ = s.DiskSize()
// TODO(edd): Should statSeriesCreate be the current number of series in the
// shard, or the total number of series ever created?
sSketch, tSketch, err := s.engine.SeriesSketches()
seriesN := int64(sSketch.Count() - tSketch.Count())
if err != nil {
s.logger.Error("cannot compute series sketch", zap.Error(err))
seriesN = 0
}
seriesN := s.engine.SeriesN()
tags = s.defaultTags.Merge(tags)
statistics := []models.Statistic{{