net.i2p.stat
public class Frequency extends Object
Constructor and Description |
---|
Frequency(long period) |
Modifier and Type | Method and Description |
---|---|
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 (rolling) 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()
Deprecated.
unused
|
double |
getMaxAverageEventsPerPeriod()
Calculate how many events would occur in a period given the maximum rolling average.
|
double |
getMinAverageInterval()
Deprecated.
unused
|
long |
getPeriod()
how long is this frequency averaged over? (ms)
|
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? (ms)
|
void |
recalculate()
Recalculate the averages
|
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()