mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
change pdiff to percent_diff for conditions
This commit is contained in:
@@ -117,7 +117,7 @@ func (s *SimpleReducer) Reduce(series *tsdb.TimeSeries) null.Float {
|
||||
break
|
||||
}
|
||||
}
|
||||
case "pdiff":
|
||||
case "percent_diff":
|
||||
var (
|
||||
points = series.Points
|
||||
first float64
|
||||
|
||||
@@ -86,8 +86,8 @@ func TestSimpleReducer(t *testing.T) {
|
||||
So(result, ShouldEqual, float64(10))
|
||||
})
|
||||
|
||||
Convey("pdiff", func() {
|
||||
result := testReducer("pdiff", 30, 40)
|
||||
Convey("percent_diff", func() {
|
||||
result := testReducer("percent_diff", 30, 40)
|
||||
So(result, ShouldEqual, float64(33.33333333333333))
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user