Class Summary

  • All Implemented Interfaces:
    Metric, Telemetry

    public final class Summary
    extends java.lang.Object
    implements Metric
    A Metric that represents an aggregated set of observations, with statistics, reported over an interval.

    Important: Values are not validated on construction, and this class's methods do not throw.

    • Constructor Summary

      Constructors 
      Constructor Description
      Summary​(java.lang.String name, int count, double sum, double min, double max, long startTimeMs, long endTimeMs, Attributes attributes)
      Create a new instance of a summary metric.
    • Constructor Detail

      • Summary

        public Summary​(java.lang.String name,
                       int count,
                       double sum,
                       double min,
                       double max,
                       long startTimeMs,
                       long endTimeMs,
                       Attributes attributes)
        Create a new instance of a summary metric.
        Parameters:
        name - The name for this Summary metric.
        count - The number of observations that are aggregated by this Summary.
        sum - The total of the aggregated observations.
        min - The minimum of the aggregated observations.
        max - The maximum of the aggregated observations.
        startTimeMs - The start time for the interval over which this Summary applies, in milliseconds since * epoch.
        endTimeMs - The end time for the interval over which this Summary applies, in milliseconds since * epoch.
        attributes - Dimensional attributes, as key-value pairs, associated with this instance.
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the user-visible name of the Metric.
        Returns:
        The user-visible name of the Metric.
      • getAttributes

        public java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
        Gets dimensional attributes associated with this Metric.
        Returns:
        The dimensional attributes associated with this Metric.
      • getCount

        public int getCount()
        Returns:
        The number of observations that are aggregated by this Summary.
      • getSum

        public double getSum()
        Returns:
        The total of the aggregated observations.
      • getMin

        public double getMin()
        Returns:
        The minimum of the aggregated observations.
      • getMax

        public double getMax()
        Returns:
        The maximum of the aggregated observations.
      • getStartTimeMs

        public long getStartTimeMs()
        Returns:
        The start time for the interval over which this Summary applies, in milliseconds since epoch.
      • getEndTimeMs

        public long getEndTimeMs()
        Returns:
        The end time for the interval over which this Summary applies, in milliseconds since epoch.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object