Class DefaultMetric

java.lang.Object
com.arpnetworking.metrics.mad.model.DefaultMetric
All Implemented Interfaces:
Metric

public final class DefaultMetric extends Object implements Metric
A variable and data to describe the input to a statistic calculator.
Author:
Brandon Arp (brandon dot arp at inscopemetrics dot io), Ville Koskela (ville dot koskela at inscopemetrics dot io)
  • Method Details

    • getType

      public MetricType getType()
      Description copied from interface: Metric
      Accessor for the type of metric.
      Specified by:
      getType in interface Metric
      Returns:
      The type of metric.
    • getValues

      public List<Quantity> getValues()
      Description copied from interface: Metric
      Accessor for the collected sample data.
      Specified by:
      getValues in interface Metric
      Returns:
      The collected sample data.
    • getStatistics

      public com.google.common.collect.ImmutableMap<Statistic,com.google.common.collect.ImmutableList<CalculatedValue<?>>> getStatistics()
      Description copied from interface: Metric
      Accessor for the collected statistical data.
      Specified by:
      getStatistics in interface Metric
      Returns:
      The collected statistical data.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • toLogValue

      public Object toLogValue()
      Generate a Steno log compatible representation. NOTE: This class is not marked @Loggable due to the potentially large number of samples in the value field. Using @Loggable would cause them all to be serialized and in the past has caused significant performance problems.
      Returns:
      Steno log compatible representation.