}
System.out.println("Locator: " + locator + ", from: " + from + ", to: "
+ to + ", resolution: " + gran.shortName());
MetricData data = reader.getDatapointsForRange(locator, new Range(from, to), gran);
Map<Long, Points.Point> points = data.getData().getPoints();
for (Map.Entry<Long, Points.Point> item : points.entrySet()) {
String output = String.format("Timestamp: %d, Data: %s, Unit: %s", item.getKey(), item.getValue().getData().toString(), data.getUnit());
System.out.println(output);
}
}