Example usage for org.springframework.integration.support.management ExponentialMovingAverage ExponentialMovingAverage

List of usage examples for org.springframework.integration.support.management ExponentialMovingAverage ExponentialMovingAverage

Introduction

In this page you can find the example usage for org.springframework.integration.support.management ExponentialMovingAverage ExponentialMovingAverage.

Prototype

public ExponentialMovingAverage(int window, double factor) 

Source Link

Document

Create a moving average accumulator with decay lapse window provided.

Usage

From source file:org.springframework.integration.channel.management.DefaultMessageChannelMetrics.java

/**
 * Construct an instance with default metrics with {@code window=10, period=1 second,
 * lapsePeriod=1 minute}./*from w ww  .j av  a 2s  .c om*/
 * @param name the name.
 */
public DefaultMessageChannelMetrics(String name) {
    this(name, new ExponentialMovingAverage(DEFAULT_MOVING_AVERAGE_WINDOW, 1000000.),
            new ExponentialMovingAverageRate(ONE_SECOND_SECONDS, ONE_MINUTE_SECONDS,
                    DEFAULT_MOVING_AVERAGE_WINDOW, true),
            new ExponentialMovingAverageRatio(ONE_MINUTE_SECONDS, DEFAULT_MOVING_AVERAGE_WINDOW, true),
            new ExponentialMovingAverageRate(ONE_SECOND_SECONDS, ONE_MINUTE_SECONDS,
                    DEFAULT_MOVING_AVERAGE_WINDOW, true));
}