mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-13 14:57:40 -08:00
Merge branch 'release-1.7'
This commit is contained in:
commit
3bb0667607
|
@ -1,3 +1,7 @@
|
||||||
|
## 1.7.1 / 2017-06-12
|
||||||
|
|
||||||
|
* [BUGFIX] Fix double prefix redirect.
|
||||||
|
|
||||||
## 1.7.0 / 2017-06-06
|
## 1.7.0 / 2017-06-06
|
||||||
|
|
||||||
* [CHANGE] Compress remote storage requests and responses with unframed/raw snappy.
|
* [CHANGE] Compress remote storage requests and responses with unframed/raw snappy.
|
||||||
|
|
|
@ -1040,7 +1040,7 @@ func (it *varbitChunkIterator) FindAtOrBefore(t model.Time) bool {
|
||||||
prevT = model.Earliest
|
prevT = model.Earliest
|
||||||
prevV model.SampleValue
|
prevV model.SampleValue
|
||||||
)
|
)
|
||||||
for it.Scan() && t.After(it.t) {
|
for it.Scan() && !t.Before(it.t) {
|
||||||
prevT = it.t
|
prevT = it.t
|
||||||
prevV = it.v
|
prevV = it.v
|
||||||
// TODO(beorn7): If we are in a repeat, we could iterate forward
|
// TODO(beorn7): If we are in a repeat, we could iterate forward
|
||||||
|
|
|
@ -980,6 +980,28 @@ func testValueAtOrBeforeTime(t *testing.T, encoding chunk.Encoding) {
|
||||||
if expected.Value != actual.Value {
|
if expected.Value != actual.Value {
|
||||||
t.Errorf("3.2. Got %v; want %v", actual.Value, expected.Value)
|
t.Errorf("3.2. Got %v; want %v", actual.Value, expected.Value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// #4 Query alternatingly exactly on and just between timestamps.
|
||||||
|
// Exposes issue #2965.
|
||||||
|
for i, expected := range samples {
|
||||||
|
i *= 2
|
||||||
|
actual := it.ValueAtOrBeforeTime(expected.Timestamp)
|
||||||
|
if expected.Timestamp != actual.Timestamp {
|
||||||
|
t.Errorf("4.%d. Got %v; want %v", i, actual.Timestamp, expected.Timestamp)
|
||||||
|
}
|
||||||
|
if expected.Value != actual.Value {
|
||||||
|
t.Errorf("4.%d. Got %v; want %v", i, actual.Value, expected.Value)
|
||||||
|
}
|
||||||
|
|
||||||
|
i++
|
||||||
|
actual = it.ValueAtOrBeforeTime(expected.Timestamp + 1)
|
||||||
|
if expected.Timestamp != actual.Timestamp {
|
||||||
|
t.Errorf("4.%d. Got %v; want %v", i, actual.Timestamp, expected.Timestamp)
|
||||||
|
}
|
||||||
|
if expected.Value != actual.Value {
|
||||||
|
t.Errorf("4.%d. Got %v; want %v", i, actual.Value, expected.Value)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestValueAtTimeChunkType0(t *testing.T) {
|
func TestValueAtTimeChunkType0(t *testing.T) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue