From ec5b5bae287131e3498950c642dc5d0917045068 Mon Sep 17 00:00:00 2001 From: "Matt T. Proud" Date: Mon, 20 May 2013 20:31:58 +0200 Subject: [PATCH] Fuck you, Travis. --- .travis.yml | 14 ++++++++++---- storage/metric/memory.go | 12 ++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7a9d985ec..487339e28 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,11 +2,17 @@ language: go -# Detective work is required to ascertain why this is required BOTH in the -# before_script directive and in the shell library. +# Explicitly stop before_script from doing anything by giving 'em nil work. before_script: - - gvm install go1.1 || true - - gvm use go1.1 || true + - echo "Before Script" + +# Explicitly stop install from doing anything by giving 'em nil work. +install: + - echo "Install" script: + - echo "Script" + - cd ${TRAVIS_BUILD_DIR} + - gvm install go1.1 || true + - gvm use go1.1 || true - bash -l ./tests-for-die-in-a-fire-travis.sh diff --git a/storage/metric/memory.go b/storage/metric/memory.go index 3cb8c3564..c4c3639e2 100644 --- a/storage/metric/memory.go +++ b/storage/metric/memory.go @@ -186,7 +186,7 @@ func (s *memorySeriesStorage) GetFingerprintsForLabelSet(l model.LabelSet) (fing return fingerprints, nil } -func (s *memorySeriesStorage) GetFingerprintsForLabelName(l model.LabelName) (fingerprints model.Fingerprints, err error) { +func (s *memorySeriesStorage) GetFingerprintsForLabelName(l model.LabelName) (fingerprints model.Fingerprints, _ error) { values := s.labelNameToFingerprints[l] fingerprints = append(fingerprints, values...) @@ -194,7 +194,7 @@ func (s *memorySeriesStorage) GetFingerprintsForLabelName(l model.LabelName) (fi return fingerprints, nil } -func (s memorySeriesStorage) GetMetricForFingerprint(f model.Fingerprint) (model.Metric, error) { +func (s *memorySeriesStorage) GetMetricForFingerprint(f model.Fingerprint) (model.Metric, error) { series, ok := s.fingerprintToSeries[f] if !ok { return nil, nil @@ -249,7 +249,7 @@ func (s *memorySeriesStorage) GetValueAtTime(f model.Fingerprint, t time.Time) ( return samples } -func (s memorySeriesStorage) GetBoundaryValues(f model.Fingerprint, i model.Interval) (model.Values, model.Values) { +func (s *memorySeriesStorage) GetBoundaryValues(f model.Fingerprint, i model.Interval) (model.Values, model.Values) { return s.GetValueAtTime(f, i.OldestInclusive), s.GetValueAtTime(f, i.NewestInclusive) } @@ -295,7 +295,7 @@ func (s *memorySeriesStorage) GetRangeValues(f model.Fingerprint, i model.Interv return samples } -func (s memorySeriesStorage) Close() { +func (s *memorySeriesStorage) Close() { s.fingerprintToSeries = map[model.Fingerprint]*stream{} s.labelPairToFingerprints = map[model.LabelPair]model.Fingerprints{} s.labelNameToFingerprints = map[model.LabelName]model.Fingerprints{} @@ -324,8 +324,8 @@ func (s *memorySeriesStorage) ForEachSample(builder IteratorsForFingerprintBuild return } -func NewMemorySeriesStorage() memorySeriesStorage { - return memorySeriesStorage{ +func NewMemorySeriesStorage() *memorySeriesStorage { + return &memorySeriesStorage{ fingerprintToSeries: make(map[model.Fingerprint]*stream), labelPairToFingerprints: make(map[model.LabelPair]model.Fingerprints), labelNameToFingerprints: make(map[model.LabelName]model.Fingerprints),