org.elasticsearch.common.metrics
Class MeterMetric

java.lang.Object
  extended by org.elasticsearch.common.metrics.MeterMetric
All Implemented Interfaces:
Metric

public class MeterMetric
extends Object
implements Metric

A meter metric which measures mean throughput and one-, five-, and fifteen-minute exponentially-weighted moving average throughputs.

See Also:
EMA

taken from codahale metric module, replaced with LongAdder


Constructor Summary
MeterMetric(ScheduledExecutorService tickThread, TimeUnit rateUnit)
           
 
Method Summary
 long count()
           
 double fifteenMinuteRate()
           
 double fiveMinuteRate()
           
 void mark()
          Mark the occurrence of an event.
 void mark(long n)
          Mark the occurrence of a given number of events.
 double meanRate()
           
 double oneMinuteRate()
           
 TimeUnit rateUnit()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeterMetric

public MeterMetric(ScheduledExecutorService tickThread,
                   TimeUnit rateUnit)
Method Detail

rateUnit

public TimeUnit rateUnit()

mark

public void mark()
Mark the occurrence of an event.


mark

public void mark(long n)
Mark the occurrence of a given number of events.

Parameters:
n - the number of events

count

public long count()

fifteenMinuteRate

public double fifteenMinuteRate()

fiveMinuteRate

public double fiveMinuteRate()

meanRate

public double meanRate()

oneMinuteRate

public double oneMinuteRate()

stop

public void stop()


Copyright © 2009-2012. All Rights Reserved.