org.smallmind.instrument
Class ExponentiallyWeightedMovingAverage

java.lang.Object
  extended by org.smallmind.instrument.ExponentiallyWeightedMovingAverage

public class ExponentiallyWeightedMovingAverage
extends Object


Method Summary
 double getRate(TimeUnit rateTimeUnit)
           
static ExponentiallyWeightedMovingAverage lastFifteenMinutes(long tickInterval, TimeUnit tickTimeUnit)
           
static ExponentiallyWeightedMovingAverage lastFiveMinutes(long tickInterval, TimeUnit tickTimeUnit)
           
static ExponentiallyWeightedMovingAverage lastOneMinute(long tickInterval, TimeUnit tickTimeUnit)
           
 void tick()
           
 void update(long n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

lastOneMinute

public static ExponentiallyWeightedMovingAverage lastOneMinute(long tickInterval,
                                                               TimeUnit tickTimeUnit)

lastFiveMinutes

public static ExponentiallyWeightedMovingAverage lastFiveMinutes(long tickInterval,
                                                                 TimeUnit tickTimeUnit)

lastFifteenMinutes

public static ExponentiallyWeightedMovingAverage lastFifteenMinutes(long tickInterval,
                                                                    TimeUnit tickTimeUnit)

update

public void update(long n)

tick

public void tick()

getRate

public double getRate(TimeUnit rateTimeUnit)


Copyright © 2012. All Rights Reserved.