public void buildTopErrorInfo(Payload payload, Model model) {
int minuteCount = payload.getMinuteCounts();
int minute = model.getMinute();
TopReport report = queryTopReport(payload);
List<String> excludeDomains = Arrays.asList(Constants.FRONT_END);
TopMetric topMetric = new TopMetric(minuteCount, payload.getTopCounts(), m_configManager, excludeDomains);
Date end = new Date(payload.getDate() + TimeHelper.ONE_MINUTE * minute);
Date start = new Date(end.getTime() - TimeHelper.ONE_MINUTE * minuteCount);
topMetric.setStart(start).setEnd(end);
if (minuteCount > minute) {
Payload lastPayload = new Payload();
Date lastHour = new Date(payload.getDate() - TimeHelper.ONE_HOUR);
lastPayload.setDate(new SimpleDateFormat("yyyyMMddHH").format(lastHour));
topMetric.visitTopReport(queryTopReport(lastPayload));
}
topMetric.visitTopReport(report);
model.setTopReport(report);
model.setTopMetric(topMetric);
}