return GSON.toJsonTree(resultObj);
}
private void computeProcessBusyness(MetricsRequest metricsRequest, TimeSeriesResponse.Builder builder)
throws OperationException {
MetricsScanQuery scanQuery = new MetricsScanQueryBuilder()
.setContext(metricsRequest.getContextPrefix())
.setMetric("process.tuples.read")
.build(metricsRequest.getStartTime(), metricsRequest.getEndTime());
MetricsScope scope = metricsRequest.getScope();
PeekingIterator<TimeValue> tuplesReadItor =
Iterators.peekingIterator(queryTimeSeries(scope, scanQuery, metricsRequest.getInterpolator()));
scanQuery = new MetricsScanQueryBuilder()
.setContext(metricsRequest.getContextPrefix())
.setMetric("process.events.processed")
.build(metricsRequest.getStartTime(), metricsRequest.getEndTime());
PeekingIterator<TimeValue> eventsProcessedItor =