Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
058142c1
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,发现更多精彩内容 >>
提交
058142c1
编写于
8月 27, 2013
作者:
G
gaocogn
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reset score
上级
576e6344
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
43 addition
and
9 deletion
+43
-9
cat
cat
+1
-0
cat-home/src/main/java/com/dianping/cat/report/page/bug/Handler.java
...c/main/java/com/dianping/cat/report/page/bug/Handler.java
+36
-2
cat-home/src/main/java/com/dianping/cat/report/service/impl/BugReportService.java
...om/dianping/cat/report/service/impl/BugReportService.java
+0
-1
cat-home/src/main/resources/META-INF/dal/model/utilization-report-model.xml
...resources/META-INF/dal/model/utilization-report-model.xml
+2
-2
cat-home/src/main/webapp/jsp/report/utilization/detail.jsp
cat-home/src/main/webapp/jsp/report/utilization/detail.jsp
+2
-2
cat-home/src/main/webapp/jsp/report/utilization/utilizationHistory.jsp
...main/webapp/jsp/report/utilization/utilizationHistory.jsp
+2
-2
未找到文件。
cat
@
dbcbe7e1
Subproject commit dbcbe7e175f7bec0b0d123cdd75f3281bf444794
cat-home/src/main/java/com/dianping/cat/report/page/bug/Handler.java
浏览文件 @
058142c1
...
...
@@ -165,12 +165,14 @@ public class Handler implements PageHandler<Context> {
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
)
if
(
d
.
getUrlCount
()
>
0
)
{
dUWebList
.
add
(
d
);
}
if
(
d
.
getServiceCount
()
>
0
)
dUServiceList
.
add
(
d
);
}
model
.
setUtilizationReport
(
utilizationReport
);
resetWebScore
(
dUWebList
,
findMaxWebScore
(
dUWebList
));
resetServiceScore
(
dUServiceList
,
findMaxServiceScore
(
dUServiceList
));
model
.
setUtilizationList
(
dUList
);
model
.
setUtilizationWebList
(
dUWebList
);
model
.
setUtilizationServiceList
(
dUServiceList
);
...
...
@@ -179,6 +181,38 @@ public class Handler implements PageHandler<Context> {
model
.
setPage
(
ReportPage
.
BUG
);
m_jspViewer
.
view
(
ctx
,
model
);
}
private
void
resetWebScore
(
List
<
com
.
dianping
.
cat
.
home
.
utilization
.
entity
.
Domain
>
l
,
double
maxScore
){
for
(
com
.
dianping
.
cat
.
home
.
utilization
.
entity
.
Domain
d
:
l
){
d
.
setWebScore
(
d
.
getWebScore
()
*
100.0
/
maxScore
);
}
}
private
void
resetServiceScore
(
List
<
com
.
dianping
.
cat
.
home
.
utilization
.
entity
.
Domain
>
l
,
double
maxScore
){
for
(
com
.
dianping
.
cat
.
home
.
utilization
.
entity
.
Domain
d
:
l
){
d
.
setServiceScore
(
d
.
getServiceScore
()
*
100.0
/
maxScore
);
}
}
private
double
findMaxWebScore
(
List
<
com
.
dianping
.
cat
.
home
.
utilization
.
entity
.
Domain
>
l
){
double
maxScore
=
0
;
for
(
com
.
dianping
.
cat
.
home
.
utilization
.
entity
.
Domain
d
:
l
){
if
(
d
.
getWebScore
()
>
maxScore
){
maxScore
=
d
.
getWebScore
();
}
}
return
maxScore
;
}
private
double
findMaxServiceScore
(
List
<
com
.
dianping
.
cat
.
home
.
utilization
.
entity
.
Domain
>
l
){
double
maxScore
=
0
;
for
(
com
.
dianping
.
cat
.
home
.
utilization
.
entity
.
Domain
d
:
l
){
if
(
d
.
getServiceScore
()
>
maxScore
){
maxScore
=
d
.
getServiceScore
();
}
}
return
maxScore
;
}
private
boolean
isBug
(
String
domain
,
String
exception
)
{
Set
<
String
>
bugConfig
=
m_bugConfigManager
.
queryBugConfigsByDomain
(
domain
);
...
...
cat-home/src/main/java/com/dianping/cat/report/service/impl/BugReportService.java
浏览文件 @
058142c1
...
...
@@ -91,7 +91,6 @@ 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
,
...
...
cat-home/src/main/resources/META-INF/dal/model/utilization-report-model.xml
浏览文件 @
058142c1
...
...
@@ -18,7 +18,7 @@
<attribute
name=
"pigeon-call-count"
value-type=
"long"
primitive=
"true"
/>
<attribute
name=
"swallow-call-count"
value-type=
"long"
primitive=
"true"
/>
<attribute
name=
"memcache-count"
value-type=
"long"
primitive=
"true"
/>
<attribute
name=
"web-score"
value-type=
"
long
"
primitive=
"true"
/>
<attribute
name=
"service-score"
value-type=
"
long
"
primitive=
"true"
/>
<attribute
name=
"web-score"
value-type=
"
double
"
primitive=
"true"
/>
<attribute
name=
"service-score"
value-type=
"
double
"
primitive=
"true"
/>
</entity>
</model>
cat-home/src/main/webapp/jsp/report/utilization/detail.jsp
浏览文件 @
058142c1
...
...
@@ -39,7 +39,7 @@
<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>
<td
style=
"text-align:right"
>
${w:format(item.webScore,'
0.0
0')}
</td>
</tr>
</c:forEach>
</table>
...
...
@@ -74,7 +74,7 @@
<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>
<td
style=
"text-align:right"
>
${w:format(item.serviceScore,'
0.0
0')}
</td>
</tr>
</c:forEach>
</table>
...
...
cat-home/src/main/webapp/jsp/report/utilization/utilizationHistory.jsp
浏览文件 @
058142c1
...
...
@@ -80,7 +80,7 @@
<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>
<td
style=
"text-align:right"
>
${w:format(item.webScore,'
0.0
0')}
</td>
</tr>
</c:forEach>
</table>
...
...
@@ -115,7 +115,7 @@
<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>
<td
style=
"text-align:right"
>
${w:format(item.serviceScore,'
0.0
0')}
</td>
</tr>
</c:forEach>
</table>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录