Package org.eclipse.microprofile.metrics
Class Snapshot
java.lang.Object
org.eclipse.microprofile.metrics.Snapshot
A statistical snapshot of a
Snapshot.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a cumulative histogram bucket at the moment it was sampled from the Snapshot.static classRepresents a percentile and its value at the moment it was sampled from the Snapshot. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Snapshot.HistogramBucket[]Returns an array ofSnapshot.HistogramBucketcontaining the bucket and associated value of thisSnapshotat the moment invocation.abstract voiddump(OutputStream output) Writes the values of the snapshot to the given stream.abstract doublegetMax()Returns the highest value in the snapshot.abstract doublegetMean()Returns the arithmetic mean of the values in the snapshot.abstract Snapshot.PercentileValue[]Returns an array ofSnapshot.PercentileValuecontaining the percentiles and associated values of thisSnapshotat the moment invocation.abstract longsize()Returns the number of values in the snapshot.
-
Constructor Details
-
Snapshot
public Snapshot()
-
-
Method Details
-
size
public abstract long size()Returns the number of values in the snapshot.- Returns:
- the number of values
-
getMax
public abstract double getMax()Returns the highest value in the snapshot.- Returns:
- the highest value
-
getMean
public abstract double getMean()Returns the arithmetic mean of the values in the snapshot.- Returns:
- the arithmetic mean
-
percentileValues
Returns an array ofSnapshot.PercentileValuecontaining the percentiles and associated values of thisSnapshotat the moment invocation.- Returns:
- an array of
Snapshot.PercentileValueif it is available or an empty array if not available
-
bucketValues
Returns an array ofSnapshot.HistogramBucketcontaining the bucket and associated value of thisSnapshotat the moment invocation.- Returns:
- an array of
Snapshot.HistogramBucketif it is available or an empty array if not available
-
dump
Writes the values of the snapshot to the given stream.- Parameters:
output- an output stream
-