|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object be.ac.ua.broker.utils.ExecutionTimer
public class ExecutionTimer
This class represents an execution timer, which can be used to time the running of different parts of a Java program. The parts are identified by a uniquely given string key. The ExecutionTimer is used in the benchmarking of the broker.
Constructor Summary | |
---|---|
ExecutionTimer()
|
Method Summary | |
---|---|
void |
clear()
Clear all the timing information from the timer. |
long |
getElapsedTime(java.lang.String timerName)
Get the elapsed time by the timer with the given name/key value. |
float |
getElapsedTimeInSeconds(java.lang.String timerName)
Get the elapsed time in seconds by the timer with the given name/key value. |
long |
getTotalElapsedTime()
Get the total elapsed time by all the different timings. |
float |
getTotalElapsedTimeInSeconds()
Get the total elapsed time in seconds by all the different timings. |
void |
startTiming(java.lang.String timerName)
Start a timer with a given name |
void |
stopTiming(java.lang.String timerName)
Stop the timer with the given name/key |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExecutionTimer()
Method Detail |
---|
public void startTiming(java.lang.String timerName)
timerName
- name/key of the timer to start runningpublic void stopTiming(java.lang.String timerName) throws java.rmi.activation.UnknownObjectException
timerName
- name/key of the timer to stop running
java.rmi.activation.UnknownObjectException
- exception thrown when no timer was started previously with
the given name/key valuepublic void clear()
public long getElapsedTime(java.lang.String timerName) throws java.rmi.activation.UnknownObjectException
timerName
- name/key of the timer to get the elapsed time of
java.rmi.activation.UnknownObjectException
- exception thrown when timer was not yet started/stoppedpublic long getTotalElapsedTime() throws java.rmi.activation.UnknownObjectException
java.rmi.activation.UnknownObjectException
- exception thrown when timer was not yet started/stoppedpublic float getElapsedTimeInSeconds(java.lang.String timerName) throws java.rmi.activation.UnknownObjectException
timerName
- name/key of the timer to get the elapsed time of
java.rmi.activation.UnknownObjectException
- exception thrown when timer was not yet started/stoppedpublic float getTotalElapsedTimeInSeconds() throws java.rmi.activation.UnknownObjectException
java.rmi.activation.UnknownObjectException
- exception thrown when timer was not yet started/stopped
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |