DateTime begin = new DateTime(beginTime);
if (dateTimeService.isInRawDataRange(begin)) {
Iterable<RawNumericMetric> metrics = dao.findRawMetrics(scheduleIds, beginTime, endTime);
return createRawComposites(metrics, beginTime, endTime, numberOfBuckets);
}
Bucket bucket = getBucket(begin);
List<AggregateNumericMetric> metrics = loadMetrics(scheduleIds, beginTime, endTime, bucket);
return createComposites(metrics, beginTime, endTime, numberOfBuckets);
}