提交 b154893c 编写于 作者: Y yong.you

Merge branch 'biz' of github.com:dianping/cat into biz

......@@ -7,6 +7,7 @@ import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
......@@ -125,7 +126,6 @@ public class Handler implements PageHandler<Context> {
case SERVICE_REPORT:
case SERVICE_HISTORY_REPORT:
ServiceReport serviceReport = queryServiceReport(payload);
List<com.dianping.cat.home.service.entity.Domain> dHisList = sort(serviceReport, payload.getSortBy());
model.setServiceList(dHisList);
model.setServiceReport(serviceReport);
......@@ -162,9 +162,18 @@ public class Handler implements PageHandler<Context> {
case UTILIZATION_HISTORY_REPORT:
UtilizationReport utilizationReport = queryUtilizationReport(payload);
List<com.dianping.cat.home.utilization.entity.Domain> dUList = sort(utilizationReport, payload.getSortBy());
List<com.dianping.cat.home.utilization.entity.Domain> dUWebList = new LinkedList<com.dianping.cat.home.utilization.entity.Domain>();
List<com.dianping.cat.home.utilization.entity.Domain> dUServiceList = new LinkedList<com.dianping.cat.home.utilization.entity.Domain>();
for(com.dianping.cat.home.utilization.entity.Domain d : dUList){
if(d.getUrlCount() > 0)
dUWebList.add(d);
if(d.getServiceCount() > 0)
dUServiceList.add(d);
}
model.setUtilizationReport(utilizationReport);
model.setUtilizationList(dUList);
model.setUtilizationWebList(dUWebList);
model.setUtilizationServiceList(dUServiceList);
break;
}
model.setPage(ReportPage.BUG);
......@@ -215,9 +224,7 @@ public class Handler implements PageHandler<Context> {
private UtilizationReport queryUtilizationReport(Payload payload) {
Pair<Date, Date> pair = queryStartEndTime(payload);
UtilizationReport report = m_reportService.queryUtilizationReport(CatString.CAT, pair.getKey(), pair.getValue());
new UtilizationReportScore().visitUtilizationReport(report);
return report;
}
......
......@@ -44,6 +44,24 @@ public class Model extends AbstractReportModel<Action, Context> {
private List<com.dianping.cat.home.utilization.entity.Domain> m_utilizationList;
private List<com.dianping.cat.home.utilization.entity.Domain> m_utilizationWebList;
private List<com.dianping.cat.home.utilization.entity.Domain> m_utilizationServiceList;
public List<com.dianping.cat.home.utilization.entity.Domain> getUtilizationWebList() {
return m_utilizationWebList;
}
public List<com.dianping.cat.home.utilization.entity.Domain> getUtilizationServiceList() {
return m_utilizationServiceList;
}
public void setUtilizationServiceList(
List<com.dianping.cat.home.utilization.entity.Domain> utilizationServiceList) {
m_utilizationServiceList = utilizationServiceList;
}
public Model(Context ctx) {
super(ctx);
}
......@@ -171,4 +189,9 @@ public class Model extends AbstractReportModel<Action, Context> {
m_utilizationReport = utilizationReport;
}
public void setUtilizationWebList(
List<com.dianping.cat.home.utilization.entity.Domain> utilizationWebList) {
m_utilizationWebList = utilizationWebList;
}
}
......@@ -15,6 +15,17 @@ public class Payload extends AbstractReportPayload<Action> {
@FieldMeta("sort")
private String m_sortBy = "avg";
@FieldMeta("tab")
private String m_tab = "tab1";
public String getTab() {
return m_tab;
}
public void setTab(String tab) {
m_tab = tab;
}
public Payload() {
super(ReportPage.BUG);
}
......
......@@ -91,6 +91,7 @@ public class BugReportService extends AbstractReportService<BugReport> {
try {
BugReport reportModel = com.dianping.cat.home.bug.transform.DefaultSaxParser.parse(xml);
reportModel.accept(merger);
System.out.println(reportModel);
} catch (Exception e) {
Cat.logError(e);
Cat.getProducer().logEvent("ErrorXML", name, Event.SUCCESS,
......
......@@ -56,6 +56,7 @@ public class UtilizationReportService extends AbstractReportService<UtilizationR
DailyReport report = m_dailyReportDao.findByDomainNamePeriod(domain, name, new Date(startTime),
DailyReportEntity.READSET_FULL);
String xml = report.getContent();
System.out.println(xml);
UtilizationReport reportModel = com.dianping.cat.home.utilization.transform.DefaultSaxParser.parse(xml);
reportModel.accept(merger);
} catch (Exception e) {
......
......@@ -46,9 +46,9 @@ public class UtilizationReportBuilder implements ReportTaskBuilder {
@Override
public boolean buildHourlyTask(String name, String domain, Date start) {
UtilizationReport utilizationReport = new UtilizationReport();
UtilizationReport utilizationReport = new UtilizationReport(CatString.CAT);
Date end = new Date(start.getTime() + TimeUtil.ONE_HOUR);
Set<String> domains = m_reportService.queryAllDomainNames(start, end, "matrix");
Set<String> domains = m_reportService.queryAllDomainNames(start, end, "transaction");
TransactionReportVisitor visitor = new TransactionReportVisitor().setReport(utilizationReport);
for (String domainName : domains) {
......@@ -60,9 +60,6 @@ public class UtilizationReportBuilder implements ReportTaskBuilder {
utilizationReport.findOrCreateDomain(domainName).setMachineNumber(size);
}
HourlyReport report = new HourlyReport();
System.out.println(utilizationReport);
report.setContent(utilizationReport.toString());
report.setCreationDate(new Date());
report.setDomain(domain);
......
......@@ -10,11 +10,19 @@ public class UtilizationReportMerger extends DefaultMerger {
super(utilizationReport);
}
@Override
public void visitUtilizationReport(UtilizationReport utilizationReport) {
UtilizationReport oldReport = getUtilizationReport();
oldReport.setDomain(utilizationReport.getDomain());
oldReport.setStartTime(utilizationReport.getStartTime());
oldReport.setEndTime(utilizationReport.getEndTime());
super.visitUtilizationReport(utilizationReport);
}
@Override
protected void mergeUtilizationReport(UtilizationReport old, UtilizationReport bugReport) {
old.setStartTime(bugReport.getStartTime());
old.setEndTime(bugReport.getEndTime());
old.setDomain(bugReport.getDomain());
super.mergeUtilizationReport(old, bugReport);
}
......@@ -25,6 +33,8 @@ public class UtilizationReportMerger extends DefaultMerger {
}
old.setUrlCount(old.getUrlCount() + domain.getUrlCount());
old.setUrlResponseTime(old.getUrlResponseTime() + domain.getUrlResponseTime());
old.setServiceCount(old.getServiceCount() + domain.getServiceCount());
old.setServiceResponseTime(old.getServiceResponseTime() + domain.getServiceResponseTime());
old.setSqlCount(old.getSqlCount() + domain.getSqlCount());
old.setPigeonCallCount(old.getPigeonCallCount() + domain.getPigeonCallCount());
old.setSwallowCallCount(old.getSwallowCallCount() + domain.getSwallowCallCount());
......
......@@ -4,25 +4,30 @@
<%@include file="../bugTree.jsp"%>
</div>
<div class="span10">
<div class="tabbable " > <!-- Only required for left/right tabs -->
<ul class="nav nav-tabs alert-info">
<li class="text-right "><a id="tab1Href" href="#tab1" data-toggle="tab"><strong>Web</strong></a></li>
<li class="text-right "><a id="tab2Href" href="#tab2" data-toggle="tab"><strong>Service</strong></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<div class="report">
<table class="table table-striped table-bordered table-condensed">
<tr>
<th class="left">id</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization">Machine Number</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=urlCount">URL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=urlResponse">URL Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=serviceCount">Service Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=serviceResponse">Service Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=serviceCount">Service Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=serviceResponse">Service Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=sqlCount">SQL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=pigeonCallCount">Pigeon Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=swallowCallCount">Swallow Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=memcacheCount">Memcache Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=score">Score</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&tab=tab1">Machine Number</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=urlCount&tab=tab1">URL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=urlResponse&tab=tab1">URL Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=serviceCount&tab=tab1">Service Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=serviceResponse&tab=tab1">Service Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=sqlCount&tab=tab1">SQL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=pigeonCallCount&tab=tab1">Pigeon Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=swallowCallCount&tab=tab1">Swallow Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=memcacheCount&tab=tab1">Memcache Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=webScore&tab=tab1">Web Score</th>
</tr>
<c:forEach var="item" items="${model.utilizationList}" varStatus="status">
<c:forEach var="item" items="${model.utilizationWebList}" varStatus="status">
<tr class="${status.index mod 2 != 0 ? 'odd' : 'even'}">
<td>${item.id}</td>
<td style="text-align:right">${item.machineNumber}</td>
......@@ -30,16 +35,52 @@
<td style="text-align:right">${w:format(item.urlResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.serviceCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.serviceResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.sqlCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.pigeonCallCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.swallowCallCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.memcacheCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.webScore,'#,###,###,###,##0')}</td>
</tr>
</c:forEach>
</table>
</div>
</div>
<div class="tab-pane" id="tab2">
<div class="report">
<table class="table table-striped table-bordered table-condensed">
<tr>
<th class="left">id</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&tab=tab2">Machine Number</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=urlCount&tab=tab2">URL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=urlResponse&tab=tab2">URL Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=serviceCount&tab=tab2">Service Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=serviceResponse&tab=tab2">Service Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=sqlCount&tab=tab2">SQL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=pigeonCallCount&tab=tab2">Pigeon Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=swallowCallCount&tab=tab2">Swallow Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=memcacheCount&tab=tab2">Memcache Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=utilization&sort=serviceScore&tab=tab2">Service Score</th>
</tr>
<c:forEach var="item" items="${model.utilizationServiceList}" varStatus="status">
<tr class="${status.index mod 2 != 0 ? 'odd' : 'even'}">
<td>${item.id}</td>
<td style="text-align:right">${item.machineNumber}</td>
<td style="text-align:right">${w:format(item.urlCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.urlResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.serviceCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.serviceResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.sqlCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.pigeonCallCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.swallowCallCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.memcacheCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.score,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.serviceScore,'#,###,###,###,##0')}</td>
</tr>
</c:forEach>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -43,3 +43,13 @@
</div>
</a:body>
<script type="text/javascript">
$(document).ready(function() {
var tab = '${payload.tab}';
if(tab=='tab2'){
$('#tab2Href').trigger('click');
}else{
$('#tab1Href').trigger('click');
}
});
</script>
......@@ -45,36 +45,85 @@
<%@include file="../bugTree.jsp"%>
</div>
<div class="span10">
<div class="tabbable " > <!-- Only required for left/right tabs -->
<ul class="nav nav-tabs alert-info">
<li class="text-right "><a id="tab1Href" href="#tab1" data-toggle="tab"><strong>Web</strong></a></li>
<li class="text-right "><a id="tab2Href" href="#tab2" data-toggle="tab"><strong>Service</strong></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<div class="report">
<table class="table table-striped table-bordered table-condensed">
<tr>
<th class="left">id</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&reportType=${payload.reportType}">Machine Number</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=urlCount&reportType=${payload.reportType}">URL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=urlResponse&reportType=${payload.reportType}">URL Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=sqlCount&reportType=${payload.reportType}">SQL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=pigeonCallCount&reportType=${payload.reportType}">Pigeon Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=swallowCallCount&reportType=${payload.reportType}">Swallow Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=memcacheCount&reportType=${payload.reportType}">Memcache Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyUtilization&sort=score&reportType=${payload.reportType}">Score</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&tab=tab1">Machine Number</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=urlCount&tab=tab1">URL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=urlResponse&tab=tab1">URL Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=serviceCount&tab=tab1">Service Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=serviceResponse&tab=tab1">Service Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=sqlCount&tab=tab1">SQL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=pigeonCallCount&tab=tab1">Pigeon Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=swallowCallCount&tab=tab1">Swallow Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=memcacheCount&tab=tab1">Memcache Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=webScore&tab=tab1">Web Score</th>
</tr>
<c:forEach var="item" items="${model.utilizationList}" varStatus="status">
<c:forEach var="item" items="${model.utilizationWebList}" varStatus="status">
<tr class="${status.index mod 2 != 0 ? 'odd' : 'even'}">
<td>${item.id}</td>
<td style="text-align:right">${item.machineNumber}</td>
<td style="text-align:right">${w:format(item.urlCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.urlResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.serviceCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.serviceResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.sqlCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.pigeonCallCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.swallowCallCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.memcacheCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.score,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.webScore,'#,###,###,###,##0')}</td>
</tr>
</c:forEach>
</table>
</div>
</div>
<div class="tab-pane" id="tab2">
<div class="report">
<table class="table table-striped table-bordered table-condensed">
<tr>
<th class="left">id</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&tab=tab2">Machine Number</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=urlCount&tab=tab2">URL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=urlResponse&tab=tab2">URL Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=serviceCount&tab=tab2">Service Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=serviceResponse&tab=tab2">Service Response Time</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=sqlCount&tab=tab2">SQL Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=pigeonCallCount&tab=tab2">Pigeon Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=swallowCallCount&tab=tab2">Swallow Call Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=memcacheCount&tab=tab2">Memcache Count</th>
<th style="text-align:right"><a href="?domain=${model.domain}&date=${model.date}&ip=${model.ipAddress}&op=historyHtilization&sort=serviceScore&tab=tab2">Service Score</th>
</tr>
<c:forEach var="item" items="${model.utilizationServiceList}" varStatus="status">
<tr class="${status.index mod 2 != 0 ? 'odd' : 'even'}">
<td>${item.id}</td>
<td style="text-align:right">${item.machineNumber}</td>
<td style="text-align:right">${w:format(item.urlCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.urlResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.serviceCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.serviceResponseTime,'0.0')}</td>
<td style="text-align:right">${w:format(item.sqlCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.pigeonCallCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.swallowCallCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.memcacheCount,'#,###,###,###,##0')}</td>
<td style="text-align:right">${w:format(item.serviceScore,'#,###,###,###,##0')}</td>
</tr>
</c:forEach>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="report">
<table class="footer">
......
......@@ -7,6 +7,7 @@ import org.unidal.lookup.ComponentTestCase;
import com.dianping.cat.Cat;
import com.dianping.cat.DomainManager;
import com.dianping.cat.helper.CatString;
public class UtilizationBuilderTest extends ComponentTestCase{
......@@ -17,7 +18,7 @@ public class UtilizationBuilderTest extends ComponentTestCase{
DomainManager manager = lookup(DomainManager.class);
manager.initialize();
builder.buildHourlyTask("utilization", "cat", new SimpleDateFormat("yyyyMMddHH").parse("2013082508"));
builder.buildHourlyTask("utilization",CatString.CAT, new SimpleDateFormat("yyyyMMddHH").parse("2013082505"));
}
@Test
......@@ -26,7 +27,7 @@ public class UtilizationBuilderTest extends ComponentTestCase{
DomainManager manager = lookup(DomainManager.class);
manager.initialize();
builder.buildDailyTask("utilization", "cat", new SimpleDateFormat("yyyyMMdd").parse("20130825"));
builder.buildDailyTask("utilization", CatString.CAT, new SimpleDateFormat("yyyyMMdd").parse("20130825"));
}
@Test
......@@ -35,7 +36,7 @@ public class UtilizationBuilderTest extends ComponentTestCase{
DomainManager manager = lookup(DomainManager.class);
manager.initialize();
builder.buildWeeklyTask("utilization", "cat", new SimpleDateFormat("yyyyMMdd").parse("20130717"));
builder.buildWeeklyTask("utilization", CatString.CAT, new SimpleDateFormat("yyyyMMdd").parse("20130717"));
}
@Test
......@@ -44,7 +45,7 @@ public class UtilizationBuilderTest extends ComponentTestCase{
DomainManager manager = lookup(DomainManager.class);
manager.initialize();
builder.buildMonthlyTask("utilization", "cat", new SimpleDateFormat("yyyyMMdd").parse("20130701"));
builder.buildMonthlyTask("utilization", CatString.CAT, new SimpleDateFormat("yyyyMMdd").parse("20130701"));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册