public class WeightedSnapshot
extends org.eclipse.microprofile.metrics.Snapshot
WeightedSnapshot
.Modifier and Type | Class and Description |
---|---|
static class |
WeightedSnapshot.WeightedSample
A single sample item with value and its weights for
WeightedSnapshot . |
Constructor and Description |
---|
WeightedSnapshot(Collection<WeightedSnapshot.WeightedSample> values)
Create a new
Snapshot with the given values. |
Modifier and Type | Method and Description |
---|---|
void |
dump(OutputStream output)
Writes the values of the snapshot to the given stream.
|
long |
getMax()
Returns the highest value in the snapshot.
|
double |
getMean()
Returns the weighted arithmetic mean of the values in the snapshot.
|
long |
getMin()
Returns the lowest value in the snapshot.
|
double |
getStdDev()
Returns the weighted standard deviation of the values in the snapshot.
|
double |
getValue(double quantile)
Returns the value at the given quantile.
|
long[] |
getValues()
Returns the entire set of values in the snapshot.
|
int |
size()
Returns the number of values in the snapshot.
|
String |
toString() |
public WeightedSnapshot(Collection<WeightedSnapshot.WeightedSample> values)
Snapshot
with the given values.values
- an unordered set of values in the reservoirpublic double getValue(double quantile)
getValue
in class org.eclipse.microprofile.metrics.Snapshot
quantile
- a given quantile, in [0..1]
quantile
public int size()
size
in class org.eclipse.microprofile.metrics.Snapshot
public long[] getValues()
getValues
in class org.eclipse.microprofile.metrics.Snapshot
public long getMax()
getMax
in class org.eclipse.microprofile.metrics.Snapshot
public long getMin()
getMin
in class org.eclipse.microprofile.metrics.Snapshot
public double getMean()
getMean
in class org.eclipse.microprofile.metrics.Snapshot
public double getStdDev()
getStdDev
in class org.eclipse.microprofile.metrics.Snapshot
public void dump(OutputStream output)
dump
in class org.eclipse.microprofile.metrics.Snapshot
output
- an output streamCopyright © 2021. All rights reserved.