mirror of
https://github.com/prometheus/prometheus.git
synced 2025-07-03 02:53:24 +00:00
Fix handling of negative deltas for non-counter values.
This commit is contained in:
parent
a8468a2e5e
commit
138334fb31
3 changed files with 30 additions and 11 deletions
|
@ -145,13 +145,20 @@ var testMatrix = ast.Matrix{
|
|||
},
|
||||
Values: getTestValueStream(0, 100, 10, testStartTime),
|
||||
},
|
||||
// Counter resets.
|
||||
// Counter reset in the middle of range.
|
||||
{
|
||||
Metric: model.Metric{
|
||||
model.MetricNameLabel: "testcounter",
|
||||
model.MetricNameLabel: "testcounter_reset_middle",
|
||||
},
|
||||
Values: append(getTestValueStream(0, 40, 10, testStartTime), getTestValueStream(0, 50, 10, testStartTime.Add(testSampleInterval*5))...),
|
||||
},
|
||||
// Counter reset at the end of range.
|
||||
{
|
||||
Metric: model.Metric{
|
||||
model.MetricNameLabel: "testcounter_reset_end",
|
||||
},
|
||||
Values: append(getTestValueStream(0, 90, 10, testStartTime), getTestValueStream(0, 0, 10, testStartTime.Add(testSampleInterval*10))...),
|
||||
},
|
||||
}
|
||||
|
||||
var testVector = getTestVectorFromTestMatrix(testMatrix)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue