Skip to content
Permalink
Browse files

[IT-2819] Check in time if no data in backend available

  • Loading branch information...
DanielSteger authored and finnmartens committed Sep 30, 2019
1 parent f36dae0 commit 0669ed28ac33bb3c0ef62ff8f9c14486b21000d4
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/main/groovy/de/iteratec/osm/result/dao/query/AggregationUtil.groovy
@@ -61,6 +61,9 @@ class AggregationUtil {

static def getPercentile(List<Number> data, int percentage) {
data = data.findAll {it != null}
if(data.size() == 0) {
return
}
int index = (data.size() * (percentage.toFloat() / 100f)).toInteger()
index = Math.min(data.size() - 1, Math.max(0, index))
return getPercentileByIndex(data, index)

0 comments on commit 0669ed2

Please sign in to comment.
You can’t perform that action at this time.