diff --git a/storage/metric/interface.go b/storage/metric/interface.go index 379988c07..a3c58ceb8 100644 --- a/storage/metric/interface.go +++ b/storage/metric/interface.go @@ -43,7 +43,7 @@ type MetricPersistence interface { GetMetricForFingerprint(model.Fingerprint) (*model.Metric, error) GetValueAtTime(model.Metric, time.Time, StalenessPolicy) (*model.Sample, error) - GetBoundaryValues(*model.Metric, *model.Interval, *StalenessPolicy) (*model.Sample, *model.Sample, error) + GetBoundaryValues(model.Metric, model.Interval, StalenessPolicy) (*model.Sample, *model.Sample, error) GetRangeValues(*model.Metric, *model.Interval, *StalenessPolicy) (*model.SampleSet, error) GetAllMetricNames() ([]string, error) diff --git a/storage/metric/leveldb/reading.go b/storage/metric/leveldb/reading.go index 0be23a20e..a0a0952aa 100644 --- a/storage/metric/leveldb/reading.go +++ b/storage/metric/leveldb/reading.go @@ -290,7 +290,7 @@ func (l *LevelDBMetricPersistence) GetMetricForFingerprint(f model.Fingerprint) return } -func (l *LevelDBMetricPersistence) GetBoundaryValues(m *model.Metric, i *model.Interval, s *metric.StalenessPolicy) (open *model.Sample, end *model.Sample, err error) { +func (l *LevelDBMetricPersistence) GetBoundaryValues(m model.Metric, i model.Interval, s metric.StalenessPolicy) (open *model.Sample, end *model.Sample, err error) { begin := time.Now() defer func() { @@ -300,14 +300,14 @@ func (l *LevelDBMetricPersistence) GetBoundaryValues(m *model.Metric, i *model.I }() // XXX: Maybe we will want to emit incomplete sets? - open, err = l.GetValueAtTime(*m, i.OldestInclusive, *s) + open, err = l.GetValueAtTime(m, i.OldestInclusive, s) if err != nil { return } else if open == nil { return } - end, err = l.GetValueAtTime(*m, i.NewestInclusive, *s) + end, err = l.GetValueAtTime(m, i.NewestInclusive, s) if err != nil { return } else if end == nil { diff --git a/storage/metric/leveldb/rule_integration_test.go b/storage/metric/leveldb/rule_integration_test.go index 9b25a4762..14beb6884 100644 --- a/storage/metric/leveldb/rule_integration_test.go +++ b/storage/metric/leveldb/rule_integration_test.go @@ -1058,7 +1058,7 @@ var testGetBoundaryValues = func(t test.Tester) { DeltaAllowance: input.staleness, } - openValue, endValue, err := persistence.GetBoundaryValues(&m, &interval, &p) + openValue, endValue, err := persistence.GetBoundaryValues(m, interval, p) if err != nil { t.Errorf("%d.%d(%s). Could not query for value: %q\n", i, j, behavior.name, err) }