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()); } }
public void append(StepExecution stepExecution) { if (stepExecution.getEndTime() == null) { // ignore unfinished executions return; } Date startTime = stepExecution.getStartTime(); Date endTime = stepExecution.getEndTime(); long time = endTime.getTime() - startTime.getTime(); duration.append(time); if (stepExecution.getReadCount() > 0) { durationPerRead.append(time / stepExecution.getReadCount()); } count++; commitCount.append(stepExecution.getCommitCount()); rollbackCount.append(stepExecution.getRollbackCount()); readCount.append(stepExecution.getReadCount()); writeCount.append(stepExecution.getWriteCount()); filterCount.append(stepExecution.getFilterCount()); readSkipCount.append(stepExecution.getReadSkipCount()); writeSkipCount.append(stepExecution.getWriteSkipCount()); processSkipCount.append(stepExecution.getProcessSkipCount()); }
.addValue(progressInfoResource.getStepExecution().getLastUpdated()); modelBuilder.addRow().addValue("Read Count ") .addValue(progressInfoResource.getStepExecutionHistory().getReadCount().getCount()); modelBuilder.addRow().addValue("Write Count ") .addValue(progressInfoResource.getStepExecutionHistory().getWriteCount().getCount()); modelBuilder.addRow().addValue("Filter Count ") .addValue(progressInfoResource.getStepExecutionHistory().getFilterCount().getCount()); modelBuilder.addRow().addValue("Read Skip Count ") .addValue(progressInfoResource.getStepExecutionHistory().getReadSkipCount().getCount()); modelBuilder.addRow().addValue("Write Skip Count ") .addValue(progressInfoResource.getStepExecutionHistory().getWriteSkipCount().getCount()); modelBuilder.addRow().addValue("Process Skip Count ") .addValue(progressInfoResource.getStepExecutionHistory().getProcessSkipCount().getCount()); modelBuilder.addRow().addValue("Read Skip Count ") .addValue(progressInfoResource.getStepExecutionHistory().getReadSkipCount().getCount()); modelBuilder.addRow().addValue("Commit Count ") .addValue(progressInfoResource.getStepExecutionHistory().getCommitCount().getCount()); modelBuilder.addRow().addValue("Rollback Count ") .addValue(progressInfoResource.getStepExecutionHistory().getRollbackCount().getCount()); modelBuilder.addRow().addValue("Exit Status ") .addValue(progressInfoResource.getStepExecution().getExitStatus().getExitCode());
public void append(StepExecution stepExecution) { if (stepExecution.getEndTime() == null) { // ignore unfinished executions return; } Date startTime = stepExecution.getStartTime(); Date endTime = stepExecution.getEndTime(); long time = endTime.getTime() - startTime.getTime(); duration.append(time); if (stepExecution.getReadCount() > 0) { durationPerRead.append(time / stepExecution.getReadCount()); } count++; commitCount.append(stepExecution.getCommitCount()); rollbackCount.append(stepExecution.getRollbackCount()); readCount.append(stepExecution.getReadCount()); writeCount.append(stepExecution.getWriteCount()); filterCount.append(stepExecution.getFilterCount()); readSkipCount.append(stepExecution.getReadSkipCount()); writeSkipCount.append(stepExecution.getWriteSkipCount()); processSkipCount.append(stepExecution.getProcessSkipCount()); }
.addValue(progressInfoResource.getStepExecution().getLastUpdated()); modelBuilder.addRow().addValue("Read Count ") .addValue(progressInfoResource.getStepExecutionHistory().getReadCount().getCount()); modelBuilder.addRow().addValue("Write Count ") .addValue(progressInfoResource.getStepExecutionHistory().getWriteCount().getCount()); modelBuilder.addRow().addValue("Filter Count ") .addValue(progressInfoResource.getStepExecutionHistory().getFilterCount().getCount()); modelBuilder.addRow().addValue("Read Skip Count ") .addValue(progressInfoResource.getStepExecutionHistory().getReadSkipCount().getCount()); modelBuilder.addRow().addValue("Write Skip Count ") .addValue(progressInfoResource.getStepExecutionHistory().getWriteSkipCount().getCount()); modelBuilder.addRow().addValue("Process Skip Count ") .addValue(progressInfoResource.getStepExecutionHistory().getProcessSkipCount().getCount()); modelBuilder.addRow().addValue("Read Skip Count ") .addValue(progressInfoResource.getStepExecutionHistory().getReadSkipCount().getCount()); modelBuilder.addRow().addValue("Commit Count ") .addValue(progressInfoResource.getStepExecutionHistory().getCommitCount().getCount()); modelBuilder.addRow().addValue("Rollback Count ") .addValue(progressInfoResource.getStepExecutionHistory().getRollbackCount().getCount()); modelBuilder.addRow().addValue("Exit Status ") .addValue(progressInfoResource.getStepExecution().getExitStatus().getExitCode());
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()); } }
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(); }