|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.utilint.StatsTracker<T>
public class StatsTracker<T>
Maintain interval and cumulative stats for a given set of operations, as well as a activityCounter that generates thread dumps if operations take too long. The markStart and markFinish methods can be used to bracket each tracked operation.
Constructor Summary | |
---|---|
StatsTracker(T[] opTypes,
Logger stackTraceLogger,
int activeThreadThreshold,
long threadDumpIntervalMillis,
int threadDumpMax,
int maxTrackedLatencyMillis)
The logger is used for activity stack traces. |
Method Summary | |
---|---|
void |
clearLatency()
Should be called after each interval latency stat collection, to reset for the next period's collection. |
Map<T,LatencyStat> |
getCumulativeLatency()
|
Map<T,LatencyStat> |
getIntervalLatency()
|
int |
getNumCompletedDumps()
For unit test support. |
void |
markFinish(T opType,
long startTime)
Track the end of an operation. |
void |
markFinish(T opType,
long startTime,
int numOperations)
Track the end of an operation. |
long |
markStart()
Track the start of a operation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StatsTracker(T[] opTypes, Logger stackTraceLogger, int activeThreadThreshold, long threadDumpIntervalMillis, int threadDumpMax, int maxTrackedLatencyMillis)
Method Detail |
---|
public long markStart()
public void markFinish(T opType, long startTime)
startTime
- should be the value returned by the corresponding call
to markStartpublic void markFinish(T opType, long startTime, int numOperations)
startTime
- should be the value returned by the corresponding call
to markStartpublic void clearLatency()
public Map<T,LatencyStat> getIntervalLatency()
public Map<T,LatencyStat> getCumulativeLatency()
public int getNumCompletedDumps()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |