public class StepTimer extends AbstractTimer
Timer.Builder, Timer.ResourceSample, Timer.Sample
Meter.Id, Meter.Type
clock, histogram
Constructor and Description |
---|
StepTimer(Meter.Id id,
Clock clock,
DistributionStatisticConfig distributionStatisticConfig,
PauseDetector pauseDetector,
java.util.concurrent.TimeUnit baseTimeUnit,
long stepDurationMillis,
boolean supportsAggregablePercentiles)
Create a new
StepTimer . |
Modifier and Type | Method and Description |
---|---|
long |
count() |
double |
max(java.util.concurrent.TimeUnit unit) |
protected void |
recordNonNegative(long amount,
java.util.concurrent.TimeUnit unit) |
double |
totalTime(java.util.concurrent.TimeUnit unit) |
baseTimeUnit, close, equals, hashCode, record, record, record, recordCallable, takeSnapshot
getId
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
builder, builder, histogramCountAtValue, mean, measure, percentile, record, resource, start, start, start, wrap, wrap, wrap
takeSnapshot
public StepTimer(Meter.Id id, Clock clock, DistributionStatisticConfig distributionStatisticConfig, PauseDetector pauseDetector, java.util.concurrent.TimeUnit baseTimeUnit, long stepDurationMillis, boolean supportsAggregablePercentiles)
StepTimer
.id
- IDclock
- clockdistributionStatisticConfig
- distribution statistic configurationpauseDetector
- pause detectorbaseTimeUnit
- base time unitstepDurationMillis
- step in millisecondssupportsAggregablePercentiles
- whether it supports aggregable percentilesprotected void recordNonNegative(long amount, java.util.concurrent.TimeUnit unit)
recordNonNegative
in class AbstractTimer
public long count()
public double totalTime(java.util.concurrent.TimeUnit unit)
unit
- The base unit of time to scale the total to.public double max(java.util.concurrent.TimeUnit unit)
unit
- The base unit of time to scale the max to.