

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object net.i2p.stat.Frequency
public class Frequency
Manage the calculation of a moving event frequency over a certain period.
Constructor Summary  

Frequency(long period)

Method Summary  

void 
eventOccurred()
Take note that a new event occurred, recalculating all the averages and frequencies 
double 
getAverageEventsPerPeriod()
calculate how many events would occur in a period given the current average 
double 
getAverageInterval()
on average over the last $period, after how many milliseconds are events coming in, as calculated during the last event occurrence? 
long 
getEventCount()
how many events have occurred within the lifetime of this stat? 
long 
getLastEvent()
when did the last event occur? 
double 
getMaxAverageEventsPerPeriod()
calculate how many events would occur in a period given the maximum average 
double 
getMinAverageInterval()
what is the lowest average interval (aka most frequent) we have seen? 
long 
getPeriod()
how long is this frequency averaged over? 
double 
getStrictAverageEventsPerPeriod()
using the strict average interval, how many events occur within an average period? 
double 
getStrictAverageInterval()
over the lifetime of this stat, without any decay or weighting, what was the average interval between events? 
void 
recalculate()
Recalculate the averages 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 

public Frequency(long period)
Method Detail 

public long getPeriod()
public long getLastEvent()
public double getAverageInterval()
public double getMinAverageInterval()
public double getAverageEventsPerPeriod()
public double getMaxAverageEventsPerPeriod()
public double getStrictAverageInterval()
public double getStrictAverageEventsPerPeriod()
public long getEventCount()
public void eventOccurred()
public void recalculate()


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 