|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AggregateProfileSample
A profile sample which is aggregated until explicitly cleared. Some simple statistics are gathered about the samples.
The samples and statistics can be cleared by calling clearSamples().
The capacity is the maxiumum number of samples that will
be held. Once this limit is reached, older samples will be dropped
to make room for the newest samples. The statistics are over all the
gathered samples since creation or the last clearSamples call;
thus, they might not reflect the current list returned by
getSamples().
| Method Summary | |
|---|---|
void |
clearSamples()
Clears the accumulated samples and their statistics. |
double |
getAverage()
Returns the exponential weighted average of the added samples, using the smoothing factor as defined in setSmoothingFactor(double). |
int |
getCapacity()
Returns the maximum number of samples this object can hold. |
long |
getMaxSample()
Gets the maximum sample value added. |
long |
getMinSample()
Gets the minimum sample value added. |
int |
getNumSamples()
Returns the number of samples added, which will be a value between 0 and the current capacity. |
List<Long> |
getSamples()
Returns a list of all added samples in the order they are added. |
double |
getSmoothingFactor()
Gets the current smoothing factor in effect for calculating the average of the added samples. |
void |
setCapacity(int capacity)
Sets the maximum number of samples this object can hold. |
void |
setSmoothingFactor(double smooth)
Sets the smoothing factor used for calculating the average of the added samples. |
| Methods inherited from interface com.sun.sgs.profile.ProfileSample |
|---|
addSample, getName |
| Method Detail |
|---|
List<Long> getSamples()
void clearSamples()
double getAverage()
setSmoothingFactor(double).
This value is undefined if no samples have been added.
long getMaxSample()
long getMinSample()
int getNumSamples()
0 and the current capacity.
int getCapacity()
void setCapacity(int capacity)
A limit of 0 indicates that no samples should be held,
but the statistics should be gathered.
capacity - the maximum number of samples this object can hold
IllegalArgumentException - if the capacity is negativevoid setSmoothingFactor(double smooth)
0.0 and 1.0, inclusive.
A value closer to 1.0 provides less smoothing of the data,
and more weight to recent data; a value closer to 0.0 provides
more smoothing but is less responsive to recent changes.
smooth - the smoothing factor
IllegalArgumentException - if smooth is not between
0.0 and 1.0, inclusivedouble getSmoothingFactor()
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||