public double getValueAtPercentile(GaugeMetricValue value, int p) { SparseHistogram histo = value.getHistogram(); int binNo = histo.getBinAfterPercentile(p); if (binNo == -1) { return Double.NaN; } return INSIGHT_HISTO.getBinDefinition(binNo).getStart(); }