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 ExecutionTimeRecorderinstance()Singleton instance.booleanisOperationAlreadyRecorded(String operationIdentifier) Has a particular operation already been recorded?longmeasureTime(boolean start, String... operationIdentifiers) IndicatesoperationIdentifieris being recorded, and returns the current clock timestamp.The execution-times that have been recorded.voidrecordExecutionTime(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:ExecutionTimeRecorderRecords the execution-time of a particular operation.- Specified by:
recordExecutionTimein classExecutionTimeRecorder- Parameters:
operationIdentifier- a string uniquely identifying the operation.millis- how long the operation took in milliseconds.
-
recordedTimes
Description copied from class:ExecutionTimeRecorderThe execution-times that have been recorded.- Specified by:
recordedTimesin classExecutionTimeRecorder- Returns:
- newly created
RecordedExecutionTimesthat describes the execution-times.
-
isOperationAlreadyRecorded
Description copied from class:ExecutionTimeRecorderHas a particular operation already been recorded?- Specified by:
isOperationAlreadyRecordedin 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:ExecutionTimeRecorderIndicatesoperationIdentifieris being recorded, and returns the current clock timestamp.- Specified by:
measureTimein 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).
-