Browse Source

Merge pull request #333 from prometheus/round-time

Round time to nearest second in memory storage.
pull/334/merge
juliusv 12 years ago
parent
commit
927435d68e
  1. 2
      storage/metric/memory.go

2
storage/metric/memory.go

@ -55,7 +55,7 @@ func (s *stream) add(timestamp time.Time, value clientmodel.SampleValue) {
// BUG(all): https://github.com/prometheus/prometheus/pull/265/files#r4336435. // BUG(all): https://github.com/prometheus/prometheus/pull/265/files#r4336435.
s.values = append(s.values, &SamplePair{ s.values = append(s.values, &SamplePair{
Timestamp: timestamp, Timestamp: timestamp.Round(time.Second).UTC(),
Value: value, Value: value,
}) })
} }

Loading…
Cancel
Save