|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.indexdata.utils.PerformanceLogger
public class PerformanceLogger
Logs execution times with a message and an optional label A logger named "service-proxy.performance" must be defined and debug enabled in LOG4J.
Constructor Summary | |
---|---|
PerformanceLogger()
|
Method Summary | |
---|---|
static void |
finish(org.apache.log4j.Level level,
String message,
long startTime)
|
static void |
finish(org.apache.log4j.Level level,
String label,
String message,
long startTime)
Calculate execution time in millisecondes and log it with a short label and a message |
static void |
finish(String message,
long startTime)
Calculate execution time in milliseconds and log it with a message |
static void |
finish(String label,
String message,
long startTime)
|
static void |
log(org.apache.log4j.Level level,
String message)
Write a log statement |
static void |
log(String message)
|
static long |
start()
Get start time in milliseconds |
static long |
start(org.apache.log4j.Level level,
String message)
|
static long |
start(org.apache.log4j.Level level,
String label,
String message)
|
static long |
start(String message)
Get start time in milliseconds and write a log line |
static long |
start(String label,
String message)
Get start time in milliseconds and write log line with a short label and a message |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PerformanceLogger()
Method Detail |
---|
public static long start()
public static long start(String message)
message
-
public static long start(String label, String message)
label
- message
-
public static long start(org.apache.log4j.Level level, String message)
public static long start(org.apache.log4j.Level level, String label, String message)
public static void finish(String message, long startTime)
message
- log statementstartTime
- start time to measure from (in milliseconds)public static void finish(org.apache.log4j.Level level, String message, long startTime)
public static void finish(String label, String message, long startTime)
public static void finish(org.apache.log4j.Level level, String label, String message, long startTime)
label
- message
- startTime
- public static void log(String message)
public static void log(org.apache.log4j.Level level, String message)
message
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |