| java.lang.Object com.tc.management.stats.AggregateInteger
Constructor Summary | |
public | AggregateInteger(String name) Creates a new aggregate integer statistic without maintaining a history of samples. | public | AggregateInteger(String name, int historyLengthInSamples) Creates a new aggregate integer statistic, maintaining a rolling history of samples for the last
historyLengthInSamples samples. |
Method Summary | |
public synchronized void | addSample(int sample) | public double | getAverage() | public int | getMaximum() | public int | getMinimum() | public int | getN() | public String | getName() | public int | getSampleRate(long periodInMillis) Returns an average rate at which samples were added, if you want this rate per second then pass in 1000,
if you want it per minute then pass in 1000 * 60, etc. | public int | getSum() | public synchronized void | reset() Resets this statistic, all counters/averages/etc. | public String | toString() |
AggregateInteger | public AggregateInteger(String name)(Code) | | Creates a new aggregate integer statistic without maintaining a history of samples.
Parameters: name - the name of this statistic |
AggregateInteger | public AggregateInteger(String name, int historyLengthInSamples)(Code) | | Creates a new aggregate integer statistic, maintaining a rolling history of samples for the last
historyLengthInSamples samples. Sample rates are extrapolated based on how many samples are maintained.
|
addSample | public synchronized void addSample(int sample)(Code) | | |
getAverage | public double getAverage()(Code) | | the running average of the samples (so far) |
getMaximum | public int getMaximum()(Code) | | the maximum value of all samples |
getMinimum | public int getMinimum()(Code) | | the minimum value of all samples |
getN | public int getN()(Code) | | the number of samples (so far) |
getSampleRate | public int getSampleRate(long periodInMillis)(Code) | | Returns an average rate at which samples were added, if you want this rate per second then pass in 1000,
if you want it per minute then pass in 1000 * 60, etc. This rate is extrapolated from the entire
available history as defined in the constructor. For finer and more accurate rates, the history length should be
lengthened.
the rate at which samples were added per periodInMillis, averaged over the (rolling) historylength, or -1 if history is not being kept |
getSum | public int getSum()(Code) | | the running sum of samples (so far) |
reset | public synchronized void reset()(Code) | | Resets this statistic, all counters/averages/etc. go to 0; any history is cleared as well.
|
|
|