in base/src/main/java/org/apache/sling/performance/PerformanceRecord.java [51:60]
public String checkThreshold(DescriptiveStatistics reference) {
if (threshold == null || threshold.doubleValue() <= 0) {
return null;
}
double ratio = this.statistics.getPercentile(50) / reference.getPercentile(50);
if (ratio > threshold.doubleValue()) {
return String.format("Threshold exceeded! Expected <%6.2f, actual %6.2f", threshold.doubleValue(), ratio);
}
return null;
}