Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
28cfc6ee
C
cat
项目概览
梦中观雨
/
cat
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
cat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
28cfc6ee
编写于
7月 17, 2012
作者:
Y
You Yong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify the matrix bug
上级
783f49d6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
125 deletion
+25
-125
cat-home/src/main/java/com/dianping/cat/report/page/model/matrix/MatrixReportMerger.java
...ping/cat/report/page/model/matrix/MatrixReportMerger.java
+0
-1
cat-home/src/main/java/com/dianping/cat/report/page/sql/Handler.java
...c/main/java/com/dianping/cat/report/page/sql/Handler.java
+12
-7
cat-home/src/main/resources/META-INF/plexus/components.xml
cat-home/src/main/resources/META-INF/plexus/components.xml
+12
-0
cat-home/src/main/webapp/WEB-INF/webres.tld
cat-home/src/main/webapp/WEB-INF/webres.tld
+1
-117
未找到文件。
cat-home/src/main/java/com/dianping/cat/report/page/model/matrix/MatrixReportMerger.java
浏览文件 @
28cfc6ee
...
...
@@ -22,7 +22,6 @@ public class MatrixReportMerger extends DefaultMerger {
@Override
protected
void
mergeRatio
(
Ratio
old
,
Ratio
ratio
)
{
old
.
setCount
(
old
.
getCount
()
+
ratio
.
getCount
());
old
.
setTotalCount
(
old
.
getTotalCount
()
+
ratio
.
getTotalCount
());
old
.
setTotalTime
(
old
.
getTotalTime
()
+
ratio
.
getTotalTime
());
if
(
old
.
getMin
()
==
0
)
{
...
...
cat-home/src/main/java/com/dianping/cat/report/page/sql/Handler.java
浏览文件 @
28cfc6ee
...
...
@@ -53,10 +53,7 @@ public class Handler implements PageHandler<Context> {
model
.
setPage
(
ReportPage
.
SQL
);
model
.
setDisplayDomain
(
payload
.
getDomain
());
model
.
setAction
(
payload
.
getAction
());
// Last hour is default
if
(
payload
.
getPeriod
().
isCurrent
())
{
payload
.
setStep
(
payload
.
getStep
()
-
1
);
}
switch
(
payload
.
getAction
())
{
case
VIEW:
showReport
(
model
,
payload
);
...
...
@@ -82,10 +79,15 @@ public class Handler implements PageHandler<Context> {
String
durationOvertime
=
""
;
String
hitsovOvrtime
=
""
;
String
failureOvertime
=
""
;
// Last hour is default
long
date
=
payload
.
getDate
();
if
(
payload
.
getPeriod
().
isCurrent
())
{
date
=
date
-
60
*
60
*
1000
;
}
// when id is 0, will analyze all the data under this domain
if
(
id
==
0
)
{
List
<
SqlReportRecord
>
allRecords
=
m_dao
.
findAllByDomainAndDate
(
payload
.
getDomain
(),
new
Date
(
payload
.
getDate
()),
SqlReportRecordEntity
.
READSET_FULL
);
List
<
SqlReportRecord
>
allRecords
=
m_dao
.
findAllByDomainAndDate
(
payload
.
getDomain
(),
new
Date
(
date
),
SqlReportRecordEntity
.
READSET_FULL
);
List
<
String
>
durationDistributions
=
new
ArrayList
<
String
>();
List
<
String
>
durationOvertimes
=
new
ArrayList
<
String
>();
List
<
String
>
hitsovOvrtimes
=
new
ArrayList
<
String
>();
...
...
@@ -135,6 +137,9 @@ public class Handler implements PageHandler<Context> {
String
domain
=
payload
.
getDomain
();
long
startDate
=
payload
.
getDate
();
model
.
setLongDate
(
startDate
);
if
(
payload
.
getPeriod
().
isCurrent
())
{
startDate
=
startDate
-
60
*
60
*
1000
;
}
Date
transactiondate
=
new
Date
(
startDate
);
List
<
String
>
domains
=
new
ArrayList
<
String
>();
Readset
<
SqlReportRecord
>
domainSet
=
SqlReportRecordEntity
.
READSET_DOMAIN
;
...
...
@@ -220,7 +225,7 @@ public class Handler implements PageHandler<Context> {
}
}
for
(
int
m
=
0
;
m
<=
12
;
m
++)
{
average
[
m
]
=
totalHit
[
m
]
==
0
?
0
:
sum
[
m
]
/(
double
)
totalHit
[
m
];
average
[
m
]
=
totalHit
[
m
]
==
0
?
0
:
sum
[
m
]
/
(
double
)
totalHit
[
m
];
}
StringBuilder
sb
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<=
12
;
i
++)
{
...
...
cat-home/src/main/resources/META-INF/plexus/components.xml
浏览文件 @
28cfc6ee
...
...
@@ -836,12 +836,24 @@
<requirement>
<role>
com.dianping.cat.report.page.task.JspViewer
</role>
</requirement>
<requirement>
<role>
com.dianping.cat.hadoop.dal.TaskDao
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.report.page.task.JspViewer
</role>
<implementation>
com.dianping.cat.report.page.task.JspViewer
</implementation>
</component>
<component>
<role>
com.dianping.cat.hadoop.dal.TaskDao
</role>
<implementation>
com.dianping.cat.hadoop.dal.TaskDao
</implementation>
<requirements>
<requirement>
<role>
com.site.dal.jdbc.QueryEngine
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.report.page.matrix.Handler
</role>
<implementation>
com.dianping.cat.report.page.matrix.Handler
</implementation>
...
...
cat-home/src/main/webapp/WEB-INF/webres.tld
浏览文件 @
28cfc6ee
...
...
@@ -42,8 +42,6 @@
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
<<<<<<< HEAD
=======
</attribute>
<dynamic-attributes>false</dynamic-attributes>
</tag>
...
...
@@ -58,15 +56,7 @@
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.Object</type>
>>>>>>> 241d65c954b0d5e7ca03a2c1cb32207603dceec9
</attribute>
<dynamic-attributes>false</dynamic-attributes>
</tag>
<tag>
<description><![CDATA[useCss Resource Tag]]></description>
<name>useCss</name>
<tag-class>org.unidal.webres.taglib.basic.UseCssTagHandler</tag-class>
<body-content>JSP</body-content>
<attribute>
<description><![CDATA[Identify whether the link URL is secure or not.]]></description>
<name>secure</name>
...
...
@@ -88,28 +78,6 @@
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<<<<<<< HEAD
<attribute>
<description><![CDATA[Set the css value with EL or a css ref.]]></description>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.Object</type>
</attribute>
<attribute>
<description><![CDATA[Target placement for this css resource to render]]></description>
<name>target</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<dynamic-attributes>true</dynamic-attributes>
</tag>
<tag>
<description><![CDATA[Resource token tag for page resources]]></description>
<name>token</name>
<tag-class>org.unidal.webres.taglib.basic.TokenTagHandler</tag-class>
=======
<attribute>
<description><![CDATA[Target placement for this css resource to render]]></description>
<name>target</name>
...
...
@@ -144,7 +112,6 @@
<description><![CDATA[Set tag to define a page attribute with id as name]]></description>
<name>set</name>
<tag-class>org.unidal.webres.taglib.basic.SetTagHandler</tag-class>
>>>>>>> 241d65c954b0d5e7ca03a2c1cb32207603dceec9
<body-content>JSP</body-content>
<attribute>
<description><![CDATA[The value]]></description>
...
...
@@ -160,31 +127,6 @@
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<<<<<<< HEAD
<attribute>
<description><![CDATA[Token type of resource: js, css]]></description>
<name>type</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<dynamic-attributes>false</dynamic-attributes>
</tag>
<tag>
<description><![CDATA[Set tag to define a page attribute with id as name]]></description>
<name>set</name>
<tag-class>org.unidal.webres.taglib.basic.SetTagHandler</tag-class>
<body-content>JSP</body-content>
<attribute>
<description><![CDATA[The name.]]></description>
<name>id</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<attribute>
<description><![CDATA[The value]]></description>
=======
<dynamic-attributes>false</dynamic-attributes>
</tag>
<tag>
...
...
@@ -194,19 +136,11 @@
<body-content>JSP</body-content>
<attribute>
<description><![CDATA[Set the js value with EL or a js ref.]]></description>
>>>>>>> 241d65c954b0d5e7ca03a2c1cb32207603dceec9
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.Object</type>
</attribute>
<dynamic-attributes>false</dynamic-attributes>
</tag>
<tag>
<description><![CDATA[useJs Resource Tag]]></description>
<name>useJs</name>
<tag-class>org.unidal.webres.taglib.basic.UseJsTagHandler</tag-class>
<body-content>JSP</body-content>
<attribute>
<description><![CDATA[Identify whether the link URL is secure or not.]]></description>
<name>secure</name>
...
...
@@ -228,10 +162,6 @@
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<<<<<<< HEAD
<attribute>
<description><![CDATA[Set the js value with EL or a js ref.]]></description>
=======
<attribute>
<description><![CDATA[Target placement for this js resource to render]]></description>
<name>target</name>
...
...
@@ -248,35 +178,12 @@
<body-content>JSP</body-content>
<attribute>
<description><![CDATA[The value for link, could be a expression or a link ref.]]></description>
>>>>>>> 241d65c954b0d5e7ca03a2c1cb32207603dceec9
<name>value</name>
<required>
fals
e</required>
<required>
tru
e</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.Object</type>
</attribute>
<attribute>
<<<<<<< HEAD
<description><![CDATA[Target placement for this js resource to render]]></description>
<name>target</name>
=======
<description><![CDATA[Identify whether the link URL is secure or not.]]></description>
<name>secure</name>
>>>>>>> 241d65c954b0d5e7ca03a2c1cb32207603dceec9
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>boolean</type>
</attribute>
<<<<<<< HEAD
<dynamic-attributes>true</dynamic-attributes>
</tag>
<tag>
<description><![CDATA[Link Resource Tag]]></description>
<name>link</name>
<tag-class>org.unidal.webres.taglib.basic.LinkTagHandler</tag-class>
<body-content>JSP</body-content>
=======
>>>>>>> 241d65c954b0d5e7ca03a2c1cb32207603dceec9
<attribute>
<description><![CDATA[Identify whether the link URL is secure or not.]]></description>
<name>secure</name>
<required>false</required>
...
...
@@ -290,16 +197,6 @@
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<<<<<<< HEAD
<attribute>
<description><![CDATA[The value for link, could be a expression or a link ref.]]></description>
<name>value</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.Object</type>
</attribute>
=======
>>>>>>> 241d65c954b0d5e7ca03a2c1cb32207603dceec9
<dynamic-attributes>true</dynamic-attributes>
</tag>
<tag>
...
...
@@ -308,8 +205,6 @@
<tag-class>org.unidal.webres.taglib.basic.ImageTagHandler</tag-class>
<body-content>JSP</body-content>
<attribute>
<<<<<<< HEAD
=======
<description><![CDATA[The value for image, could be a expression or a image path.]]></description>
<name>value</name>
<required>true</required>
...
...
@@ -317,7 +212,6 @@
<type>java.lang.Object</type>
</attribute>
<attribute>
>>>>>>> 241d65c954b0d5e7ca03a2c1cb32207603dceec9
<description><![CDATA[Identify whether the image URL is secure or not.]]></description>
<name>secure</name>
<required>false</required>
...
...
@@ -338,16 +232,6 @@
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<<<<<<< HEAD
<attribute>
<description><![CDATA[The value for image, could be a expression or a image path.]]></description>
<name>value</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.Object</type>
</attribute>
=======
>>>>>>> 241d65c954b0d5e7ca03a2c1cb32207603dceec9
<dynamic-attributes>true</dynamic-attributes>
</tag>
<tag>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录