public double failureRate() {
        final long total = total();
        if (total == 0) {
            throw new ArithmeticException("Failed to calculate failure rate since total count is 0");
        }
        return failure / (double) total;
    }
Returns the failure rate (failure/total), or throws an {@link ArithmeticException} if total is 0.
core/src/main/java/com/linecorp/armeria/common/util/EventCount.java