Package io.airlift.openmetrics.types
Record Class Summary
java.lang.Object
java.lang.Record
io.airlift.openmetrics.types.Summary
- All Implemented Interfaces:
Metric
-
Field Summary
Fields inherited from interface io.airlift.openmetrics.types.Metric
HELP_LINE_FORMAT, TYPE_LINE_FORMAT, VALUE_LINE_FORMAT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncount()Returns the value of thecountrecord component.created()Returns the value of thecreatedrecord component.final booleanIndicates whether some other object is "equal to" this one.static Summaryfrom(String metricName, TimeDistribution timeDistribution, String help) final inthashCode()Returns a hash code value for this object.help()Returns the value of thehelprecord component.Returns the value of themetricNamerecord component.Returns the value of thequantilesrecord component.sum()Returns the value of thesumrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Summary
public Summary(String metricName, Long count, Double sum, Double created, Map<Double, Double> quantiles, String help) Creates an instance of aSummaryrecord class.- Parameters:
metricName- the value for themetricNamerecord componentcount- the value for thecountrecord componentsum- the value for thesumrecord componentcreated- the value for thecreatedrecord componentquantiles- the value for thequantilesrecord componenthelp- the value for thehelprecord component
-
-
Method Details
-
from
-
getMetricExposition
- Specified by:
getMetricExpositionin interfaceMetric
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
metricName
Returns the value of themetricNamerecord component.- Specified by:
metricNamein interfaceMetric- Returns:
- the value of the
metricNamerecord component
-
count
Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
sum
Returns the value of thesumrecord component.- Returns:
- the value of the
sumrecord component
-
created
Returns the value of thecreatedrecord component.- Returns:
- the value of the
createdrecord component
-
quantiles
Returns the value of thequantilesrecord component.- Returns:
- the value of the
quantilesrecord component
-
help
Returns the value of thehelprecord component.- Returns:
- the value of the
helprecord component
-