public class FrequencyStat extends Object
| Constructor and Description |
|---|
FrequencyStat(String name,
String description,
String group,
long[] periods)Create a new frequency stat. |
| Modifier and Type | Method and Description |
|---|---|
void | coalesceStats()coalesce all the stats |
boolean | equals(Object obj)Compares this frequency stat to another object for equality. |
void | eventOccurred()update all of the frequencies for the various periods |
String | getDescription()Description of what this statistic measures. |
long | getEventCount()Gets the lifetime event count. |
long | getFrequency()Gets the lifetime average frequency. |
Frequency | getFrequency(long period)Get the frequency object for the specified period. |
String | getGroupName()Grouping name for this statistic. |
String | getName()Unique name for this statistic. |
long[] | getPeriods()Tracked periods for this frequency stat. |
int | hashCode() |
void | store(OutputStream out,
String prefix)Serializes this FrequencyStat to the provided OutputStream |
public FrequencyStat(String name, String description, String group, long[] periods)
name - unique name of the statisticdescription - simple description of the statisticgroup - used to group statistics togetherperiods - array of period lengths (in milliseconds)public void coalesceStats()
public boolean equals(Object obj)
public void eventOccurred()
public String getDescription()
public long getEventCount()
public long getFrequency()
public Frequency getFrequency(long period)
period - the period in millisecondspublic String getGroupName()
public String getName()
public long[] getPeriods()
public void store(OutputStream out, String prefix) throws IOException
out - to write toprefix - to prepend to the statIOException - if something goes wrong