public interface Meter extends Metric
Metric
for measuring the rate of events over time. Event occurrence is reported by invoking mark()
.
Meter is initialized with rate unit
which represents the time for which the rate of event should be calculated.
Modifier and Type | Method and Description |
---|---|
long |
getCount()
Returns the number of events which have been marked.
|
double |
getFifteenMinuteRate()
Returns the fifteen-minute exponentially-weighted moving average rate at which events have occurred since the meter was created.
|
double |
getFiveMinuteRate()
Returns the five-minute exponentially-weighted moving average rate at which events have occurred since the meter was created.
|
double |
getMeanRate()
Returns the mean rate at which events have occurred since the meter was created.
|
double |
getOneMinuteRate()
Returns the one-minute exponentially-weighted moving average rate at which events have occurred since the meter was created.
|
TimeUnit |
getRateUnit()
Returns the meter's rate unit.
|
void |
mark()
Mark the occurrence of an event.
|
void |
mark(long n)
Mark the occurrence of a given
n number of events. |
TimeUnit getRateUnit()
void mark()
void mark(long n)
n
number of events.n
- the number of eventsdouble getOneMinuteRate()
top
Unix command.double getMeanRate()
double getFiveMinuteRate()
top
Unix command.double getFifteenMinuteRate()
top
Unix command.long getCount()
Copyright © 2014 Cloud Software Group, Inc.. All Rights Reserved.