|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.stats.Stats.LatencyManager
public static final class Stats.LatencyManager
Class used to hold and compute and retrieve latencies statistics.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.neeve.stats.IStats.Series |
---|
IStats.Series.Collector, IStats.Series.Type |
Field Summary |
---|
Fields inherited from interface com.neeve.stats.IStats.Latencies |
---|
PROP_LATENCY_MANAGER_SAMPLE_SIZE |
Fields inherited from interface com.neeve.stats.IStats.Series |
---|
PROP_SERIES_SAMPLE_SIZE, PROP_SERIES_SAMPLE_SIZE_DEFAULT |
Constructor Summary | |
---|---|
Stats.LatencyManager(String name)
Construct using name to describe the latencies stored |
|
Stats.LatencyManager(String name,
int sampleSize)
Construct using name to describe the latencies stored |
Method Summary | |
---|---|
long |
add(double val)
Add a latency to the latency sample set |
void |
compute()
Compute latency statistics. |
void |
compute(double multiplier)
Compute latency statistics. |
long |
count()
Get the number of latency entries added so far |
long |
get(IStats.Series.Collector collector,
cern.colt.list.DoubleArrayList temp,
long minSeqNo)
Collects currently captured data points into the provide IStats.Series.Collector . |
void |
get(StringBuilder sb)
Format stats for output |
void |
get(StringBuilder sb,
boolean csv)
Format stats for output |
void |
get(StringBuilder sb,
NumberFormat format)
Appends the counter value and any computed stats calculated 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()
Implementation of IStats.Series.max() |
double |
mean()
Implementation of IStats.Series.mean() |
double |
median()
Implementation of IStats.Series.median() |
double |
min()
Implementation of IStats.Series.min() |
double |
pct75()
Implementation of IStats.Series.pct75() |
double |
pct90()
Implementation of IStats.Series.pct90() |
double |
pct99()
Implementation of IStats.Series.pct99() |
double |
pct999()
Implementation of IStats.Series.pct999() |
double |
pct9999()
Implementation of IStats.Series.pct9999() |
void |
reset()
Reset the latency list. |
long |
sample()
Implementation of IStats.Series.sample() |
long |
sequenceNumber()
Gets the sequence number of the last recorded value. |
int |
size()
Returns the maximum sample size of latencies that can be held. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Stats.LatencyManager(String name)
public Stats.LatencyManager(String name, int sampleSize)
Method Detail |
---|
public final String getName()
IStats.Series
getName
in interface IStats.Series
public final XString getNameAsRaw()
IStats.Series
XString
.
getNameAsRaw
in interface IStats.Series
public final IStats.Series.Type getType()
IStats.Series
The IStats.Series.Type
indicates what primitive types to which the values returned
by the Series can be safely cast.
getType
in interface IStats.Series
IStats.Series
's IStats.Series.Type
.public final long sequenceNumber()
IStats.Series
sequenceNumber
in interface IStats.Series
public final long add(double val)
add
in interface IStats.Series
val
- the sampled value to record.
public final void compute()
compute
in interface IStats.Series
public final void compute(double multiplier)
public final long count()
public final void reset()
reset
in interface IStats.Series
public final void get(StringBuilder sb, boolean csv)
public final void get(StringBuilder sb)
public final void get(StringBuilder sb, NumberFormat format)
compute()
to the provided StringBuilder
.
get
in interface IStats.Series
public final int size()
size
in interface IStats.Series
public final long sample()
IStats.Series.sample()
sample
in interface IStats.Series
public final double min()
IStats.Series.min()
min
in interface IStats.Series
public final double max()
IStats.Series.max()
max
in interface IStats.Series
public final double mean()
IStats.Series.mean()
mean
in interface IStats.Series
public final double median()
IStats.Series.median()
median
in interface IStats.Series
public final double pct75()
IStats.Series.pct75()
pct75
in interface IStats.Series
public final double pct90()
IStats.Series.pct90()
pct90
in interface IStats.Series
public final double pct99()
IStats.Series.pct99()
pct99
in interface IStats.Series
public final double pct999()
IStats.Series.pct999()
pct999
in interface IStats.Series
public final double pct9999()
IStats.Series.pct9999()
pct9999
in interface IStats.Series
public long get(IStats.Series.Collector collector, cern.colt.list.DoubleArrayList temp, long minSeqNo)
IStats.Series
IStats.Series.Collector
.
get
in interface IStats.Series
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.minSeqNo
- The minimum sequence number (inclusive) to collect.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |