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.
|
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.Snapshotquantile - a given quantile, in [0..1]quantilepublic int size()
size in class org.eclipse.microprofile.metrics.Snapshotpublic long[] getValues()
getValues in class org.eclipse.microprofile.metrics.Snapshotpublic long getMax()
getMax in class org.eclipse.microprofile.metrics.Snapshotpublic long getMin()
getMin in class org.eclipse.microprofile.metrics.Snapshotpublic double getMean()
getMean in class org.eclipse.microprofile.metrics.Snapshotpublic double getStdDev()
getStdDev in class org.eclipse.microprofile.metrics.Snapshotpublic void dump(OutputStream output)
dump in class org.eclipse.microprofile.metrics.Snapshotoutput - an output streamCopyright © 2018 JBoss by Red Hat. All rights reserved.