Like the other aggregation functions, the datapoints need to be sorted in time before calling groupBy_perf().
This commit is contained in:
committed by
Alexander Zobnin
parent
d54d6d29dc
commit
dd28b28174
@@ -121,9 +121,11 @@ function aggregateWrapper(groupByCallback, interval, datapoints) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function percentile(interval, n, datapoints) {
|
function percentile(interval, n, datapoints) {
|
||||||
var flattenedPoints = ts.flattenDatapoints(datapoints);
|
const flattenedPoints = ts.flattenDatapoints(datapoints);
|
||||||
var groupByCallback = _.partial(PERCENTILE, n);
|
// groupBy_perf works with sorted series only
|
||||||
return groupBy(flattenedPoints, interval, groupByCallback);
|
const sortedPoints = ts.sortByTime(flattenedPoints);
|
||||||
|
let groupByCallback = _.partial(PERCENTILE, n);
|
||||||
|
return groupBy(sortedPoints, interval, groupByCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
function timeShift(interval, range) {
|
function timeShift(interval, range) {
|
||||||
|
|||||||
Reference in New Issue
Block a user