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) {
|
||||
var flattenedPoints = ts.flattenDatapoints(datapoints);
|
||||
var groupByCallback = _.partial(PERCENTILE, n);
|
||||
return groupBy(flattenedPoints, interval, groupByCallback);
|
||||
const flattenedPoints = ts.flattenDatapoints(datapoints);
|
||||
// groupBy_perf works with sorted series only
|
||||
const sortedPoints = ts.sortByTime(flattenedPoints);
|
||||
let groupByCallback = _.partial(PERCENTILE, n);
|
||||
return groupBy(sortedPoints, interval, groupByCallback);
|
||||
}
|
||||
|
||||
function timeShift(interval, range) {
|
||||
|
||||
Reference in New Issue
Block a user