|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface IStats.Series
Interface used to collect series data points.
A Series stat records information used to create histo graphical
data over a series of data points. For example IStats.Series
might be used
to record the latencies of received messages by calling add(double)
with the the current time minus the origin time.
The series interface is model around the double data type, but the
actual precision and data type of the implementation could be another
numeric type with lower memory overhead and serialization costs. Such implementations
down cast to their native as returned by getType()
; caller should
ensure a value recorded via add(double)
can be cast to the
type dictated by the IStats.Series.Type
Nested Class Summary | |
---|---|
static interface |
IStats.Series.Collector
Passed to a IStats.Series stat to collect recorded values. |
static class |
IStats.Series.Type
Used to indicate the type of value that a Series records. |
Field Summary | |
---|---|
static String |
PROP_SERIES_SAMPLE_SIZE
Property that can be used to control the default sampling size for series stats. |
static int |
PROP_SERIES_SAMPLE_SIZE_DEFAULT
The default value for PROP_SERIES_SAMPLE_SIZE . |
Method Summary | |
---|---|
long |
add(double value)
Adds a recorded latency sample. |
void |
compute()
Computes statistic values. |
long |
get(IStats.Series.Collector collector,
cern.colt.list.DoubleArrayList temp,
long minSequenceNumber)
Collects currently captured data points into the provide IStats.Series.Collector . |
void |
get(StringBuilder builder,
NumberFormat format)
Appends the series' computed values calculted by compute()
to the provided StringBuilder . |
String |
getName()
Gets statistic name. |
XString |
getNameAsRaw()
Gets the stat's name as an XString . |
IStats.Series.Type |
getType()
Gets the underlying type for the Series. |
double |
max()
Gets the maximum value last computed via compute() . |
double |
mean()
Gets the mean value last computed via compute() . |
double |
median()
Gets the median value computed via compute() . |
double |
min()
Gets the minimum value last computed via compute() . |
double |
pct75()
Gets the 75%ile value computed via compute() . |
double |
pct90()
Gets the 90%ile value computed via compute() . |
double |
pct99()
Gets the 99%ile value computed via compute() . |
double |
pct999()
Gets the 99.9%ile value computed via compute() . |
double |
pct9999()
Gets the 99.99%ile value computed via compute() . |
void |
reset()
Clears and resets tracking. |
long |
sample()
Gets the sample on which the latency stats were computed during compute() . |
long |
sequenceNumber()
Gets the sequence number of the last recorded value. |
int |
size()
Returns the maximum sample size of data points that can be held. |
Field Detail |
---|
static final String PROP_SERIES_SAMPLE_SIZE
If the number of datapoints collected in a stats interval exceeds this size the computation for histographical data will be lossy, increasing the value will reduce loss of datapoints, but results in greater overhead in stats collection in terms of both memory usage and pressure on the process caches. Default value: 10240
static final int PROP_SERIES_SAMPLE_SIZE_DEFAULT
PROP_SERIES_SAMPLE_SIZE
.
Method Detail |
---|
String getName()
IStats.Series.Type getType()
The IStats.Series.Type
indicates what primitive types to which the values returned
by the Series can be safely cast.
IStats.Series
's IStats.Series.Type
.XString getNameAsRaw()
XString
.
long sequenceNumber()
long sample()
compute()
.
double min()
compute()
.
This value can be cast according to this IStats.Series
's IStats.Series.Type
.
double max()
compute()
.
This value can be cast according to this IStats.Series
's IStats.Series.Type
.
double mean()
compute()
.
This value can be cast according to this IStats.Series
's IStats.Series.Type
.
double median()
compute()
.
This value can be cast according to this IStats.Series
's IStats.Series.Type
.
double pct75()
compute()
.
This value can be cast according to this IStats.Series
's IStats.Series.Type
.
double pct90()
compute()
.
This value can be cast according to this IStats.Series
's IStats.Series.Type
.
double pct99()
compute()
.
This value can be cast according to this IStats.Series
's IStats.Series.Type
.
double pct999()
compute()
.
This value can be cast according to this IStats.Series
's IStats.Series.Type
.
double pct9999()
compute()
.
This value can be cast according to this IStats.Series
's IStats.Series.Type
.
void compute()
void get(StringBuilder builder, NumberFormat format)
compute()
to the provided StringBuilder
.
long get(IStats.Series.Collector collector, cern.colt.list.DoubleArrayList temp, long minSequenceNumber)
IStats.Series.Collector
.
collector
- The collector to which values will be collected via IStats.Series.Collector.add(long, double)
temp
- A temporary list into which collected values will be copied.minSequenceNumber
- The minimum sequence number (inclusive) to collect.
add(double)
.long add(double value)
The added value should be castable to this IStats.Series
's IStats.Series.Type
.
value
- the sampled value to record.
int size()
void reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |