|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.yammer.metrics.core.MeterMetric
public class MeterMetric
A meter metric which measures mean throughput and one-, five-, and fifteen-minute exponentially-weighted moving average throughputs.
| Constructor Summary | |
|---|---|
MeterMetric(ScheduledExecutorService tickThread,
String eventType,
TimeUnit rateUnit,
Clock clock)
|
|
| Method Summary | ||
|---|---|---|
long |
count()
Returns the number of events which have been marked. |
|
String |
eventType()
Returns the type of events the meter is measuring. |
|
double |
fifteenMinuteRate()
Returns the fifteen-minute exponentially-weighted moving average rate at which events have occurred since the meter was created. |
|
double |
fiveMinuteRate()
Returns the five-minute exponentially-weighted moving average rate at which events have occurred since the meter was created. |
|
void |
mark()
Mark the occurrence of an event. |
|
void |
mark(long n)
Mark the occurrence of a given number of events. |
|
double |
meanRate()
Returns the mean rate at which events have occurred since the meter was created. |
|
static MeterMetric |
newMeter(ScheduledExecutorService tickThread,
String eventType,
TimeUnit rateUnit)
Creates a new MeterMetric. |
|
static MeterMetric |
newMeter(String eventType,
TimeUnit rateUnit)
Deprecated. use the other newMeter method or create a new meter via the MetricsRegistry or Metrics |
|
double |
oneMinuteRate()
Returns the one-minute exponentially-weighted moving average rate at which events have occurred since the meter was created. |
|
|
processWith(MetricsProcessor<T> processor,
MetricName name,
T context)
|
|
TimeUnit |
rateUnit()
Returns the meter's rate unit. |
|
void |
stop()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MeterMetric(ScheduledExecutorService tickThread,
String eventType,
TimeUnit rateUnit,
Clock clock)
| Method Detail |
|---|
public static MeterMetric newMeter(String eventType,
TimeUnit rateUnit)
newMeter method or create a new meter via the MetricsRegistry or Metrics
MeterMetric.
eventType - the plural name of the event the meter is measuring (e.g., "requests")rateUnit - the rate unit of the new meter
MeterMetric
public static MeterMetric newMeter(ScheduledExecutorService tickThread,
String eventType,
TimeUnit rateUnit)
MeterMetric.
tickThread - background thread for updating the rateseventType - the plural name of the event the meter is measuring (e.g., "requests")rateUnit - the rate unit of the new meter
MeterMetricpublic TimeUnit rateUnit()
Metered
rateUnit in interface Meteredpublic String eventType()
Metered
eventType in interface Meteredpublic void mark()
public void mark(long n)
n - the number of eventspublic long count()
Metered
count in interface Meteredpublic double fifteenMinuteRate()
Meteredtop Unix command.
fifteenMinuteRate in interface Meteredpublic double fiveMinuteRate()
Meteredtop Unix command.
fiveMinuteRate in interface Meteredpublic double meanRate()
Metered
meanRate in interface Meteredpublic double oneMinuteRate()
Meteredtop Unix command.
oneMinuteRate in interface Meteredpublic void stop()
stop in interface Stoppable
public <T> void processWith(MetricsProcessor<T> processor,
MetricName name,
T context)
throws Exception
processWith in interface MetricException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||