public double getStandardDeviation() { double mean = getMean(); return count > 0 ? Math.sqrt(sumSquares / count - mean * mean) : 0; }
public double getStandardDeviation() { double mean = getMean(); return count > 0 ? Math.sqrt(sumSquares / count - mean * mean) : 0; }
@Override public String toString() { return String.format("[N=%d, min=%f, max=%f, mean=%f, sigma=%f]", count, min, max, getMean(), getStandardDeviation()); } }
@Override public String toString() { return String.format("[N=%d, min=%f, max=%f, mean=%f, sigma=%f]", count, min, max, getMean(), getStandardDeviation()); } }
private double calculatePercentageComplete() { if (isFinished) { percentCompleteBasis = PercentCompleteBasis.ENDTIME; return 1; } if (stepExecutionHistory.getCount() == 0) { percentCompleteBasis = PercentCompleteBasis.NOHISTORY; return 0.5; } CumulativeHistory readHistory = stepExecutionHistory.getReadCount(); if (readHistory.getMean() == 0) { percentCompleteBasis = PercentCompleteBasis.DURATION; return getDurationBasedEstimate(duration); } percentCompleteBasis = PercentCompleteBasis.READCOUNT; return stepExecution.getReadCount() / readHistory.getMean(); }
private double calculatePercentageComplete() { if (isFinished) { percentCompleteBasis = PercentCompleteBasis.ENDTIME; return 1; } if (stepExecutionHistory.getCount() == 0) { percentCompleteBasis = PercentCompleteBasis.NOHISTORY; return 0.5; } CumulativeHistory readHistory = stepExecutionHistory.getReadCount(); if (readHistory.getMean() == 0) { percentCompleteBasis = PercentCompleteBasis.DURATION; return getDurationBasedEstimate(duration); } percentCompleteBasis = PercentCompleteBasis.READCOUNT; return stepExecution.getReadCount() / readHistory.getMean(); }