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 newTaskStatistics
instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Did all jobs execute and completely successfully?Execution-time of all jobs in milliseconds, ignoring any parallelism.double
Mean execution-time of failed jobs in milliseconds.double
Mean execution-time of successfully-completed jobs in milliseconds.long
The number of jobs that completed with failure.long
The number of jobs that completed successfully.long
The number of jobs that completed in total.long
Number of jobs that have not been completed.long
Total number of scheduled jobs.
-
Constructor Details
-
TaskStatistics
Creates a newTaskStatistics
instance.- 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.
-