use of org.mpierce.metrics.reservoir.hdrhistogram.HdrHistogramResetOnSnapshotReservoir in project torodb by torodb.
the class ToroMetricRegistry method histogram.
/**
*
* @param name
* @param resetOnSnapshot This is usually true if you're using snapshots as a means of defining
* the window in which you want to calculate, say, the 99.9th percentile
* @return
*/
public Histogram histogram(MetricName name, boolean resetOnSnapshot) {
Reservoir reservoir;
if (resetOnSnapshot) {
reservoir = new HdrHistogramResetOnSnapshotReservoir();
} else {
reservoir = new HdrHistogramReservoir();
}
Histogram histogram = register(name, new Histogram(reservoir));
return histogram;
}
use of org.mpierce.metrics.reservoir.hdrhistogram.HdrHistogramResetOnSnapshotReservoir in project torodb by torodb.
the class ToroMetricRegistry method timer.
/**
*
* @param name
* @param resetOnSnapshot This is usually true if you're using snapshots as a means of defining
* the window in which you want to calculate, say, the 99.9th percentile
* @return
*/
public Timer timer(MetricName name, boolean resetOnSnapshot) {
Reservoir reservoir;
if (resetOnSnapshot) {
reservoir = new HdrHistogramResetOnSnapshotReservoir();
} else {
reservoir = new HdrHistogramReservoir();
}
Timer timer = register(name, new Timer(reservoir));
return timer;
}
Aggregations