|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--ostore.util.StopWatch
StopWatch provides timing utilities for profiling code
performance. This class relies on Date,
and therefore can provide only millisecond-granularity timing.
All timestamps are retrieved from Clock.current_date(ostore.util.NodeId), so this class is simulator-safe.
| Method Summary | |
|---|---|
static StopWatch |
getInstance(NodeId node_id)
Returns the StopWatch instance corresponding to a
NodeId. |
long |
split(Object tag)
Return the time elapsed so far, in milliseconds. |
void |
start(Object tag)
Start a new timer. |
long |
stop(Object tag)
Stop a timer and return the time elapsed, in milliseconds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static StopWatch getInstance(NodeId node_id)
StopWatch instance corresponding to a
NodeId.
node_id - The NodeId which parameterizes a
virtual SandStorm instance.
StopWatch instance
corresponding to node_id.public final void start(Object tag)
tag - The identifier for this timing. May be reused.public final long split(Object tag)
tag - The identifier for this timing.
start with this
tag, or 0 if no such call was made.public final long stop(Object tag)
StopWatch,
effectively resetting the timer.
tag - The identifier for this timing.
start with this
tag, or 0 if no such call was made.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||