public static final class Stats.LatencyManager extends Object implements IStats.Latencies
IStats.Series.Collector, IStats.Series.Type
PROP_LATENCY_MANAGER_SAMPLE_SIZE
PROP_SERIES_SAMPLE_SIZE, PROP_SERIES_SAMPLE_SIZE_DEFAULT
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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.
|
public Stats.LatencyManager(String name)
public Stats.LatencyManager(String name, int sampleSize)
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.Copyright © 2019 Neeve Research, LLC. All Rights Reserved.