public class StatsTracker<T> extends Object
| Constructor and Description |
|---|
StatsTracker(T[] opTypes,
Logger stackTraceLogger,
int activeThreadThreshold,
long threadDumpIntervalMillis,
int threadDumpMax,
int maxTrackedLatencyMillis)
The logger is used for activity stack traces.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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()
Copyright © 2024. All rights reserved.