Class ExecutionTimeRecorderIgnore

Object
ExecutionTimeRecorder
ExecutionTimeRecorderIgnore

public class ExecutionTimeRecorderIgnore extends ExecutionTimeRecorder
An implementation of ExecutionTimeRecorder that is a simple placeholder that does nothing.
Author:
Owen Feehan
  • Constructor Details

    • ExecutionTimeRecorderIgnore

      public ExecutionTimeRecorderIgnore()
  • Method Details

    • instance

      public static ExecutionTimeRecorder instance()
      Singleton instance.
      Returns:
      the instance.
    • recordExecutionTime

      public void recordExecutionTime(String operationIdentifier, long millis)
      Description copied from class: ExecutionTimeRecorder
      Records the execution-time of a particular operation.
      Specified by:
      recordExecutionTime in class ExecutionTimeRecorder
      Parameters:
      operationIdentifier - a string uniquely identifying the operation.
      millis - how long the operation took in milliseconds.
    • recordedTimes

      public RecordedExecutionTimes recordedTimes()
      Description copied from class: ExecutionTimeRecorder
      The execution-times that have been recorded.
      Specified by:
      recordedTimes in class ExecutionTimeRecorder
      Returns:
      newly created RecordedExecutionTimes that describes the execution-times.
    • isOperationAlreadyRecorded

      public boolean isOperationAlreadyRecorded(String operationIdentifier)
      Description copied from class: ExecutionTimeRecorder
      Has a particular operation already been recorded?
      Specified by:
      isOperationAlreadyRecorded in class ExecutionTimeRecorder
      Parameters:
      operationIdentifier - a string uniquely identifying the operation.
      Returns:
      true if the operation has already been recorded at least once, false otherwise.
    • measureTime

      public long measureTime(boolean start, String... operationIdentifiers)
      Description copied from class: ExecutionTimeRecorder
      Indicates operationIdentifier is being recorded, and returns the current clock timestamp.
      Specified by:
      measureTime in class ExecutionTimeRecorder
      Parameters:
      start - true, if this time indicates the start of an operation. false, if it only describes the end.
      operationIdentifiers - all possible identifiers that may subsequently be used to record an end-time for this operation.
      Returns:
      the a system clock timestamp (in milliseconds since the epoch).