com.codahale.metrics.EWMA Java Examples

The following examples show how to use com.codahale.metrics.EWMA. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExtendedMeter.java    From datacollector with Apache License 2.0 5 votes vote down vote up
public ExtendedMeter(Clock clock) {
  super(clock);
  this.clock = clock;
  this.lastTick = new AtomicLong(this.clock.getTick());
  m30Rate = new EWMA(M30_ALPHA, INTERVAL, TimeUnit.SECONDS);
  h1Rate = new EWMA(H1_ALPHA, INTERVAL, TimeUnit.SECONDS);
  h6Rate = new EWMA(H6_ALPHA, INTERVAL, TimeUnit.SECONDS);
  h12Rate = new EWMA(H12_ALPHA, INTERVAL, TimeUnit.SECONDS);
  h24Rate = new EWMA(H24_ALPHA, INTERVAL, TimeUnit.SECONDS);
}