Skip to content

Instantly share code, notes, and snippets.

@pdeva
Created July 31, 2014 18:13
Show Gist options
  • Save pdeva/42c32be33236623a63b2 to your computer and use it in GitHub Desktop.
Save pdeva/42c32be33236623a63b2 to your computer and use it in GitHub Desktop.
static Filter createFilterForAllTxns(String metricName, ObjectId appId)
{
return new Filter()
.addAttribute("appid", appId.toString())
.addTag(metricName);
}
Interval tempInterval = new Interval(interval.getStart(), interval.getEnd().plusSeconds(1));
Cursor<MultiDataPoint> countCursor =
tempoWriter.getClient().readMultiDataPoints(createFilterForAllTxns("count", appId), tempInterval, rollup(intervalInMins));
Cursor<MultiDataPoint> totalTimeCursor =
tempoWriter.getClient().readMultiDataPoints(createFilterForAllTxns("totalTime", appId), tempInterval, rollup(intervalInMins));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment