All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codahale.metrics.MovingAverages Maven / Gradle / Ivy

Go to download

Metrics is a Java library which gives you unparalleled insight into what your code does in production. Metrics provides a powerful toolkit of ways to measure the behavior of critical components in your production environment.

There is a newer version: 4.2.28
Show newest version
package com.codahale.metrics;

/**
 * A triple of moving averages (one-, five-, and fifteen-minute
 * moving average) as needed by {@link Meter}.
 * 

* Included implementations are: *

    *
  • {@link ExponentialMovingAverages} exponential decaying average similar to the {@code top} Unix command. *
  • {@link SlidingTimeWindowMovingAverages} simple (unweighted) moving average *
*/ public interface MovingAverages { /** * Tick the internal clock of the MovingAverages implementation if needed * (according to the internal ticking interval) */ void tickIfNecessary(); /** * Update all three moving averages with n events having occurred since the last update. * * @param n */ void update(long n); /** * Returns the one-minute moving average rate * * @return the one-minute moving average rate */ double getM1Rate(); /** * Returns the five-minute moving average rate * * @return the five-minute moving average rate */ double getM5Rate(); /** * Returns the fifteen-minute moving average rate * * @return the fifteen-minute moving average rate */ double getM15Rate(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy