Class TaskStatistics
Object
TaskStatistics
Maintains statistics on the execution of a task (considering jobs in aggregate).
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionTaskStatistics(long numberTotalScheduledJobs, RunningSum success, RunningSum failed) Creates a newTaskStatisticsinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDid all jobs execute and completely successfully?Execution-time of all jobs in milliseconds, ignoring any parallelism.doubleMean execution-time of failed jobs in milliseconds.doubleMean execution-time of successfully-completed jobs in milliseconds.longThe number of jobs that completed with failure.longThe number of jobs that completed successfully.longThe number of jobs that completed in total.longNumber of jobs that have not been completed.longTotal number of scheduled jobs.
-
Constructor Details
-
TaskStatistics
Creates a newTaskStatisticsinstance.- Parameters:
numberTotalScheduledJobs- Total number of scheduled jobs.success- Execution time (in milliseconds) for of tasks that successfully completed.failed- Execution time (in milliseconds) for of tasks that failed.
-
-
Method Details
-
numberNotCompleted
public long numberNotCompleted()Number of jobs that have not been completed.- Returns:
- the number of jobs.
-
executionTimeTotal
Execution-time of all jobs in milliseconds, ignoring any parallelism.- Returns:
- the total execution-time.
-
meanExecutionTimeSuccess
public double meanExecutionTimeSuccess()Mean execution-time of successfully-completed jobs in milliseconds.- Returns:
- the mean execution-time.
-
meanExecutionTimeFailed
public double meanExecutionTimeFailed()Mean execution-time of failed jobs in milliseconds.- Returns:
- the mean execution-time.
-
allSuccessful
public boolean allSuccessful()Did all jobs execute and completely successfully?- Returns:
- true if yes, false if no.
-
numberCompletedSuccess
public long numberCompletedSuccess()The number of jobs that completed successfully.- Returns:
- the number of jobs.
-
numberCompletedFailed
public long numberCompletedFailed()The number of jobs that completed with failure.- Returns:
- the number of jobs.
-
numberCompletedTotal
public long numberCompletedTotal()The number of jobs that completed in total.- Returns:
- the number of jobs.
-
numberTotalScheduledJobs
public long numberTotalScheduledJobs()Total number of scheduled jobs.
-