protected final double asSuccessFactorDeviation(int attempts, int failures) {
        double factor = attempts == 0 ? 1.0 : 1 - (double) failures / attempts;
        return new BigDecimal(factor - successFactorBaseline).setScale(5, RoundingMode.HALF_UP).doubleValue();
    }
Convenience methods to convert attempts and failures into a success factor deviation from the baseline, and return
vespajlib/src/main/java/com/yahoo/concurrent/maintenance/Maintainer.java