Package org.anchoranalysis.core.time
Class ExecutionTimeRecorderIgnore
Object
ExecutionTimeRecorder
ExecutionTimeRecorderIgnore
An implementation of
ExecutionTimeRecorder
that is a simple placeholder that does
nothing.- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutionTimeRecorder
instance()
Singleton instance.boolean
isOperationAlreadyRecorded
(String operationIdentifier) Has a particular operation already been recorded?long
measureTime
(boolean start, String... operationIdentifiers) IndicatesoperationIdentifier
is being recorded, and returns the current clock timestamp.The execution-times that have been recorded.void
recordExecutionTime
(String operationIdentifier, long millis) Records the execution-time of a particular operation.Methods inherited from class org.anchoranalysis.core.time.ExecutionTimeRecorder
recordExecutionTime, recordExecutionTime, recordExecutionTimeUnchecked, recordTimeDifferenceBetween
-
Constructor Details
-
ExecutionTimeRecorderIgnore
public ExecutionTimeRecorderIgnore()
-
-
Method Details
-
instance
Singleton instance.- Returns:
- the instance.
-
recordExecutionTime
Description copied from class:ExecutionTimeRecorder
Records the execution-time of a particular operation.- Specified by:
recordExecutionTime
in classExecutionTimeRecorder
- Parameters:
operationIdentifier
- a string uniquely identifying the operation.millis
- how long the operation took in milliseconds.
-
recordedTimes
Description copied from class:ExecutionTimeRecorder
The execution-times that have been recorded.- Specified by:
recordedTimes
in classExecutionTimeRecorder
- Returns:
- newly created
RecordedExecutionTimes
that describes the execution-times.
-
isOperationAlreadyRecorded
Description copied from class:ExecutionTimeRecorder
Has a particular operation already been recorded?- Specified by:
isOperationAlreadyRecorded
in classExecutionTimeRecorder
- Parameters:
operationIdentifier
- a string uniquely identifying the operation.- Returns:
- true if the operation has already been recorded at least once, false otherwise.
-
measureTime
Description copied from class:ExecutionTimeRecorder
IndicatesoperationIdentifier
is being recorded, and returns the current clock timestamp.- Specified by:
measureTime
in classExecutionTimeRecorder
- 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).
-