Interface MetricsQuery

All Known Implementing Classes:
MetricsQueryImpl

public interface MetricsQuery
Since:
7.3
Author:
Daniel Meyer
  • Method Details

    • name

      MetricsQuery name(String name)
      Parameters:
      name - The name of the metrics to query for
      See Also:
      • in Metrics for a list of names which can be used here.
    • reporter

      MetricsQuery reporter(String reporter)
      Restrict to data collected by the reported with the given identifier
    • startDate

      MetricsQuery startDate(Date startTime)
      Restrict to data collected after the given date (inclusive)
    • endDate

      MetricsQuery endDate(Date endTime)
      Restrict to data collected before the given date (exclusive)
    • offset

      MetricsQuery offset(int offset)
      Sets the offset of the returned results.
      Parameters:
      offset - indicates after which row the result begins
      Returns:
      the adjusted MetricsQuery
    • limit

      MetricsQuery limit(int maxResults)
      Sets the limit row count of the result. Can't be set larger than 200, since it is the maximum row count which should be returned.
      Parameters:
      maxResults - the new row limit of the result
      Returns:
      the adjusted MetricsQuery
    • aggregateByReporter

      MetricsQuery aggregateByReporter()
      Aggregate metrics by reporters
      Returns:
      the adjusted MetricsQuery
    • interval

      Returns the metrics summed up and aggregated on a time interval. Default interval is 900 (15 minutes). The list size has a maximum of 200 the maximum can be decreased with the MetricsQuery#limit method. Paging is enabled with the help of the offset.
      Returns:
      the aggregated metrics
    • interval

      List<MetricIntervalValue> interval(long interval)
      Returns the metrics summed up and aggregated on a time interval. The size of the interval is given via parameter. The time unit is seconds! The list size has a maximum of 200 the maximum can be decreased with the MetricsQuery#limit method. Paging is enabled with the help of the offset.
      Parameters:
      interval - The time interval on which the metrics should be aggregated. The time unit is seconds.
      Returns:
      the aggregated metrics
    • sum

      long sum()
      Returns:
      the aggregated sum