public class MeterView extends Object implements Meter, View
View.UPDATE_INTERVAL_SECONDS.
A high value in turn increases memory-consumption, since a longer history has to be maintained, but will result in
smoother transitions between rates.
The events are counted by a Counter.UPDATE_INTERVAL_SECONDS| Constructor and Description |
|---|
MeterView(Counter counter,
int timeSpanInSeconds) |
MeterView(int timeSpanInSeconds) |
| Modifier and Type | Method and Description |
|---|---|
long |
getCount()
Get number of events marked on the meter.
|
double |
getRate()
Returns the current rate of events per second.
|
void |
markEvent()
Mark occurrence of an event.
|
void |
markEvent(long n)
Mark occurrence of multiple events.
|
void |
update()
This method will be called regularly to update the metric.
|
public MeterView(int timeSpanInSeconds)
public MeterView(Counter counter, int timeSpanInSeconds)
public void markEvent()
Meterpublic void markEvent(long n)
Meterpublic long getCount()
Meterpublic double getRate()
MeterCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.