|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.util.TimeTrace
TimeLog
Last update: $Date: 2011-02-23 13:00:57 +0100 (mer., 23 févr. 2011) $
by : $Author: bpoussin $
@Deprecated public class TimeTrace
Cette classe permet de facilement trace le temps d'execution entre deux points usage
TimeTrace timeTrace = new TimeTrace(5000, 1000);
long start = timeTrace.getTime();
...
// do some work
...
timeTrace.add(start, "do some work");
System.out.println ("time: " + timeTrace.getCallCount());
CallAnalyse| Nested Class Summary | |
|---|---|
static class |
TimeTrace.CallStat
Deprecated. |
| Field Summary | |
|---|---|
protected Map<String,TimeTrace.CallStat> |
callCount
Deprecated. for each method of all proxies, keep number of call |
protected long |
timeToLogInfo
Deprecated. time to trigger log time in info level (ns) (default: 1s) |
protected long |
timeToLogWarn
Deprecated. time to trigger log time in warn level (ns) (default: 3s) |
| Constructor Summary | |
|---|---|
TimeTrace()
Deprecated. |
|
TimeTrace(long timeToLogInfo,
long timeToLogWarn)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
add(long startNs,
long stopNs,
String methodName)
Deprecated. add new trace |
void |
add(long startNs,
String methodName)
Deprecated. add new trace, stop time is automaticaly computed |
Map<String,TimeTrace.CallStat> |
getCallCount()
Deprecated. |
static long |
getTime()
Deprecated. return time in format acceptable for #add(timeToLogInfo, timeToLogInfo, null) |
void |
setTimeToLogInfo(long timeToLogInfoMs)
Deprecated. |
void |
setTimeToLogWarn(long timeToLogWarnMs)
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected long timeToLogInfo
protected long timeToLogWarn
protected Map<String,TimeTrace.CallStat> callCount
| Constructor Detail |
|---|
public TimeTrace()
public TimeTrace(long timeToLogInfo,
long timeToLogWarn)
timeToLogInfo - time in milliseconde after that we log infotimeToLogWarn - time in milliseconde after that we log warn| Method Detail |
|---|
public void setTimeToLogInfo(long timeToLogInfoMs)
timeToLogInfoMs - time in milliseconde after that we log infopublic void setTimeToLogWarn(long timeToLogWarnMs)
timeToWarnInfoMs - time in milliseconde after that we log warnpublic Map<String,TimeTrace.CallStat> getCallCount()
public static long getTime()
#add(timeToLogInfo, timeToLogInfo, null)
public void add(long startNs,
String methodName)
startNs - time returned by getTime() methodmethodName - key name to store this time
public void add(long startNs,
long stopNs,
String methodName)
startNs - time returned by getTime() methodstopNs - time returned by getTime() methodmethodName - key name to store this time
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||