Date end = TimeHelper.getCurrentDay();
Set<String> domains = m_reportService.queryAllDomainNames(start, end, TransactionAnalyzer.ID);
for (String domain : domains) {
if (m_configManger.validateDomain(domain)) {
Transaction t = Cat.newTransaction("ReloadTask", "Reload-Week-" + domain);
TransactionReport transactionReport = m_reportService.queryTransactionReport(domain, start, end);
new TransactionReportCountFilter().visitTransactionReport(transactionReport);
m_reportService.insertWeeklyReport(buildWeeklyReport(domain, start, TransactionAnalyzer.ID),
com.dianping.cat.consumer.transaction.model.transform.DefaultNativeBuilder.build(transactionReport));
EventReport eventReport = m_reportService.queryEventReport(domain, start, end);
new EventReportCountFilter().visitEventReport(eventReport);
m_reportService.insertWeeklyReport(buildWeeklyReport(domain, start, EventAnalyzer.ID),
com.dianping.cat.consumer.event.model.transform.DefaultNativeBuilder.build(eventReport));
ProblemReport problemReport = m_reportService.queryProblemReport(domain, start, end);
m_reportService.insertWeeklyReport(buildWeeklyReport(domain, start, ProblemAnalyzer.ID),
com.dianping.cat.consumer.problem.model.transform.DefaultNativeBuilder.build(problemReport));
CrossReport crossReport = m_reportService.queryCrossReport(domain, start, end);
m_reportService.insertWeeklyReport(buildWeeklyReport(domain, start, CrossAnalyzer.ID),
com.dianping.cat.consumer.cross.model.transform.DefaultNativeBuilder.build(crossReport));
MatrixReport matrixReport = m_reportService.queryMatrixReport(domain, start, end);
new MatrixReportFilter().visitMatrixReport(matrixReport);
m_reportService.insertWeeklyReport(buildWeeklyReport(domain, start, MatrixAnalyzer.ID),
com.dianping.cat.consumer.matrix.model.transform.DefaultNativeBuilder.build(matrixReport));
t.setStatus(Transaction.SUCCESS);
t.complete();
}
}
String domain = Constants.CAT;
StateReport stateReport = m_reportService.queryStateReport(domain, start, end);