Class TaskStatistics

Object
TaskStatistics

public class TaskStatistics extends Object
Maintains statistics on the execution of a task (considering jobs in aggregate).
Author:
Owen Feehan
  • Constructor Details

    • TaskStatistics

      public TaskStatistics(long numberTotalScheduledJobs, RunningSum success, RunningSum failed)
      Creates a new TaskStatistics 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

      public RunningSum 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.