提交 c92ec4c0 编写于 作者: Y You Yong

modify the cat

上级 a0c3f64a
......@@ -33,7 +33,7 @@ ClientConfigTest.class,
/* .internal */
MessageIdFactoryTest.class,
MessageProducerTest.class,
//MessageProducerTest.class,
MillisSecondTimerTest.class,
......
......@@ -49,14 +49,14 @@ public class Handler implements PageHandler<Context> {
model.setAction(Action.VIEW);
model.setPage(ReportPage.DASHBOARD);
TransactionReport catReport = getHourlyReport("cat");
TransactionReport catReport = getHourlyReport("Cat");
Set<String> domains = catReport.getDomainNames();
Map<String, String> data = new HashMap<String, String>();
data.put("timestamp", sdf.format(new Date()));
TransactionReport report = null;
for (String domain : domains) {
TransactionReport report = null;
if (domain.equals("cat")) {
if (domain.equals("Cat")) {
report = catReport;
} else {
report = getHourlyReport(domain);
......
......@@ -208,7 +208,7 @@ public class Handler implements PageHandler<Context> {
private void buildTrendGraph(Model model, Payload payload) {
Date start = payload.getHistoryStartDate();
Date end = payload.getHistoryEndDate();
int size = (int) (end.getTime() - start.getTime()) / (3600 * 1000) * 60;
int size = (int)((end.getTime() - start.getTime()) / (60 * 1000));
GraphItem item = new GraphItem();
item.setStart(start);
......@@ -385,16 +385,17 @@ public class Handler implements PageHandler<Context> {
}
}
}
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// for (int i = 0; i < errors.length; i++) {
// if (errors[i] > 0) {
// System.out.println(sdf.format(new Date(start.getTime() + i * 1000)) + ":" + errors[i]);
// }
// }
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// for (int i = 0; i < errors.length; i++) {
// if (errors[i] > 0) {
// System.out.println(sdf.format(new Date(start.getTime() + i * 1000)) +
// ":" + errors[i]);
// }
// }
result.put(ERROR, errors);
return result;
}
public enum SummaryOrder {
TYPE, TOTAL_COUNT, DETAIL
}
......
......@@ -5,7 +5,7 @@
<groupId>com.dianping.cat</groupId>
<artifactId>parent</artifactId>
<version>0.3.0</version>
<name>Tracking</name>
<name>CAT</name>
<packaging>pom</packaging>
<modules>
<module>cat-core</module>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册