|
VistALink v1.5.0.026 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.va.med.monitor.time.AuditTimer
This class gives an easy way to capture performance statistics and log them to a log file. Internally System.currentTimeMillis() is used.
Typical steps for using this class:
Constructor Summary | |
AuditTimer()
Default constructor. |
|
AuditTimer(org.apache.log4j.Logger logger)
Constructor that accepts logger to be used for output. |
Method Summary | |
long |
getTimeElapsedMillis()
|
static boolean |
isAuditTimerEnabled()
|
static boolean |
isAuditTimerEnabled(org.apache.log4j.Logger logger)
|
void |
log()
The same as log(String). |
void |
log(java.lang.String message)
Logs a message to the log4j logger in a following format: your_message elapsed_time_milliseconds |
void |
start()
Starts the timer. |
long |
stop()
Stops the timer. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AuditTimer()
public AuditTimer(org.apache.log4j.Logger logger)
logger
- Method Detail |
public void start()
public long stop()
This method does not through Exception to keep client code simple.
public long getTimeElapsedMillis()
public void log()
public void log(java.lang.String message)
your_message elapsed_time_milliseconds
message
- public static boolean isAuditTimerEnabled(org.apache.log4j.Logger logger)
public static boolean isAuditTimerEnabled()
|
VistALink v1.5.0.026 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |