Class MetricValue


  • public class MetricValue
    extends Object
    Represents a metric value.
    • Constructor Detail

      • MetricValue

        public MetricValue()
    • Method Detail

      • timeStamp

        public org.joda.time.DateTime timeStamp()
        Get the timestamp for the metric value in ISO 8601 format.
        Returns:
        the timeStamp value
      • withTimeStamp

        public MetricValue withTimeStamp​(org.joda.time.DateTime timeStamp)
        Set the timestamp for the metric value in ISO 8601 format.
        Parameters:
        timeStamp - the timeStamp value to set
        Returns:
        the MetricValue object itself.
      • average

        public Double average()
        Get the average value in the time range.
        Returns:
        the average value
      • withAverage

        public MetricValue withAverage​(Double average)
        Set the average value in the time range.
        Parameters:
        average - the average value to set
        Returns:
        the MetricValue object itself.
      • minimum

        public Double minimum()
        Get the least value in the time range.
        Returns:
        the minimum value
      • withMinimum

        public MetricValue withMinimum​(Double minimum)
        Set the least value in the time range.
        Parameters:
        minimum - the minimum value to set
        Returns:
        the MetricValue object itself.
      • maximum

        public Double maximum()
        Get the greatest value in the time range.
        Returns:
        the maximum value
      • withMaximum

        public MetricValue withMaximum​(Double maximum)
        Set the greatest value in the time range.
        Parameters:
        maximum - the maximum value to set
        Returns:
        the MetricValue object itself.
      • total

        public Double total()
        Get the sum of all of the values in the time range.
        Returns:
        the total value
      • withTotal

        public MetricValue withTotal​(Double total)
        Set the sum of all of the values in the time range.
        Parameters:
        total - the total value to set
        Returns:
        the MetricValue object itself.
      • count

        public Long count()
        Get the number of samples in the time range. Can be used to determine the number of values that contributed to the average value.
        Returns:
        the count value
      • withCount

        public MetricValue withCount​(Long count)
        Set the number of samples in the time range. Can be used to determine the number of values that contributed to the average value.
        Parameters:
        count - the count value to set
        Returns:
        the MetricValue object itself.