Package com.nomagic.magicdraw.uml2.util
Interface TimeTracker
-
- All Known Implementing Classes:
TimeTrackerFactory.DummyTimeTracker
public interface TimeTracker
Collect times of operations and dump longest of them.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
TimeTracker.TrackedOperation
Operation to track
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dumpLongest(int count)
Dump longest operationslong
getAllTimePassedMillis()
TimeTracker.TrackedOperation
start(java.lang.Object operationName)
Start operationTimeTracker.TrackedOperation
start(java.util.function.Supplier<java.lang.Object> operationName)
Start operation
-
-
-
Method Detail
-
start
TimeTracker.TrackedOperation start(java.lang.Object operationName)
Start operation- Parameters:
operationName
- operation identifier- Returns:
- operation
-
start
TimeTracker.TrackedOperation start(java.util.function.Supplier<java.lang.Object> operationName)
Start operation- Parameters:
operationName
- operation identifier- Returns:
- operation
-
dumpLongest
void dumpLongest(int count)
Dump longest operations- Parameters:
count
- number of longest operations to dump
-
getAllTimePassedMillis
long getAllTimePassedMillis()
- Returns:
- passed time from very first operation
-
-