class ByteThroughputHelper extends ByteThroughputProvider
Note this class is only relevant when metric is enabled. Otherwise it should not even be involved in the call stack to minimize runtime overhead.
Modifier and Type | Field and Description |
---|---|
private static int |
REPORT_INTERVAL_SECS |
Constructor and Description |
---|
ByteThroughputHelper(ThroughputMetricType type) |
Modifier and Type | Method and Description |
---|---|
void |
increment(int bytesDelta,
long startTimeNano) |
(package private) void |
reportMetrics() |
(package private) long |
startTiming() |
getByteCount, getDurationNano, getProviderId, getThroughputMetricType, reset, toString
private static final int REPORT_INTERVAL_SECS
ByteThroughputHelper(ThroughputMetricType type)
long startTiming()
void reportMetrics()
public void increment(int bytesDelta, long startTimeNano)
increment
in class ByteThroughputProvider
bytesDelta
- the number of bytes to incrementstartTimeNano
- the start time in nano seconds