Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
ab3de0c4
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,发现更多精彩内容 >>
提交
ab3de0c4
编写于
2月 02, 2012
作者:
S
sean.wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add domain links
上级
8733acd9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
45 addition
and
24 deletion
+45
-24
cat-consumer/src/main/java/com/dianping/cat/consumer/transaction/TransactionReportAnalyzer.java
...g/cat/consumer/transaction/TransactionReportAnalyzer.java
+9
-5
cat-consumer/src/main/resources/META-INF/dal/model/transaction-report-codegen.xml
...sources/META-INF/dal/model/transaction-report-codegen.xml
+1
-0
cat-home/src/main/webapp/js/transaction.js
cat-home/src/main/webapp/js/transaction.js
+4
-1
cat-home/src/main/webapp/jsp/report/transaction.jsp
cat-home/src/main/webapp/jsp/report/transaction.jsp
+31
-18
未找到文件。
cat-consumer/src/main/java/com/dianping/cat/consumer/transaction/TransactionReportAnalyzer.java
浏览文件 @
ab3de0c4
...
...
@@ -59,9 +59,8 @@ public class TransactionReportAnalyzer extends AbstractMessageAnalyzer<Transacti
if
(
report
==
null
)
{
return
report
;
}
Collection
<
TransactionType
>
types
=
report
.
getTypes
().
values
();
for
(
TransactionType
type
:
types
)
{
for
(
TransactionType
type
:
report
.
getTypes
().
values
()
)
{
long
typeCount
=
0
;
long
typeFailCount
=
0
;
double
typeSum
=
0
;
...
...
@@ -119,10 +118,15 @@ public class TransactionReportAnalyzer extends AbstractMessageAnalyzer<Transacti
@Override
public
TransactionReport
generate
(
String
domain
)
{
if
(
domain
==
null
)
{
domain
=
(
String
)
this
.
m_reports
.
keySet
().
toArray
()[
0
];
ArrayList
<
String
>
domains
=
new
ArrayList
<
String
>(
this
.
m_reports
.
keySet
());
if
(
domain
==
null
)
{
domain
=
domains
.
get
(
0
);
}
return
computeMeanSquareDeviation
(
domain
);
TransactionReport
report
=
computeMeanSquareDeviation
(
domain
);
for
(
String
ele
:
domains
)
{
report
.
addDomain
(
ele
);
}
return
report
;
}
private
String
getTransactionFileName
(
TransactionReport
report
)
{
...
...
cat-consumer/src/main/resources/META-INF/dal/model/transaction-report-codegen.xml
浏览文件 @
ab3de0c4
...
...
@@ -2,6 +2,7 @@
<model>
<entity
name=
"transaction-report"
root=
"true"
>
<attribute
name=
"domain"
value-type=
"String"
/>
<element
name=
"domain"
value-type=
"String"
type=
"set"
/>
<attribute
name=
"startTime"
value-type=
"Date"
format=
"yyyy-MM-dd HH:mm:ss"
/>
<attribute
name=
"endTime"
value-type=
"Date"
format=
"yyyy-MM-dd HH:mm:ss"
/>
<entity-ref
name=
"type"
type=
"list"
names=
"types"
/>
...
...
cat-home/src/main/webapp/js/transaction.js
浏览文件 @
ab3de0c4
...
...
@@ -11,7 +11,10 @@ $(function(){
);
$
(
function
()
{
{
domainlinks
=
'
Domains
'
;
$
.
each
(
data
.
domainSet
,
function
(
i
,
t
){
domainlinks
+=
"
[ <a href=
\"
/cat/r/t?domain=
"
+
t
+
"
\"
>
"
+
t
+
"
</a> ]
"
});
$
(
"
#domainlist
"
).
html
(
domainlinks
);
$
(
"
#gridTable
"
).
jqGrid
({
datatype
:
"
local
"
,
colNames
:[
'
Type
'
,
'
Total Count
'
,
'
Fail Count
'
,
'
Failure%
'
,
'
Sample Link
'
,
'
Min/Max/Avg/Std(ms)
'
],
...
...
cat-home/src/main/webapp/jsp/report/transaction.jsp
浏览文件 @
ab3de0c4
<%@ page
contentType=
"text/html; charset=utf-8"
%>
<%@ page
contentType=
"text/html; charset=utf-8"
%>
<%@ taglib
prefix=
"a"
uri=
"/WEB-INF/app.tld"
%>
<%@ taglib
prefix=
"res"
uri=
"http://www.ebay.com/webres"
%>
<jsp:useBean
id=
"ctx"
type=
"com.dianping.cat.report.page.transaction.Context"
scope=
"request"
/>
<jsp:useBean
id=
"payload"
type=
"com.dianping.cat.report.page.transaction.Payload"
scope=
"request"
/>
<jsp:useBean
id=
"model"
type=
"com.dianping.cat.report.page.transaction.Model"
scope=
"request"
/>
<jsp:useBean
id=
"ctx"
type=
"com.dianping.cat.report.page.transaction.Context"
scope=
"request"
/>
<jsp:useBean
id=
"payload"
type=
"com.dianping.cat.report.page.transaction.Payload"
scope=
"request"
/>
<jsp:useBean
id=
"model"
type=
"com.dianping.cat.report.page.transaction.Model"
scope=
"request"
/>
<a:body>
<res:useCss
value=
'
${
res
.
css
.
local
.
default_css
}
'
target=
"head-css"
/>
<res:useCss
value=
'
${
res
.
css
.
local
.
jquery_css
}
'
target=
"head-css"
/>
<res:useCss
value=
'
${
res
.
css
.
local
.
jqgrid_css
}
'
target=
"head-css"
/>
<res:useCss
value=
'
${
res
.
css
.
local
.
default_css
}
'
target=
"head-css"
/>
<res:useCss
value=
'
${
res
.
css
.
local
.
jquery_css
}
'
target=
"head-css"
/>
<res:useCss
value=
'
${
res
.
css
.
local
.
jqgrid_css
}
'
target=
"head-css"
/>
<res:useJs
value=
'
${
res
.
js
.
local
.
jquery_min_js
}
'
target=
"head-js"
/>
<res:useJs
value=
'
${
res
.
js
.
local
.
jquery_ui_min_js
}
'
target=
"head-js"
/>
<res:useJs
value=
'
${
res
.
js
.
local
.
grid_js
}
'
target=
"head-js"
/>
<res:useJs
value=
'
${
res
.
js
.
local
.
jqgrid_min_js
}
'
target=
"head-js"
/>
<res:useJs
value=
'
${
res
.
js
.
local
.
jquery_min_js
}
'
target=
"head-js"
/>
<res:useJs
value=
'
${
res
.
js
.
local
.
jquery_ui_min_js
}
'
target=
"head-js"
/>
<res:useJs
value=
'
${
res
.
js
.
local
.
grid_js
}
'
target=
"head-js"
/>
<res:useJs
value=
'
${
res
.
js
.
local
.
jqgrid_min_js
}
'
target=
"head-js"
/>
<script
type=
"text/javascript"
>
var
data
=
$
{
model
.
reportInJson
};
</script>
<script
type=
"text/javascript"
>
var
data
=
$
{
model
.
reportInJson
};
</script>
<table
width=
"100%"
border=
"0"
cellpadding=
"6"
cellspacing=
"0"
class=
"navbar"
>
<tbody>
<tr>
<td
id=
"domainlist"
nowrap=
"nowrap"
align=
"left"
class=
"seealso"
>
</td>
</tr>
</tbody>
</table>
<table
id=
"gridTable"
></table>
<div
id=
"gridPager"
></div>
<table
id=
"gridTable"
></table>
<div
id=
"gridPager"
></div>
<res:useJs
value=
"
${
res
.
js
.
local
.
transaction_js
}
"
target=
"bottom-js"
/>
<res:useJs
value=
"
${
res
.
js
.
local
.
transaction_js
}
"
target=
"bottom-js"
/>
</a:body>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录