com.zwares.base.monitor
Class ExecutionTimer

java.lang.Object
  |
  +--com.zwares.base.monitor.ExecutionTimer

public class ExecutionTimer
extends java.lang.Object

This class provides methods to measure performance of one or more operation(s).


Constructor Summary
ExecutionTimer()
          Default constructor
ExecutionTimer(java.lang.String contextName)
          Constructs a performance measuring object.
 
Method Summary
 void end()
          End of measuring an operation.
 void start()
          Start of measuring an operation.
 long timeTaken()
          Time taken for the operation.
 java.lang.String toString()
          Outputs time take for the operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExecutionTimer

public ExecutionTimer()
Default constructor


ExecutionTimer

public ExecutionTimer(java.lang.String contextName)
Constructs a performance measuring object.

Parameters:
contextName - name assigned to a test.
Method Detail

start

public void start()
Start of measuring an operation.


end

public void end()
End of measuring an operation.


timeTaken

public long timeTaken()
Time taken for the operation.


toString

public java.lang.String toString()
Outputs time take for the operation.

Overrides:
toString in class java.lang.Object