private static double calculateApdexScore(long satisfiedCount, long toleratingCount, long totalSamples) {
        // divide by zero
        if (totalSamples == 0) {
            return 0;
        }
        BigDecimal satisfied = BigDecimal.valueOf(satisfiedCount);
        BigDecimal tolerating = BigDecimal.valueOf(toleratingCount);
        BigDecimal total = BigDecimal.valueOf(totalSamples);


        BigDecimal toleratingScore = tolerating.divide(TWO, RoundingMode.FLOOR);
        BigDecimal numerator = satisfied.add(toleratingScore);
        BigDecimal score = numerator.divide(total, 3, RoundingMode.FLOOR);

        return score.doubleValue();
    }
<a href="https://en.wikipedia.org/wiki/Apdex">https://en.wikipedia.org/wiki/Apdex</a>
web/src/main/java/com/navercorp/pinpoint/web/applicationmap/histogram/ApdexScore.java