|
TPTP 4.6.0 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.hyades.execution.core.timer.PerformanceTimer
public class PerformanceTimer
A lightweight performance timer to be used for quick situations where approximate timing of a given algorithm or code is required. This class keeps a pool of identified timers, retrieve timers based on identity using the getInstance(...) method.
| Method Summary | |
|---|---|
void |
elapsed()
Calculates and then uses the elapsed time details, average is computed for cases where the nested count is greater than zero |
void |
elapsed(int size)
Calculates and then uses the elapsed time details, average is computed for cases where the nested count is greater than zero |
static IPerformanceTimer |
getInstance(java.lang.String name)
Retrieve the specified named instance of the performance timer |
static IPerformanceTimer |
getInstance(java.lang.String name,
java.io.PrintStream stream)
Retrieve the specified name instance of the performance timer using the specified stream as the output destination |
void |
reset()
Resets the performance timer attributes of a given performance timer instance |
void |
start()
Starts a performance timer task with no task name given, a nested FILO scheme is used, the when the stop method is called the most recently started timer task is stopped |
void |
start(java.lang.String name)
Starts a performance timer task with a the given task name used, uses a FILO approach, first timer task started in the last stop in order |
void |
stop()
Stops the performance timer task, FILO approach, first timer task started is the last stopped, the performance timer keeps the memory |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static IPerformanceTimer getInstance(java.lang.String name)
name - the name of the instance to retrieve
public static IPerformanceTimer getInstance(java.lang.String name,
java.io.PrintStream stream)
name - the name of the instance to retrievestream - the stream to output to
public void elapsed()
IPerformanceTimer
elapsed in interface IPerformanceTimerpublic void elapsed(int size)
IPerformanceTimer
elapsed in interface IPerformanceTimersize - the size of the work completed within the elapsed time, the
elapsed time will be divided by this number, for an indication
of time per work unitpublic void reset()
IPerformanceTimer
reset in interface IPerformanceTimerpublic void start()
IPerformanceTimer
start in interface IPerformanceTimerpublic void start(java.lang.String name)
IPerformanceTimer
start in interface IPerformanceTimername - the named timer task to startpublic void stop()
IPerformanceTimer
stop in interface IPerformanceTimer
|
TPTP 4.6.0 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||