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();
}