Class CombinedMetricData

java.lang.Object
com.arpnetworking.clusteraggregator.models.CombinedMetricData

public final class CombinedMetricData extends Object
A metric-based aggregation model. Holds all of the statistics and supporting for a metric on a host. These will be combined in an AggregationRouter to produce the set of cluster statistics.
Author:
Brandon Arp (brandon dot arp at inscopemetrics dot com)
  • Field Details

    • HOST_KEY

      public static final String HOST_KEY
      The key used in dimensions to specify the host-dimension.
      See Also:
    • SERVICE_KEY

      public static final String SERVICE_KEY
      The key used in dimensions to specify the service-dimension.
      See Also:
    • CLUSTER_KEY

      public static final String CLUSTER_KEY
      The key used in dimensions to specify the cluster-dimension.
      See Also:
  • Method Details

    • getMetricName

      public String getMetricName()
    • getPeriod

      public Duration getPeriod()
    • getCalculatedValues

      public Map<Statistic,CombinedMetricData.StatisticValue> getCalculatedValues()
    • getPeriodStart

      public ZonedDateTime getPeriodStart()
    • getMinRequestTime

      public Optional<ZonedDateTime> getMinRequestTime()
    • getService

      public String getService()
    • getCluster

      public String getCluster()
    • computePopulationSize

      public static long computePopulationSize(String metricName, Map<Statistic,CombinedMetricData.StatisticValue> statisticValues)
      Compute the population size for a metric from its statistic values.
      Parameters:
      metricName - the name of the metric
      statisticValues - the statistic values for the metric.
      Returns:
      requires CountStatistic or HistogramStatistic to return an accurate count otherwise returns 1
    • computePopulationSizeFromCalculatedValues

      public static long computePopulationSizeFromCalculatedValues(String metricName, Map<Statistic,CalculatedValue<?>> calculatedValues)
      Compute the population size for a metric from its calculated values.
      Parameters:
      metricName - the name of the metric
      calculatedValues - the calculated values for the metric.
      Returns:
      requires CountStatistic or HistogramStatistic to return an accurate count otherwise returns 1