Package io.dropwizard.metrics5
Class WeightedSnapshot
java.lang.Object
io.dropwizard.metrics5.Snapshot
io.dropwizard.metrics5.WeightedSnapshot
A statistical snapshot of a
WeightedSnapshot.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA single sample item with value and its weights forWeightedSnapshot. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(OutputStream output) Writes the values of the snapshot to the given stream.longgetMax()Returns the highest value in the snapshot.doublegetMean()Returns the weighted arithmetic mean of the values in the snapshot.longgetMin()Returns the lowest value in the snapshot.doubleReturns the weighted standard deviation of the values in the snapshot.doublegetValue(double quantile) Returns the value at the given quantile.long[]Returns the entire set of values in the snapshot.intsize()Returns the number of values in the snapshot.Methods inherited from class io.dropwizard.metrics5.Snapshot
get75thPercentile, get95thPercentile, get98thPercentile, get999thPercentile, get99thPercentile, getMedian
-
Constructor Details
-
WeightedSnapshot
Create a newSnapshotwith the given values.- Parameters:
values- an unordered set of values in the reservoir
-
-
Method Details
-
getValue
public double getValue(double quantile) Returns the value at the given quantile. -
size
public int size()Returns the number of values in the snapshot. -
getValues
public long[] getValues()Returns the entire set of values in the snapshot. -
getMax
public long getMax()Returns the highest value in the snapshot. -
getMin
public long getMin()Returns the lowest value in the snapshot. -
getMean
public double getMean()Returns the weighted arithmetic mean of the values in the snapshot. -
getStdDev
public double getStdDev()Returns the weighted standard deviation of the values in the snapshot. -
dump
Writes the values of the snapshot to the given stream.
-