public class StatsTracker<T>
extends java.lang.Object
Constructor and Description |
---|
StatsTracker(T[] opTypes,
java.util.logging.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.
|
java.util.Map<T,LatencyStat> |
getCumulativeLatency() |
java.util.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 StatsTracker(T[] opTypes, java.util.logging.Logger stackTraceLogger, int activeThreadThreshold, long threadDumpIntervalMillis, int threadDumpMax, int maxTrackedLatencyMillis)
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 java.util.Map<T,LatencyStat> getIntervalLatency()
public java.util.Map<T,LatencyStat> getCumulativeLatency()
public int getNumCompletedDumps()
Copyright (c) 2004-2012 Oracle. All rights reserved.