Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
72ddb488
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,发现更多精彩内容 >>
提交
72ddb488
编写于
5月 28, 2013
作者:
Y
yong.you
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify the top anlyzer
上级
41246f3f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
21 addition
and
17 deletion
+21
-17
cat-consumer/src/main/java/com/dianping/cat/consumer/core/TopAnalyzer.java
...main/java/com/dianping/cat/consumer/core/TopAnalyzer.java
+21
-17
未找到文件。
cat-consumer/src/main/java/com/dianping/cat/consumer/core/TopAnalyzer.java
浏览文件 @
72ddb488
...
...
@@ -66,9 +66,11 @@ public class TopAnalyzer extends AbstractMessageAnalyzer<TopReport> implements L
topReport
.
setEndTime
(
new
Date
(
m_startTime
+
60
*
MINUTE
-
1
));
for
(
String
temp
:
domains
)
{
TransactionReport
report
=
m_transactionAnalyzer
.
getReport
(
temp
);
if
(!
temp
.
equals
(
"FrontEnd"
))
{
TransactionReport
report
=
m_transactionAnalyzer
.
getReport
(
temp
);
new
TransactionReportVisitor
(
topReport
).
visitTransactionReport
(
report
);
new
TransactionReportVisitor
(
topReport
).
visitTransactionReport
(
report
);
}
}
for
(
String
temp
:
domains
)
{
...
...
@@ -165,8 +167,8 @@ public class TopAnalyzer extends AbstractMessageAnalyzer<TopReport> implements L
int
minute
=
range2
.
getValue
();
long
count
=
range2
.
getCount
();
double
sum
=
range2
.
getSum
();
com
.
dianping
.
cat
.
consumer
.
top
.
model
.
entity
.
Segment
detail
=
m_report
.
findOrCreateDomain
(
m_domain
)
.
findOrCreateSegment
(
minute
);
com
.
dianping
.
cat
.
consumer
.
top
.
model
.
entity
.
Segment
detail
=
m_report
.
findOrCreateDomain
(
m_domain
)
.
findOrCreateSegment
(
minute
);
Range2Function
function
=
Range2Function
.
getByName
(
m_type
);
if
(
function
!=
null
)
{
...
...
@@ -189,7 +191,7 @@ public class TopAnalyzer extends AbstractMessageAnalyzer<TopReport> implements L
detail
.
setUrl
(
count
+
detail
.
getUrl
());
detail
.
setUrlSum
(
sum
+
detail
.
getUrlSum
());
detail
.
setUrlError
(
errorCount
+
detail
.
getUrlError
());
detail
.
setUrlError
(
errorCount
+
detail
.
getUrlError
());
detail
.
setUrlDuration
(
detail
.
getUrlSum
()
/
detail
.
getUrl
());
}
},
...
...
@@ -200,10 +202,10 @@ public class TopAnalyzer extends AbstractMessageAnalyzer<TopReport> implements L
long
count
=
range2
.
getCount
();
long
errorCount
=
range2
.
getFails
();
double
sum
=
range2
.
getSum
();
detail
.
setService
(
count
+
detail
.
getService
());
detail
.
setServiceSum
(
sum
+
detail
.
getServiceSum
());
detail
.
setServiceError
(
errorCount
+
detail
.
getServiceError
());
detail
.
setServiceError
(
errorCount
+
detail
.
getServiceError
());
detail
.
setServiceDuration
(
detail
.
getServiceSum
()
/
detail
.
getService
());
}
},
...
...
@@ -214,9 +216,9 @@ public class TopAnalyzer extends AbstractMessageAnalyzer<TopReport> implements L
long
count
=
range2
.
getCount
();
long
errorCount
=
range2
.
getFails
();
double
sum
=
range2
.
getSum
();
detail
.
setService
(
count
+
detail
.
getService
());
detail
.
setServiceError
(
errorCount
+
detail
.
getServiceError
());
detail
.
setServiceError
(
errorCount
+
detail
.
getServiceError
());
detail
.
setServiceSum
(
sum
+
detail
.
getServiceSum
());
detail
.
setServiceDuration
(
detail
.
getServiceSum
()
/
detail
.
getService
());
}
...
...
@@ -228,9 +230,9 @@ public class TopAnalyzer extends AbstractMessageAnalyzer<TopReport> implements L
long
count
=
range2
.
getCount
();
long
errorCount
=
range2
.
getFails
();
double
sum
=
range2
.
getSum
();
detail
.
setCall
(
count
+
detail
.
getCall
());
detail
.
setCallError
(
errorCount
+
detail
.
getCallError
());
detail
.
setCallError
(
errorCount
+
detail
.
getCallError
());
detail
.
setCallSum
(
sum
+
detail
.
getCallSum
());
detail
.
setCallDuration
(
detail
.
getCallSum
()
/
detail
.
getCall
());
...
...
@@ -243,9 +245,9 @@ public class TopAnalyzer extends AbstractMessageAnalyzer<TopReport> implements L
long
count
=
range2
.
getCount
();
long
errorCount
=
range2
.
getFails
();
double
sum
=
range2
.
getSum
();
detail
.
setCall
(
count
+
detail
.
getCall
());
detail
.
setCallError
(
errorCount
+
detail
.
getCallError
());
detail
.
setCallError
(
errorCount
+
detail
.
getCallError
());
detail
.
setCallSum
(
sum
+
detail
.
getCallSum
());
detail
.
setCallDuration
(
detail
.
getCallSum
()
/
detail
.
getCall
());
}
...
...
@@ -257,9 +259,9 @@ public class TopAnalyzer extends AbstractMessageAnalyzer<TopReport> implements L
long
count
=
range2
.
getCount
();
long
errorCount
=
range2
.
getFails
();
double
sum
=
range2
.
getSum
();
detail
.
setSql
(
count
+
detail
.
getSql
());
detail
.
setSqlError
(
errorCount
+
detail
.
getSqlError
());
detail
.
setSqlError
(
errorCount
+
detail
.
getSqlError
());
detail
.
setSqlSum
(
sum
+
detail
.
getSqlSum
());
detail
.
setSqlDuration
(
detail
.
getSqlSum
()
/
detail
.
getSql
());
}
...
...
@@ -310,10 +312,12 @@ public class TopAnalyzer extends AbstractMessageAnalyzer<TopReport> implements L
int
count
=
segment
.
getCount
();
if
(
"error"
.
equals
(
m_type
))
{
com
.
dianping
.
cat
.
consumer
.
top
.
model
.
entity
.
Segment
temp
=
m_report
.
findOrCreateDomain
(
m_domain
).
findOrCreateSegment
(
id
);
com
.
dianping
.
cat
.
consumer
.
top
.
model
.
entity
.
Segment
temp
=
m_report
.
findOrCreateDomain
(
m_domain
)
.
findOrCreateSegment
(
id
);
temp
.
setError
(
temp
.
getError
()
+
count
);
}
else
if
(
"call"
.
equals
(
m_type
))
{
com
.
dianping
.
cat
.
consumer
.
top
.
model
.
entity
.
Segment
temp
=
m_report
.
findOrCreateDomain
(
m_domain
).
findOrCreateSegment
(
id
);
com
.
dianping
.
cat
.
consumer
.
top
.
model
.
entity
.
Segment
temp
=
m_report
.
findOrCreateDomain
(
m_domain
)
.
findOrCreateSegment
(
id
);
temp
.
setCallError
(
temp
.
getCallError
()
+
count
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录