List<MetricDefinitionAggregate> ret = new ArrayList<MetricDefinitionAggregate>(definitions.size());
for (MeasurementDefinition def : definitions) {
if (def.getDataType()==DataType.MEASUREMENT) {
MeasurementAggregate aggregate = dataManager.getAggregate(caller, groupId, def.getId(), startTime, endTime);
MetricDefinitionAggregate res = new MetricDefinitionAggregate(def.getId(), aggregate.getMin(),aggregate.getAvg(),aggregate.getMax());
ret.add(res);
}
}
return ret;
}