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

	}
Represents Batch job step execution progress info.

@author Dave Syer
@author Ilayaperumal Gopinathan
@author Gary Russell
@since 1.0
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/job/StepExecutionProgressInfo.java