Top Description Inners Constructors Methods
org.eclipse.microprofile.metrics

public abstract Class Snapshot

extends Object
Class Inheritance
Imports
java.io.OutputStream

A statistical snapshot of a Snapshot.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Snapshot.HistogramBucket

Represents a cumulative histogram bucket at the moment it was sampled from the Snapshot.

public static class
Snapshot.PercentileValue

Represents a percentile and its value at the moment it was sampled from the Snapshot.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract Snapshot.HistogramBucket[]

Returns:

an array of HistogramBucket if it is available or an empty array if not available
bucketValues
()

Returns an array of HistogramBucket containing the bucket and associated value of this Snapshot at the moment invocation.

public abstract void
dump(OutputStream
an output stream
output
)

Writes the values of the snapshot to the given stream.

public abstract double

Returns:

the highest value
getMax
()

Returns the highest value in the snapshot.

public abstract double

Returns:

the arithmetic mean
getMean
()

Returns the arithmetic mean of the values in the snapshot.

public abstract Snapshot.PercentileValue[]

Returns:

an array of PercentileValue if it is available or an empty array if not available
percentileValues
()

Returns an array of PercentileValue containing the percentiles and associated values of this Snapshot at the moment invocation.

public abstract long

Returns:

the number of values
size
()

Returns the number of values in the snapshot.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Snapshotback to summary
public Snapshot()

Method Detail

bucketValuesback to summary
public abstract Snapshot.HistogramBucket[] bucketValues()

Returns an array of HistogramBucket containing the bucket and associated value of this Snapshot at the moment invocation.

Returns:Snapshot.HistogramBucket[]

an array of HistogramBucket if it is available or an empty array if not available

dumpback to summary
public abstract void dump(OutputStream output)

Writes the values of the snapshot to the given stream.

Parameters
output:OutputStream

an output stream

getMaxback to summary
public abstract double getMax()

Returns the highest value in the snapshot.

Returns:double

the highest value

getMeanback to summary
public abstract double getMean()

Returns the arithmetic mean of the values in the snapshot.

Returns:double

the arithmetic mean

percentileValuesback to summary
public abstract Snapshot.PercentileValue[] percentileValues()

Returns an array of PercentileValue containing the percentiles and associated values of this Snapshot at the moment invocation.

Returns:Snapshot.PercentileValue[]

an array of PercentileValue if it is available or an empty array if not available

sizeback to summary
public abstract long size()

Returns the number of values in the snapshot.

Returns:long

the number of values

org.eclipse.microprofile.metrics back to summary

public Class Snapshot.HistogramBucket

extends Object
Class Inheritance

Represents a cumulative histogram bucket at the moment it was sampled from the Snapshot. The bucket of Timer will be represented in nanoseconds. See bucketValues()

Field Summary

Modifier and TypeField and Description
private final double
private final long

Constructor Summary

AccessConstructor and Description
public
HistogramBucket(double
the upper limit value of this bucket
bucket
,
long
count at this bucket
count
)

Method Summary

Modifier and TypeMethod and Description
public double

Returns:

the upper limit value of this bucket
getBucket
()

Returns the upper limit value of this bucket

public long

Returns:

the count of the bucket
getCount
()

Returns the count of the bucket

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bucketback to summary
private final double bucket
countback to summary
private final long count

Constructor Detail

HistogramBucketback to summary
public HistogramBucket(double bucket, long count)
Parameters
bucket:double

the upper limit value of this bucket

count:long

count at this bucket

Method Detail

getBucketback to summary
public double getBucket()

Returns the upper limit value of this bucket

Returns:double

the upper limit value of this bucket

getCountback to summary
public long getCount()

Returns the count of the bucket

Returns:long

the count of the bucket

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

org.eclipse.microprofile.metrics back to summary

public Class Snapshot.PercentileValue

extends Object
Class Inheritance

Represents a percentile and its value at the moment it was sampled from the Snapshot. Percentile values of a Timer are represented in units of nanoseconds. See percentileValue()

Field Summary

Modifier and TypeField and Description
private final double
private final double

Constructor Summary

AccessConstructor and Description
public
PercentileValue(double
percentile
percentile
,
double
value of percentile
value
)

Method Summary

Modifier and TypeMethod and Description
public double

Returns:

the percentile
getPercentile
()

Returns the percentile

public double

Returns:

the value at the percentile
getValue
()

Returns the value at percentile

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

percentileback to summary
private final double percentile
valueback to summary
private final double value

Constructor Detail

PercentileValueback to summary
public PercentileValue(double percentile, double value)
Parameters
percentile:double

percentile

value:double

value of percentile

Method Detail

getPercentileback to summary
public double getPercentile()

Returns the percentile

Returns:double

the percentile

getValueback to summary
public double getValue()

Returns the value at percentile

Returns:double

the value at the percentile

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object