Interface MetricsQuery
- All Known Implementing Classes:
MetricsQueryImpl
public interface MetricsQuery
- Since:
- 7.3
- Author:
- Daniel Meyer
-
Method Summary
Modifier and TypeMethodDescriptionAggregate metrics by reportersRestrict to data collected before the given date (exclusive)interval()
Returns the metrics summed up and aggregated on a time interval.interval
(long interval) Returns the metrics summed up and aggregated on a time interval.limit
(int maxResults) Sets the limit row count of the result.offset
(int offset) Sets the offset of the returned results.Restrict to data collected by the reported with the given identifierRestrict to data collected after the given date (inclusive)long
sum()
-
Method Details
-
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
Restrict to data collected by the reported with the given identifier -
startDate
Restrict to data collected after the given date (inclusive) -
endDate
Restrict to data collected before the given date (exclusive) -
offset
Sets the offset of the returned results.- Parameters:
offset
- indicates after which row the result begins- Returns:
- the adjusted MetricsQuery
-
limit
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
List<MetricIntervalValue> 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
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
-