Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
23276035
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,发现更多精彩内容 >>
提交
23276035
编写于
6月 20, 2012
作者:
F
Frankie Wu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
ssh://192.168.8.22:58422/cat
上级
2e3eb172
4d1a4de5
变更
54
展开全部
隐藏空白更改
内联
并排
Showing
54 changed file
with
2559 addition
and
1283 deletion
+2559
-1283
cat-consumer/pom.xml
cat-consumer/pom.xml
+1
-1
cat-consumer/src/test/java/com/dianping/cat/consumer/AllTests.java
...mer/src/test/java/com/dianping/cat/consumer/AllTests.java
+16
-3
cat-consumer/src/test/java/com/dianping/cat/consumer/ManyAnalyzerTest.java
...test/java/com/dianping/cat/consumer/ManyAnalyzerTest.java
+18
-12
cat-consumer/src/test/java/com/dianping/cat/consumer/ManyAnalyzerTestConfigurator.java
...m/dianping/cat/consumer/ManyAnalyzerTestConfigurator.java
+1
-3
cat-consumer/src/test/java/com/dianping/cat/consumer/OneAnalyzerTwoDurationTest.java
...com/dianping/cat/consumer/OneAnalyzerTwoDurationTest.java
+19
-11
cat-consumer/src/test/java/com/dianping/cat/consumer/transaction/TransactionAnalyzerTest.java
...ing/cat/consumer/transaction/TransactionAnalyzerTest.java
+5
-1
cat-consumer/src/test/resources/com/dianping/cat/consumer/transaction/TransactionAnalyzerTest.json
...ing/cat/consumer/transaction/TransactionAnalyzerTest.json
+362
-329
cat-consumer/src/test/resources/com/dianping/cat/consumer/transaction/TransactionReport.json
.../dianping/cat/consumer/transaction/TransactionReport.json
+82
-190
cat-consumer/src/test/resources/com/dianping/cat/consumer/transaction/TransactionReport.xml
...m/dianping/cat/consumer/transaction/TransactionReport.xml
+20
-45
cat-core/pom.xml
cat-core/pom.xml
+1
-1
cat-hadoop/pom.xml
cat-hadoop/pom.xml
+1
-1
cat-hadoop/src/main/resources/META-INF/dal/jdbc/dal.xml
cat-hadoop/src/main/resources/META-INF/dal/jdbc/dal.xml
+42
-1
cat-home/pom.xml
cat-home/pom.xml
+1
-1
cat-home/src/main/java/com/dianping/cat/report/page/dashboard/Handler.java
.../java/com/dianping/cat/report/page/dashboard/Handler.java
+31
-10
cat-home/src/main/java/com/dianping/cat/report/page/heartbeat/Action.java
...n/java/com/dianping/cat/report/page/heartbeat/Action.java
+1
-1
cat-home/src/main/java/com/dianping/cat/report/page/heartbeat/DisplayHeartbeat.java
.../dianping/cat/report/page/heartbeat/DisplayHeartbeat.java
+0
-23
cat-home/src/main/java/com/dianping/cat/report/page/heartbeat/Handler.java
.../java/com/dianping/cat/report/page/heartbeat/Handler.java
+272
-17
cat-home/src/main/java/com/dianping/cat/report/page/heartbeat/JspFile.java
.../java/com/dianping/cat/report/page/heartbeat/JspFile.java
+2
-0
cat-home/src/main/java/com/dianping/cat/report/page/heartbeat/JspViewer.java
...ava/com/dianping/cat/report/page/heartbeat/JspViewer.java
+3
-0
cat-home/src/main/java/com/dianping/cat/report/page/heartbeat/Model.java
...in/java/com/dianping/cat/report/page/heartbeat/Model.java
+21
-0
cat-home/src/main/java/com/dianping/cat/report/page/heartbeat/Test.java
...ain/java/com/dianping/cat/report/page/heartbeat/Test.java
+17
-0
cat-home/src/main/java/com/dianping/cat/report/page/problem/Handler.java
...in/java/com/dianping/cat/report/page/problem/Handler.java
+0
-1
cat-home/src/main/java/com/dianping/cat/report/page/transaction/Handler.java
...ava/com/dianping/cat/report/page/transaction/Handler.java
+8
-3
cat-home/src/main/java/com/dianping/cat/report/page/transaction/Model.java
.../java/com/dianping/cat/report/page/transaction/Model.java
+10
-1
cat-home/src/main/resources/META-INF/plexus/components.xml
cat-home/src/main/resources/META-INF/plexus/components.xml
+3
-0
cat-home/src/main/webapp/WEB-INF/tags/body.tag
cat-home/src/main/webapp/WEB-INF/tags/body.tag
+1
-1
cat-home/src/main/webapp/WEB-INF/tags/historyReport.tag
cat-home/src/main/webapp/WEB-INF/tags/historyReport.tag
+5
-5
cat-home/src/main/webapp/WEB-INF/webres.tld
cat-home/src/main/webapp/WEB-INF/webres.tld
+97
-97
cat-home/src/main/webapp/js/heartbeatHistory.js
cat-home/src/main/webapp/js/heartbeatHistory.js
+95
-0
cat-home/src/main/webapp/js/problemHistory.js
cat-home/src/main/webapp/js/problemHistory.js
+3
-10
cat-home/src/main/webapp/js/transaction.js
cat-home/src/main/webapp/js/transaction.js
+3
-0
cat-home/src/main/webapp/js/trend.js
cat-home/src/main/webapp/js/trend.js
+0
-143
cat-home/src/main/webapp/js/trendGraph.js
cat-home/src/main/webapp/js/trendGraph.js
+6
-7
cat-home/src/main/webapp/jsp/report/heartbeat.jsp
cat-home/src/main/webapp/jsp/report/heartbeat.jsp
+5
-10
cat-home/src/main/webapp/jsp/report/heartbeatHistoryGraph.jsp
...home/src/main/webapp/jsp/report/heartbeatHistoryGraph.jsp
+161
-0
cat-home/src/main/webapp/jsp/report/transactionHistoryGraphs.jsp
...e/src/main/webapp/jsp/report/transactionHistoryGraphs.jsp
+5
-0
cat-home/src/test/java/com/dianping/cat/AllTests.java
cat-home/src/test/java/com/dianping/cat/AllTests.java
+21
-2
cat-home/src/test/java/com/dianping/cat/report/page/heartbeat/HeartbeatGraphTest.java
...ianping/cat/report/page/heartbeat/HeartbeatGraphTest.java
+69
-0
cat-home/src/test/java/com/dianping/cat/report/page/model/TransactionReportFilterTest.java
...ng/cat/report/page/model/TransactionReportFilterTest.java
+1
-1
cat-home/src/test/java/com/dianping/cat/report/page/sql/TestComputeStr.java
...java/com/dianping/cat/report/page/sql/TestComputeStr.java
+7
-6
cat-home/src/test/java/com/dianping/cat/report/page/transaction/GraphDateTest.java
...m/dianping/cat/report/page/transaction/GraphDateTest.java
+104
-95
cat-home/src/test/java/com/dianping/cat/report/page/transaction/PayloadTest.java
...com/dianping/cat/report/page/transaction/PayloadTest.java
+5
-5
cat-home/src/test/java/com/dianping/cat/report/page/transaction/TransactionReportMergerTest.java
.../report/page/transaction/TransactionReportMergerTest.java
+1
-0
cat-home/src/test/resources/com/dianping/cat/report/page/heartbeat/detail
...t/resources/com/dianping/cat/report/page/heartbeat/detail
+16
-0
cat-home/src/test/resources/com/dianping/cat/report/page/model/event-name.xml
...sources/com/dianping/cat/report/page/model/event-name.xml
+15
-15
cat-home/src/test/resources/com/dianping/cat/report/page/model/event-type.xml
...sources/com/dianping/cat/report/page/model/event-type.xml
+33
-10
cat-home/src/test/resources/com/dianping/cat/report/page/model/event.xml
...st/resources/com/dianping/cat/report/page/model/event.xml
+248
-44
cat-home/src/test/resources/com/dianping/cat/report/page/model/event/event.xml
...ources/com/dianping/cat/report/page/model/event/event.xml
+56
-50
cat-home/src/test/resources/com/dianping/cat/report/page/model/transaction-name.xml
...s/com/dianping/cat/report/page/model/transaction-name.xml
+35
-15
cat-home/src/test/resources/com/dianping/cat/report/page/model/transaction-type.xml
...s/com/dianping/cat/report/page/model/transaction-type.xml
+33
-10
cat-home/src/test/resources/com/dianping/cat/report/page/model/transaction.xml
...ources/com/dianping/cat/report/page/model/transaction.xml
+541
-50
cat-home/src/test/resources/com/dianping/cat/report/page/model/transaction/transaction.xml
...ianping/cat/report/page/model/transaction/transaction.xml
+54
-50
cat-job/pom.xml
cat-job/pom.xml
+1
-1
pom.xml
pom.xml
+1
-1
未找到文件。
cat-consumer/pom.xml
浏览文件 @
23276035
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.
2.5
</version>
<version>
0.
3.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-consumer
</artifactId>
...
...
cat-consumer/src/test/java/com/dianping/cat/consumer/AllTests.java
浏览文件 @
23276035
...
...
@@ -5,7 +5,11 @@ import org.junit.runners.Suite;
import
org.junit.runners.Suite.SuiteClasses
;
import
com.dianping.cat.consumer.ip.IpReportTest
;
import
com.dianping.cat.consumer.problem.model.ProblemReportTest
;
import
com.dianping.cat.consumer.transaction.FormatTest
;
import
com.dianping.cat.consumer.transaction.GsonTest
;
import
com.dianping.cat.consumer.transaction.NumberFormatTest
;
import
com.dianping.cat.consumer.transaction.TransactionAnalyzerTest
;
import
com.dianping.cat.consumer.transaction.TransactionReportMessageAnalyzerTest
;
import
com.dianping.cat.consumer.transaction.TransactionReportTest
;
...
...
@@ -15,12 +19,21 @@ import com.dianping.cat.consumer.transaction.TransactionReportTest;
/* .ip */
IpReportTest
.
class
,
/* .transaction */
NumberFormatTest
.
class
,
TransactionAnalyzerTest
.
class
,
TransactionReportMessageAnalyzerTest
.
class
,
TransactionReportTest
.
class
TransactionReportTest
.
class
,
ManyAnalyzerTest
.
class
,
OneAnalyzerTwoDurationTest
.
class
,
ProblemReportTest
.
class
,
FormatTest
.
class
,
GsonTest
.
class
,
NumberFormatTest
.
class
})
public
class
AllTests
{
...
...
cat-consumer/src/test/java/com/dianping/cat/consumer/ManyAnalyzerTest.java
浏览文件 @
23276035
...
...
@@ -27,13 +27,14 @@ public class ManyAnalyzerTest extends ComponentTestCase {
public
void
test
()
throws
Exception
{
MessageConsumer
consumer
=
lookup
(
MessageConsumer
.
class
,
"mockManyAnalyzers"
);
Thread
.
sleep
(
1000
);
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
DefaultMessageTree
tree
=
new
DefaultMessageTree
();
tree
.
setMessage
(
new
MockMessage
());
consumer
.
consume
(
tree
);
}
Thread
.
sleep
(
1000
*
2
);
Thread
.
sleep
(
1000
);
Assert
.
assertEquals
(
100
,
s_count1
);
Assert
.
assertEquals
(
200
,
s_count2
);
...
...
@@ -57,9 +58,9 @@ public class ManyAnalyzerTest extends ComponentTestCase {
}
@Override
public
Set
<
String
>
getDomains
()
{
return
null
;
}
public
Set
<
String
>
getDomains
()
{
return
null
;
}
}
public
static
class
MockAnalyzer2
extends
AbstractMessageAnalyzer
<
AnalyzerResult
>
{
...
...
@@ -79,9 +80,9 @@ public class ManyAnalyzerTest extends ComponentTestCase {
}
@Override
public
Set
<
String
>
getDomains
()
{
return
null
;
}
public
Set
<
String
>
getDomains
()
{
return
null
;
}
}
public
static
class
MockAnalyzer3
extends
AbstractMessageAnalyzer
<
AnalyzerResult
>
{
...
...
@@ -101,9 +102,9 @@ public class ManyAnalyzerTest extends ComponentTestCase {
}
@Override
public
Set
<
String
>
getDomains
()
{
return
null
;
}
public
Set
<
String
>
getDomains
()
{
return
null
;
}
}
public
static
class
AnalyzerResult
{
...
...
@@ -113,16 +114,21 @@ public class ManyAnalyzerTest extends ComponentTestCase {
static
class
MockMessage
extends
AbstractMessage
{
public
MockMessage
()
{
super
(
null
,
null
);
setTimestamp
(
getTimestamp
());
}
@Override
public
long
getTimestamp
()
{
return
System
.
currentTimeMillis
()
-
10
*
1000
;
return
System
.
currentTimeMillis
();
}
@Override
public
void
complete
()
{
}
@Override
public
String
toString
()
{
return
"MockMessage"
;
}
}
}
cat-consumer/src/test/java/com/dianping/cat/consumer/ManyAnalyzerTestConfigurator.java
浏览文件 @
23276035
...
...
@@ -4,8 +4,6 @@ import java.io.File;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.dianping.cat.consumer.AnalyzerFactory
;
import
com.dianping.cat.consumer.RealtimeConsumer
;
import
com.dianping.cat.consumer.ManyAnalyzerTest.MockAnalyzer1
;
import
com.dianping.cat.consumer.ManyAnalyzerTest.MockAnalyzer2
;
import
com.dianping.cat.consumer.ManyAnalyzerTest.MockAnalyzer3
;
...
...
@@ -28,7 +26,7 @@ public class ManyAnalyzerTestConfigurator extends
.
req
(
AnalyzerFactory
.
class
)
//
.
config
(
E
(
"analyzers"
).
value
(
"mock1,mock2,mock3"
)
//
));
all
.
add
(
C
(
MessageAnalyzer
.
class
,
"mock1"
,
MockAnalyzer1
.
class
)
//
.
is
(
PER_LOOKUP
));
all
.
add
(
C
(
MessageAnalyzer
.
class
,
"mock2"
,
MockAnalyzer2
.
class
)
//
...
...
cat-consumer/src/test/java/com/dianping/cat/consumer/OneAnalyzerTwoDurationTest.java
浏览文件 @
23276035
...
...
@@ -32,6 +32,8 @@ public class OneAnalyzerTwoDurationTest extends ComponentTestCase {
@Test
public
void
test
()
throws
Exception
{
MessageConsumer
consumer
=
lookup
(
MessageConsumer
.
class
,
"mock"
);
Thread
.
sleep
(
1000
);
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
DefaultMessageTree
tree
=
new
DefaultMessageTree
();
tree
.
setMessage
(
new
MockMessage
(-
1
));
...
...
@@ -44,10 +46,10 @@ public class OneAnalyzerTwoDurationTest extends ComponentTestCase {
consumer
.
consume
(
tree
);
}
Thread
.
sleep
(
1000
*
2
);
Assert
.
assertEquals
(
10
0
,
s_count1
);
Assert
.
assertEquals
(
2
00
,
s_count2
);
Assert
.
assertEquals
(
2
,
s_period
);
Thread
.
sleep
(
1000
);
Assert
.
assertEquals
(
0
,
s_count1
);
Assert
.
assertEquals
(
4
00
,
s_count2
);
Assert
.
assertEquals
(
1
,
s_period
);
}
public
static
class
MockAnalyzer
extends
AbstractMessageAnalyzer
<
AnalyzerResult
>
{
...
...
@@ -76,9 +78,9 @@ public class OneAnalyzerTwoDurationTest extends ComponentTestCase {
}
@Override
public
Set
<
String
>
getDomains
()
{
return
null
;
}
public
Set
<
String
>
getDomains
()
{
return
null
;
}
}
public
static
class
AnalyzerResult
{
...
...
@@ -86,17 +88,23 @@ public class OneAnalyzerTwoDurationTest extends ComponentTestCase {
}
static
class
MockMessage
extends
AbstractMessage
{
private
int
type
;
private
int
m_
type
;
public
MockMessage
(
int
type
)
{
super
(
null
,
null
);
this
.
type
=
type
;
m_type
=
type
;
setTimestamp
(
getTimestamp
());
}
public
int
getIntType
()
{
return
m_type
;
}
@Override
public
long
getTimestamp
()
{
if
(
type
==
-
1
)
return
System
.
currentTimeMillis
()
-
60
*
60
*
1000
;
// if (m_type == -1) {
// return System.currentTimeMillis() - 60 * 60 * 1000;
// }
return
System
.
currentTimeMillis
();
}
...
...
cat-consumer/src/test/java/com/dianping/cat/consumer/transaction/TransactionAnalyzerTest.java
浏览文件 @
23276035
...
...
@@ -17,8 +17,11 @@ import com.site.lookup.ComponentTestCase;
@RunWith
(
JUnit4
.
class
)
public
class
TransactionAnalyzerTest
extends
ComponentTestCase
{
private
long
timestamp
;
@Test
public
void
testProcessTransaction
()
throws
Exception
{
timestamp
=
System
.
currentTimeMillis
()
-
System
.
currentTimeMillis
()
%
(
3600
*
1000
);
TransactionAnalyzer
analyzer
=
lookup
(
TransactionAnalyzer
.
class
);
TransactionReport
report
=
new
TransactionReport
(
"Test"
);
...
...
@@ -46,7 +49,8 @@ public class TransactionAnalyzerTest extends ComponentTestCase {
t
.
complete
();
t
.
setDurationInMillis
(
i
*
2
);
t
.
setTimestamp
(
timestamp
+
1000
);
t2
.
setTimestamp
(
timestamp
+
2000
);
tree
.
setMessage
(
t
);
analyzer
.
processTransaction
(
report
,
tree
,
t
);
...
...
cat-consumer/src/test/resources/com/dianping/cat/consumer/transaction/TransactionAnalyzerTest.json
浏览文件 @
23276035
此差异已折叠。
点击以展开。
cat-consumer/src/test/resources/com/dianping/cat/consumer/transaction/TransactionReport.json
浏览文件 @
23276035
{
"domain"
:
"Cat"
,
"startTime"
:
"2012-0
2-16 23
:00:00"
,
"endTime"
:
"2012-0
2-16 23:59:00
"
,
"startTime"
:
"2012-0
6-18 14
:00:00"
,
"endTime"
:
"2012-0
6-18 14:59:59
"
,
"domain-names"
:
[
"Cat"
],
"types"
:
{
"URL"
:
{
"id"
:
"URL"
,
"totalCount"
:
11
,
"failCount"
:
0
,
"failPercent"
:
"0.00"
,
"min"
:
0.0
,
"max"
:
194.0
,
"avg"
:
"47.1"
,
"sum"
:
"518.0"
,
"sum2"
:
"73942.0"
,
"std"
:
"67.1"
,
"successMessageUrl"
:
"20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html"
,
"names"
:
{
"home"
:
{
"id"
:
"home"
,
"totalCount"
:
1
,
"failCount"
:
0
,
"failPercent"
:
"0.00"
,
"min"
:
175.0
,
"max"
:
175.0
,
"avg"
:
"175.0"
,
"sum"
:
"175.0"
,
"sum2"
:
"30625.0"
,
"std"
:
"0.0"
,
"successMessageUrl"
:
"20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html"
,
"ranges"
:
[
{
"value"
:
5
,
"count"
:
123
,
"sum"
:
123456.0
,
"avg"
:
"22.2"
,
"fails"
:
3
},
{
"value"
:
10
,
"count"
:
123
,
"sum"
:
12457.0
,
"avg"
:
"222.0"
,
"fails"
:
3
}
],
"durations"
:
[
{
"value"
:
128
,
"count"
:
34
},
{
"value"
:
256
,
"count"
:
12
}
]
},
"service"
:
{
"id"
:
"service"
,
"totalCount"
:
8
,
"failCount"
:
0
,
"failPercent"
:
"0.00"
,
"min"
:
1.0
,
"max"
:
58.0
,
"avg"
:
"13.0"
,
"sum"
:
"104.0"
,
"sum2"
:
"3952.0"
,
"std"
:
"18.0"
,
"successMessageUrl"
:
"20120216/23/Cat/b10bdefb-1eca-45e1-a9c3-52367078b5a2.html"
,
"failMessageUrl"
:
"20120216/23/Cat/b10bdefb-1eca-45e1-a9c3-52367078b5a2.html"
},
"t"
:
{
"id"
:
"t"
,
"totalCount"
:
1
,
"failCount"
:
0
,
"failPercent"
:
"0.00"
,
"min"
:
193.0
,
"max"
:
193.0
,
"avg"
:
"193.0"
,
"sum"
:
"193.0"
,
"sum2"
:
"37249.0"
,
"std"
:
"0.0"
,
"successMessageUrl"
:
"20120216/23/Cat/8e7c91a0-7549-4b13-b43b-252b2a6ef4bb.html"
},
"ip"
:
{
"id"
:
"ip"
,
"ips"
:
[
"192.168.165.1"
],
"machines"
:
{
"192.168.165.1"
:
{
"ip"
:
"192.168.165.1"
,
"types"
:
{
"Task"
:
{
"id"
:
"Task"
,
"totalCount"
:
1
,
"failCount"
:
0
,
"failPercent"
:
"0.00"
,
"min"
:
46.0
,
"max"
:
46.0
,
"avg"
:
"
46.0
"
,
"sum"
:
"
46.0
"
,
"sum2"
:
"
2116.0
"
,
"min"
:
335.782
,
"max"
:
335.782
,
"avg"
:
"
335.8
"
,
"sum"
:
"
335.8
"
,
"sum2"
:
"
112749.6
"
,
"std"
:
"0.0"
,
"successMessageUrl"
:
"20120216/23/Cat/2029c32e-b692-4e43-8eaf-96b8d6c846a2.html"
}
}
},
"MVC"
:
{
"id"
:
"MVC"
,
"totalCount"
:
33
,
"failCount"
:
0
,
"failPercent"
:
"0.00"
,
"min"
:
0.0
,
"max"
:
191.0
,
"avg"
:
"15.1"
,
"sum"
:
"499.0"
,
"sum2"
:
"68377.0"
,
"std"
:
"42.9"
,
"successMessageUrl"
:
"20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html"
,
"names"
:
{
"InboundPhase"
:
{
"id"
:
"InboundPhase"
,
"totalCount"
:
11
,
"failCount"
:
0
,
"failPercent"
:
"0.00"
,
"min"
:
0.0
,
"max"
:
17.0
,
"avg"
:
"1.5"
,
"sum"
:
"17.0"
,
"sum2"
:
"289.0"
,
"std"
:
"4.9"
,
"successMessageUrl"
:
"20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html"
"tps"
:
"0.00"
,
"line95Value"
:
"335.00"
,
"line95Sum"
:
"335.00"
,
"line95Count"
:
1
},
"
TransitionPhase
"
:
{
"id"
:
"
TransitionPhase
"
,
"totalCount"
:
11
,
"
SQL
"
:
{
"id"
:
"
SQL
"
,
"totalCount"
:
7
,
"failCount"
:
0
,
"failPercent"
:
"0.00"
,
"min"
:
0.0
,
"max"
:
4.9E-324
,
"avg"
:
"0.0"
,
"sum"
:
"0.0"
,
"sum2"
:
"0.0"
,
"std"
:
"0.0"
,
"successMessageUrl"
:
"20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html"
"min"
:
54.405
,
"max"
:
1842.509
,
"avg"
:
"622.0"
,
"sum"
:
"4354.3"
,
"sum2"
:
"6512117.3"
,
"std"
:
"737.1"
,
"successMessageUrl"
:
"Cat-c0a8a501-1340002646868-0"
,
"tps"
:
"0.00"
,
"line95Value"
:
"1842.00"
,
"line95Sum"
:
"1842.00"
,
"line95Count"
:
1
},
"OutboundPhase"
:
{
"id"
:
"OutboundPhase"
,
"totalCount"
:
11
,
"failCount"
:
0
,
"failPercent"
:
"0.00"
,
"min"
:
1.0
,
"max"
:
191.0
,
"avg"
:
"43.8"
,
"sum"
:
"482.0"
,
"sum2"
:
"68088.0"
,
"std"
:
"65.3"
,
"successMessageUrl"
:
"20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html"
}
}
},
"NEW1"
:
{
"id"
:
"NEW1"
,
"totalCount"
:
33
,
"failCount"
:
0
,
"failPercent"
:
"0.00"
,
"min"
:
0.0
,
"max"
:
191.0
,
"avg"
:
"15.1"
,
"sum"
:
"499.0"
,
"sum2"
:
"68377.0"
,
"std"
:
"42.9"
,
"successMessageUrl"
:
"20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html"
,
"names"
:
{
"InboundPhase"
:
{
"id"
:
"InboundPhase"
,
"totalCount"
:
11
,
"failCount"
:
0
,
"failPercent"
:
"0.00"
,
"min"
:
0.0
,
"max"
:
17.0
,
"avg"
:
"1.5"
,
"sum"
:
"17.0"
,
"sum2"
:
"289.0"
,
"std"
:
"4.9"
,
"successMessageUrl"
:
"20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html"
"URL"
:
{
"id"
:
"URL"
,
"totalCount"
:
19
,
"failCount"
:
1
,
"failPercent"
:
"5.26"
,
"min"
:
4.864
,
"max"
:
4693.388
,
"avg"
:
"572.6"
,
"sum"
:
"10878.8"
,
"sum2"
:
"31142053.9"
,
"std"
:
"1145.1"
,
"successMessageUrl"
:
"Cat-c0a8a501-1340002652960-0"
,
"failMessageUrl"
:
"Cat-c0a8a501-1340002659680-0"
,
"tps"
:
"0.00"
,
"line95Value"
:
"4693.00"
,
"line95Sum"
:
"4693.00"
,
"line95Count"
:
1
},
"TransitionPhase"
:
{
"id"
:
"TransitionPhase"
,
"totalCount"
:
11
,
"failCount"
:
0
,
"failPercent"
:
"0.00"
,
"min"
:
0.0
,
"max"
:
4.9E-324
,
"avg"
:
"0.0"
,
"sum"
:
"0.0"
,
"sum2"
:
"0.0"
,
"std"
:
"0.0"
,
"successMessageUrl"
:
"20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html"
"MVC"
:
{
"id"
:
"MVC"
,
"totalCount"
:
57
,
"failCount"
:
1
,
"failPercent"
:
"1.75"
,
"min"
:
0.0090
,
"max"
:
3951.904
,
"avg"
:
"174.1"
,
"sum"
:
"9921.4"
,
"sum2"
:
"24096052.4"
,
"std"
:
"626.5"
,
"successMessageUrl"
:
"Cat-c0a8a501-1340002652960-0"
,
"failMessageUrl"
:
"Cat-c0a8a501-1340002659680-0"
,
"tps"
:
"0.00"
,
"line95Value"
:
"1788.00"
,
"line95Sum"
:
"1788.00"
,
"line95Count"
:
1
},
"
OutboundPhas
e"
:
{
"id"
:
"
OutboundPhas
e"
,
"totalCount"
:
1
1
,
"
ModelServic
e"
:
{
"id"
:
"
ModelServic
e"
,
"totalCount"
:
1
4
,
"failCount"
:
0
,
"failPercent"
:
"0.00"
,
"min"
:
1.0
,
"max"
:
191.0
,
"avg"
:
"43.8"
,
"sum"
:
"482.0"
,
"sum2"
:
"68088.0"
,
"std"
:
"65.3"
,
"successMessageUrl"
:
"20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html"
"min"
:
1.851
,
"max"
:
110.85
,
"avg"
:
"49.3"
,
"sum"
:
"689.7"
,
"sum2"
:
"57274.6"
,
"std"
:
"40.8"
,
"successMessageUrl"
:
"Cat-c0a8a501-1340002676112-0"
,
"tps"
:
"0.00"
,
"line95Value"
:
"110.00"
,
"line95Sum"
:
"110.00"
,
"line95Count"
:
1
}
}
}
...
...
cat-consumer/src/test/resources/com/dianping/cat/consumer/transaction/TransactionReport.xml
浏览文件 @
23276035
<transaction-report
domain=
"Cat"
startTime=
"2012-0
2-16 23:00:00"
endTime=
"2012-02-16 23:59:00
"
>
<transaction-report
domain=
"Cat"
startTime=
"2012-0
6-18 14:00:00"
endTime=
"2012-06-18 14:59:59
"
>
<domain>
Cat
</domain>
<type
id=
"URL"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"194.0"
avg=
"47.1"
sum=
"518.0"
sum2=
"73942.0"
std=
"67.1"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
<name
id=
"home"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"175.0"
max=
"175.0"
avg=
"175.0"
sum=
"175.0"
sum2=
"30625.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
<range
value=
"5"
count=
"123"
sum=
"123456.0"
avg=
"22.2"
fails=
"3"
/>
<range
value=
"10"
count=
"123"
sum=
"12457.0"
avg=
"222.0"
fails=
"3"
/>
<duration
value=
"128"
count=
"34"
/>
<duration
value=
"256"
count=
"12"
/>
</name>
<name
id=
"service"
totalCount=
"8"
failCount=
"0"
failPercent=
"0.00"
min=
"1.0"
max=
"58.0"
avg=
"13.0"
sum=
"104.0"
sum2=
"3952.0"
std=
"18.0"
>
<successMessageUrl>
20120216/23/Cat/b10bdefb-1eca-45e1-a9c3-52367078b5a2.html
</successMessageUrl>
<failMessageUrl>
20120216/23/Cat/b10bdefb-1eca-45e1-a9c3-52367078b5a2.html
</failMessageUrl>
</name>
<name
id=
"t"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"193.0"
max=
"193.0"
avg=
"193.0"
sum=
"193.0"
sum2=
"37249.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/8e7c91a0-7549-4b13-b43b-252b2a6ef4bb.html
</successMessageUrl>
</name>
<name
id=
"ip"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"46.0"
max=
"46.0"
avg=
"46.0"
sum=
"46.0"
sum2=
"2116.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/2029c32e-b692-4e43-8eaf-96b8d6c846a2.html
</successMessageUrl>
</name>
</type>
<type
id=
"MVC"
totalCount=
"33"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"191.0"
avg=
"15.1"
sum=
"499.0"
sum2=
"68377.0"
std=
"42.9"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
<name
id=
"InboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"17.0"
avg=
"1.5"
sum=
"17.0"
sum2=
"289.0"
std=
"4.9"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"TransitionPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"4.9E-324"
avg=
"0.0"
sum=
"0.0"
sum2=
"0.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"OutboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"1.0"
max=
"191.0"
avg=
"43.8"
sum=
"482.0"
sum2=
"68088.0"
std=
"65.3"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
</type>
<type
id=
"NEW1"
totalCount=
"33"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"191.0"
avg=
"15.1"
sum=
"499.0"
sum2=
"68377.0"
std=
"42.9"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
<name
id=
"InboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"17.0"
avg=
"1.5"
sum=
"17.0"
sum2=
"289.0"
std=
"4.9"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"TransitionPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"4.9E-324"
avg=
"0.0"
sum=
"0.0"
sum2=
"0.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"OutboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"1.0"
max=
"191.0"
avg=
"43.8"
sum=
"482.0"
sum2=
"68088.0"
std=
"65.3"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
</type>
<ip>
192.168.165.1
</ip>
<machine
ip=
"192.168.165.1"
>
<type
id=
"Task"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"335.782"
max=
"335.782"
avg=
"335.8"
sum=
"335.8"
sum2=
"112749.6"
std=
"0.0"
tps=
"0.00"
line95Value=
"335.00"
line95Sum=
"335.00"
line95Count=
"1"
>
</type>
<type
id=
"SQL"
totalCount=
"7"
failCount=
"0"
failPercent=
"0.00"
min=
"54.405"
max=
"1842.509"
avg=
"622.0"
sum=
"4354.3"
sum2=
"6512117.3"
std=
"737.1"
tps=
"0.00"
line95Value=
"1842.00"
line95Sum=
"1842.00"
line95Count=
"1"
>
<successMessageUrl>
Cat-c0a8a501-1340002646868-0
</successMessageUrl>
</type>
<type
id=
"URL"
totalCount=
"19"
failCount=
"1"
failPercent=
"5.26"
min=
"4.864"
max=
"4693.388"
avg=
"572.6"
sum=
"10878.8"
sum2=
"31142053.9"
std=
"1145.1"
tps=
"0.00"
line95Value=
"4693.00"
line95Sum=
"4693.00"
line95Count=
"1"
>
<successMessageUrl>
Cat-c0a8a501-1340002652960-0
</successMessageUrl>
<failMessageUrl>
Cat-c0a8a501-1340002659680-0
</failMessageUrl>
</type>
<type
id=
"MVC"
totalCount=
"57"
failCount=
"1"
failPercent=
"1.75"
min=
"0.0090"
max=
"3951.904"
avg=
"174.1"
sum=
"9921.4"
sum2=
"24096052.4"
std=
"626.5"
tps=
"0.00"
line95Value=
"1788.00"
line95Sum=
"1788.00"
line95Count=
"1"
>
<successMessageUrl>
Cat-c0a8a501-1340002652960-0
</successMessageUrl>
<failMessageUrl>
Cat-c0a8a501-1340002659680-0
</failMessageUrl>
</type>
<type
id=
"ModelService"
totalCount=
"14"
failCount=
"0"
failPercent=
"0.00"
min=
"1.851"
max=
"110.85"
avg=
"49.3"
sum=
"689.7"
sum2=
"57274.6"
std=
"40.8"
tps=
"0.00"
line95Value=
"110.00"
line95Sum=
"110.00"
line95Count=
"1"
>
<successMessageUrl>
Cat-c0a8a501-1340002676112-0
</successMessageUrl>
</type>
</machine>
</transaction-report>
cat-core/pom.xml
浏览文件 @
23276035
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.
2.5
</version>
<version>
0.
3.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-core
</artifactId>
...
...
cat-hadoop/pom.xml
浏览文件 @
23276035
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.
2.5
</version>
<version>
0.
3.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-hadoop
</artifactId>
...
...
cat-hadoop/src/main/resources/META-INF/dal/jdbc/dal.xml
浏览文件 @
23276035
...
...
@@ -228,6 +228,14 @@
<entity
name=
"graph"
table=
"graph"
alias=
"g"
>
<var
name=
"start-date"
value-type=
"Date"
/>
<var
name=
"end-date"
value-type=
"Date"
/>
<readsets>
<readset
name=
"DOMAIN"
>
<member
name=
"domain"
/>
</readset>
<readset
name=
"IP"
>
<member
name=
"ip"
/>
</readset>
</readsets>
<query-defs>
<query
name=
"insert"
type=
"INSERT"
>
<statement>
<![CDATA[
...
...
@@ -237,7 +245,8 @@
(
<VALUES/>
)
]]>
</statement>
</query>
<query
name=
"find-by-domain-name-ip-duration"
type=
"SELECT"
multiple=
"true"
>
<query
name=
"find-by-domain-name-ip-duration"
type=
"SELECT"
multiple=
"true"
>
<param
name=
"start-date"
/>
<param
name=
"end-date"
/>
<param
name=
"ip"
/>
...
...
@@ -256,6 +265,38 @@
ORDER BY
<FIELD
name=
'period'
/>
ASC
]]>
</statement>
</query>
<query
name=
"find-ip-by-domain-name-duration"
type=
"SELECT"
multiple=
"true"
>
<param
name=
"start-date"
/>
<param
name=
"end-date"
/>
<param
name=
"domain"
/>
<param
name=
"name"
/>
<statement>
<![CDATA[
SELECT DISTINCT
<FIELDS/>
FROM
<TABLE/>
WHERE
<FIELD
name=
'domain'
/>
= ${domain}
AND
<FIELD
name=
'name'
/>
= ${name}
AND
<FIELD
name=
'period'
/>
>= ${start-date}
AND
<FIELD
name=
'period'
/>
<
${end-date}
]]>
</statement>
</query>
<query
name=
"find-domain-by-name-duration"
type=
"SELECT"
multiple=
"true"
>
<param
name=
"start-date"
/>
<param
name=
"end-date"
/>
<param
name=
"name"
/>
<statement>
<![CDATA[
SELECT DISTINCT
<FIELDS/>
FROM
<TABLE/>
WHERE
<FIELD
name=
'name'
/>
= ${name}
AND
<FIELD
name=
'period'
/>
>= ${start-date}
AND
<FIELD
name=
'period'
/>
<
${end-date}
]]>
</statement>
</query>
</query-defs>
</entity>
</entities>
...
...
cat-home/pom.xml
浏览文件 @
23276035
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.
2.5
</version>
<version>
0.
3.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-home
</artifactId>
...
...
cat-home/src/main/java/com/dianping/cat/report/page/dashboard/Handler.java
浏览文件 @
23276035
package
com.dianping.cat.report.page.dashboard
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Set
;
import
javax.servlet.ServletException
;
import
com.dianping.cat.consumer.transaction.model.entity.Machine
;
import
com.dianping.cat.consumer.transaction.model.entity.TransactionReport
;
import
com.dianping.cat.consumer.transaction.model.entity.TransactionType
;
import
com.dianping.cat.report.ReportPage
;
...
...
@@ -26,9 +30,11 @@ public class Handler implements PageHandler<Context> {
@Inject
(
type
=
ModelService
.
class
,
value
=
"transaction"
)
private
ModelService
<
TransactionReport
>
m_service
;
private
Gson
m_gson
=
new
Gson
();
private
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
@Override
@PayloadMeta
(
Payload
.
class
)
@InboundActionMeta
(
name
=
"dashboard"
)
...
...
@@ -43,17 +49,32 @@ public class Handler implements PageHandler<Context> {
model
.
setAction
(
Action
.
VIEW
);
model
.
setPage
(
ReportPage
.
DASHBOARD
);
String
domain
=
"Cat"
;
TransactionReport
report
=
getHourlyReport
(
domain
);
TransactionType
detail
=
report
.
getMachines
().
get
(
"All"
).
getTypes
().
get
(
"URL"
);
detail
.
getTotalCount
();
Map
<
String
,
String
>
data
=
new
HashMap
<
String
,
String
>();
data
.
put
(
domain
+
"UrlTotal"
,
String
.
valueOf
(
detail
.
getTotalCount
()));
TransactionReport
catReport
=
getHourlyReport
(
"cat"
);
Set
<
String
>
domains
=
catReport
.
getDomainNames
();
Map
<
String
,
String
>
data
=
new
HashMap
<
String
,
String
>();
data
.
put
(
"timestamp"
,
sdf
.
format
(
new
Date
()));
for
(
String
domain
:
domains
)
{
TransactionReport
report
=
null
;
if
(
domain
.
equals
(
"cat"
))
{
report
=
catReport
;
}
else
{
report
=
getHourlyReport
(
domain
);
}
Machine
machine
=
report
.
getMachines
().
get
(
"All"
);
if
(
machine
!=
null
)
{
TransactionType
detail
=
machine
.
getTypes
().
get
(
"URL"
);
if
(
detail
!=
null
)
{
data
.
put
(
domain
+
"UrlTotal"
,
String
.
valueOf
(
detail
.
getTotalCount
()));
data
.
put
(
domain
+
"UrlResponse"
,
String
.
valueOf
(
detail
.
getAvg
()));
}
}
}
model
.
setData
(
m_gson
.
toJson
(
data
));
m_jspViewer
.
view
(
ctx
,
model
);
}
private
TransactionReport
getHourlyReport
(
String
domain
)
{
ModelRequest
request
=
new
ModelRequest
(
domain
,
ModelPeriod
.
CURRENT
)
//
.
setProperty
(
"ip"
,
"All"
);
...
...
cat-home/src/main/java/com/dianping/cat/report/page/heartbeat/Action.java
浏览文件 @
23276035
package
com.dianping.cat.report.page.heartbeat
;
public
enum
Action
implements
com
.
site
.
web
.
mvc
.
Action
{
VIEW
(
"view"
),
MOBILE
(
"mobile"
);
VIEW
(
"view"
),
MOBILE
(
"mobile"
)
,
HISTORY
(
"history"
)
;
private
String
m_name
;
...
...
cat-home/src/main/java/com/dianping/cat/report/page/heartbeat/DisplayHeartbeat.java
浏览文件 @
23276035
...
...
@@ -112,29 +112,6 @@ public class DisplayHeartbeat {
m_addCatMessageSize
=
getAddedCount
(
m_catMessageSize
);
m_addCatMessageOverflow
=
getAddedCount
(
m_catMessageOverflow
);
/*
* for (int i = 1; i <= 59; i++) { double d = m_totalThreads[i] -
* m_totalThreads[i - 1]; if (d < 0) { d = m_totalThreads[i]; }
* m_newThreads[i] = d;
*
* double gc = m_gcCount[i] - m_gcCount[i - 1]; if (gc < 0) { d =
* m_gcCount[i]; } m_addGcCount[i] = gc;
*
* double addMessageCount = m_catMessageProduced[i] -
* m_catMessageProduced[i - 1]; if (addMessageCount < 0) { addMessageCount
* = m_catMessageProduced[i]; } m_addCatMessageProduced[i] =
* addMessageCount;
*
* double addMessageSize = m_catMessageSize[i] - m_catMessageSize[i - 1];
* if (addMessageSize < 0) { addMessageSize = m_catMessageSize[i]; }
* m_addCatMessageSize[i] = addMessageSize;
*
* double addMessageFlow = m_catMessageOverflow[i] -
* m_catMessageOverflow[i - 1]; if (addMessageFlow < 0) { addMessageFlow =
* m_catMessageOverflow[i]; } m_addCatMessageOverflow[i] = addMessageFlow;
*
* }
*/
return
this
;
}
...
...
cat-home/src/main/java/com/dianping/cat/report/page/heartbeat/Handler.java
浏览文件 @
23276035
package
com.dianping.cat.report.page.heartbeat
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Set
;
import
javax.servlet.ServletException
;
...
...
@@ -9,14 +15,19 @@ import javax.servlet.ServletException;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.configuration.ServerConfigManager
;
import
com.dianping.cat.consumer.heartbeat.model.entity.HeartbeatReport
;
import
com.dianping.cat.hadoop.dal.Graph
;
import
com.dianping.cat.hadoop.dal.GraphDao
;
import
com.dianping.cat.hadoop.dal.GraphEntity
;
import
com.dianping.cat.report.ReportPage
;
import
com.dianping.cat.report.graph.GraphBuilder
;
import
com.dianping.cat.report.page.model.spi.ModelPeriod
;
import
com.dianping.cat.report.page.model.spi.ModelRequest
;
import
com.dianping.cat.report.page.model.spi.ModelResponse
;
import
com.dianping.cat.report.page.model.spi.ModelService
;
import
com.dianping.cat.report.page.trend.GraphItem
;
import
com.dianping.cat.report.view.StringSortHelper
;
import
com.google.gson.Gson
;
import
com.site.dal.jdbc.DalException
;
import
com.site.lookup.annotation.Inject
;
import
com.site.lookup.util.StringUtils
;
import
com.site.web.mvc.PageHandler
;
...
...
@@ -25,6 +36,14 @@ import com.site.web.mvc.annotation.OutboundActionMeta;
import
com.site.web.mvc.annotation.PayloadMeta
;
public
class
Handler
implements
PageHandler
<
Context
>
{
public
static
final
long
ONE_HOUR
=
3600
*
1000L
;
public
static
final
int
K
=
1024
;
@Inject
private
GraphDao
graphDao
;
@Inject
private
JspViewer
m_jspViewer
;
...
...
@@ -76,36 +95,266 @@ public class Handler implements PageHandler<Context> {
public
void
handleOutbound
(
Context
ctx
)
throws
ServletException
,
IOException
{
Model
model
=
new
Model
(
ctx
);
Payload
payload
=
ctx
.
getPayload
();
if
(
StringUtils
.
isEmpty
(
payload
.
getDomain
()))
{
payload
.
setDomain
(
m_manager
.
getConsoleDefaultDomain
());
}
model
.
setAction
(
payload
.
getAction
());
model
.
setPage
(
ReportPage
.
HEARTBEAT
);
model
.
setIpAddress
(
payload
.
getIpAddress
());
DisplayHeartbeat
heartbeat
=
null
;
normalize
(
model
,
payload
);
switch
(
payload
.
getAction
())
{
case
VIEW:
heartbeat
=
showReport
(
model
,
payload
);
set
Model
(
model
,
heartbeat
);
set
HeartbeatGraphInfo
(
model
,
heartbeat
);
break
;
case
MOBILE:
heartbeat
=
showReport
(
model
,
payload
);
MobileHeartbeatModel
mobileModel
=
setMobileModel
(
model
,
heartbeat
);
Gson
gson
=
new
Gson
(
);
String
json
=
gson
.
toJson
(
mobileModel
);
String
json
=
new
Gson
().
toJson
(
mobileModel
);
model
.
setMobileResponse
(
json
);
break
;
}
if
(
payload
.
getPeriod
().
isCurrent
()
)
{
model
.
setCreatTime
(
new
Date
()
);
}
else
{
model
.
setCreatTime
(
new
Date
(
payload
.
getDate
()
+
60
*
60
*
1000
-
1000
))
;
case
HISTORY:
if
(
model
.
getIpAddress
()
!=
null
)
{
showHeartBeatGraph
(
model
,
payload
);
}
break
;
}
m_jspViewer
.
view
(
ctx
,
model
);
}
private
void
normalize
(
Model
model
,
Payload
payload
)
{
if
(
StringUtils
.
isEmpty
(
payload
.
getDomain
()))
{
payload
.
setDomain
(
m_manager
.
getConsoleDefaultDomain
());
}
model
.
setAction
(
payload
.
getAction
());
model
.
setPage
(
ReportPage
.
HEARTBEAT
);
model
.
setIpAddress
(
payload
.
getIpAddress
());
Action
action
=
payload
.
getAction
();
if
(
action
==
Action
.
HISTORY
)
{
String
type
=
payload
.
getReportType
();
if
(
type
==
null
||
type
.
length
()
==
0
)
{
payload
.
setReportType
(
"day"
);
}
model
.
setReportType
(
payload
.
getReportType
());
payload
.
computeStartDate
();
model
.
setLongDate
(
payload
.
getDate
());
HeartbeatReport
report
=
new
HeartbeatReport
();
model
.
setReport
(
report
);
try
{
Date
historyStartDate
=
payload
.
getHistoryStartDate
();
Date
historyEndDate
=
payload
.
getHistoryEndDate
();
List
<
Graph
>
domains
=
graphDao
.
findDomainByNameDuration
(
historyStartDate
,
historyEndDate
,
"heartbeat"
,
GraphEntity
.
READSET_DOMAIN
);
String
domain
=
payload
.
getDomain
();
List
<
Graph
>
ips
=
graphDao
.
findIpByDomainNameDuration
(
historyStartDate
,
historyEndDate
,
domain
,
"heartbeat"
,
GraphEntity
.
READSET_IP
);
Set
<
String
>
reportDomains
=
report
.
getDomainNames
();
Set
<
String
>
reportIps
=
report
.
getIps
();
for
(
Graph
graph
:
domains
)
{
reportDomains
.
add
(
graph
.
getDomain
());
}
for
(
Graph
graph
:
ips
)
{
reportIps
.
add
(
graph
.
getIp
());
}
report
.
setDomain
(
payload
.
getDomain
());
model
.
setDisplayDomain
(
payload
.
getDomain
());
String
ip
=
payload
.
getIpAddress
();
if
(
StringUtils
.
isEmpty
(
ip
))
{
List
<
String
>
ips2
=
model
.
getIps
();
if
(
ips2
.
size
()
>
0
)
{
ip
=
ips2
.
get
(
0
);
}
}
model
.
setIpAddress
(
ip
);
}
catch
(
DalException
e
)
{
e
.
printStackTrace
();
}
}
}
private
GraphItem
getGraphItem
(
String
title
,
String
key
,
Date
start
,
int
size
,
Map
<
String
,
double
[]>
graphData
)
{
GraphItem
item
=
new
GraphItem
();
item
.
setStart
(
start
);
item
.
setSize
(
size
);
item
.
setTitles
(
title
);
double
[]
activeThread
=
graphData
.
get
(
key
);
item
.
addValue
(
activeThread
);
return
item
;
}
// show the graph of heartbeat
private
void
showHeartBeatGraph
(
Model
model
,
Payload
payload
)
{
Date
start
=
payload
.
getHistoryStartDate
();
Date
end
=
payload
.
getHistoryEndDate
();
int
size
=
(
int
)
((
end
.
getTime
()
-
start
.
getTime
())
/
ONE_HOUR
*
60
);
Map
<
String
,
double
[]>
graphData
=
getHeartBeatData
(
model
,
payload
);
model
.
setActiveThreadGraph
(
getGraphItem
(
"Thread (Count) "
,
"ActiveThread"
,
start
,
size
,
graphData
)
.
getJsonString
());
model
.
setDaemonThreadGraph
(
getGraphItem
(
"Daemon Thread (Count) "
,
"DaemonThread"
,
start
,
size
,
graphData
)
.
getJsonString
());
model
.
setTotalThreadGraph
(
getGraphItem
(
"Total Started Thread (Count) "
,
"TotalStartedThread"
,
start
,
size
,
graphData
).
getJsonString
());
model
.
setStartedThreadGraph
(
getGraphItem
(
"Started Thread (Count) "
,
"StartedThread"
,
start
,
size
,
graphData
)
.
getJsonString
());
model
.
setCatThreadGraph
(
getGraphItem
(
"Cat Started Thread (Count) "
,
"CatThreadCount"
,
start
,
size
,
graphData
)
.
getJsonString
());
model
.
setPigeonThreadGraph
(
getGraphItem
(
"Pigeon Started Thread (Count) "
,
"PigeonStartedThread"
,
start
,
size
,
graphData
).
getJsonString
());
model
.
setNewGcCountGraph
(
getGraphItem
(
"NewGc Count (Count) "
,
"NewGcCount"
,
start
,
size
,
graphData
)
.
getJsonString
());
model
.
setOldGcCountGraph
(
getGraphItem
(
"OldGc Count (Count) "
,
"OldGcCount"
,
start
,
size
,
graphData
)
.
getJsonString
());
model
.
setSystemLoadAverageGraph
(
getGraphItem
(
"System Load Average "
,
"SystemLoadAverage"
,
start
,
size
,
graphData
)
.
getJsonString
());
model
.
setMemoryFreeGraph
(
getGraphItem
(
"Memory Free (MB) "
,
"MemoryFree"
,
start
,
size
,
graphData
).
getJsonString
());
model
.
setHeapUsageGraph
(
getGraphItem
(
"Heap Usage (MB) "
,
"HeapUsage"
,
start
,
size
,
graphData
).
getJsonString
());
model
.
setNoneHeapUsageGraph
(
getGraphItem
(
"None Heap Usage (MB) "
,
"NoneHeapUsage"
,
start
,
size
,
graphData
)
.
getJsonString
());
model
.
setDiskRootGraph
(
getGraphItem
(
"Disk (GB) /"
,
"Disk /"
,
start
,
size
,
graphData
).
getJsonString
());
model
.
setDiskDataGraph
(
getGraphItem
(
"Disk (GB) /data"
,
"Disk /data"
,
start
,
size
,
graphData
).
getJsonString
());
model
.
setCatMessageProducedGraph
(
getGraphItem
(
"Cat Message Produced (Count) / Minute"
,
"CatMessageProduced"
,
start
,
size
,
graphData
).
getJsonString
());
model
.
setCatMessageOverflowGraph
(
getGraphItem
(
"Cat Message Overflow (Count) / Minute"
,
"CatMessageOverflow"
,
start
,
size
,
graphData
).
getJsonString
());
model
.
setCatMessageSizeGraph
(
getGraphItem
(
"Cat Message Size (MB) / Minute"
,
"CatMessageSize"
,
start
,
size
,
graphData
).
getJsonString
());
}
public
Map
<
String
,
double
[]>
getHeartBeatData
(
Model
model
,
Payload
payload
)
{
Date
start
=
new
Date
(
payload
.
getDate
());
Date
end
=
payload
.
getHistoryEndDate
();
String
ip
=
model
.
getIpAddress
();
String
domain
=
payload
.
getDomain
();
List
<
Graph
>
graphs
=
new
ArrayList
<
Graph
>();
try
{
graphs
=
this
.
graphDao
.
findByDomainNameIpDuration
(
start
,
end
,
ip
,
domain
,
"heartbeat"
,
GraphEntity
.
READSET_FULL
);
}
catch
(
DalException
e
)
{
e
.
printStackTrace
();
}
Map
<
String
,
double
[]>
result
=
buildHeartbeatDatas
(
start
,
end
,
graphs
);
return
result
;
}
public
Map
<
String
,
double
[]>
buildHeartbeatDatas
(
Date
start
,
Date
end
,
List
<
Graph
>
graphs
)
{
int
size
=
(
int
)
((
end
.
getTime
()
-
start
.
getTime
())
/
ONE_HOUR
);
Map
<
String
,
String
[]>
hourlyDate
=
gethourlyDate
(
graphs
,
start
,
size
);
return
getHeartBeatDatesEveryMinute
(
hourlyDate
,
size
);
}
private
Map
<
String
,
String
[]>
gethourlyDate
(
List
<
Graph
>
graphs
,
Date
start
,
int
size
)
{
Map
<
String
,
String
[]>
heartBeats
=
new
HashMap
<
String
,
String
[]>();
for
(
Graph
graph
:
graphs
)
{
int
indexOfperiod
=
(
int
)
((
graph
.
getPeriod
().
getTime
()
-
start
.
getTime
())
/
ONE_HOUR
);
String
detailContent
=
graph
.
getDetailContent
();
String
[]
alldates
=
detailContent
.
split
(
"\n"
);
for
(
int
i
=
0
;
i
<
alldates
.
length
;
i
++)
{
String
[]
records
=
alldates
[
i
].
split
(
"\t"
);
String
name
=
records
[
DetailOrder
.
NAME
.
ordinal
()];
String
countPerHour
=
records
[
DetailOrder
.
COUNT_IN_MINUTES
.
ordinal
()];
String
[]
singlePeriod
=
null
;
String
[]
strings
=
heartBeats
.
get
(
name
);
if
(
strings
==
null
){
singlePeriod
=
new
String
[
size
];
for
(
int
index
=
0
;
index
<
size
;
index
++)
{
singlePeriod
[
index
]
=
""
;
}
}
else
{
singlePeriod
=
strings
;
}
singlePeriod
[
indexOfperiod
]
=
countPerHour
;
heartBeats
.
put
(
name
,
singlePeriod
);
}
}
return
heartBeats
;
}
public
Map
<
String
,
double
[]>
getHeartBeatDatesEveryMinute
(
Map
<
String
,
String
[]>
heartBeats
,
final
int
size
)
{
Map
<
String
,
double
[]>
result
=
new
HashMap
<
String
,
double
[]>();
final
int
minutesPerHour
=
60
;
int
sizeOfHeartBeat
=
size
*
minutesPerHour
;
Iterator
<
Entry
<
String
,
String
[]>>
iterator
=
heartBeats
.
entrySet
().
iterator
();
while
(
iterator
.
hasNext
())
{
Entry
<
String
,
String
[]>
entry
=
iterator
.
next
();
String
name
=
(
String
)
entry
.
getKey
();
double
[]
allDatePerMinutes
=
new
double
[
sizeOfHeartBeat
];
String
[]
allPeriods
=
entry
.
getValue
();
for
(
int
i
=
0
;
i
<
allPeriods
.
length
;
i
++)
{
double
[]
datePerHour
=
new
double
[
minutesPerHour
];
String
oneHour
=
allPeriods
[
i
];
if
(!
""
.
equals
(
oneHour
))
{
String
[]
dateInMinutes
=
oneHour
.
split
(
","
);
for
(
int
j
=
0
;
j
<
dateInMinutes
.
length
;
j
++)
{
datePerHour
[
j
]
=
Double
.
parseDouble
(
dateInMinutes
[
j
]);
}
}
for
(
int
m
=
0
;
m
<
minutesPerHour
;
m
++)
{
int
index
=
i
*
minutesPerHour
+
m
;
allDatePerMinutes
[
index
]
=
datePerHour
[
m
];
}
}
result
.
put
(
name
,
allDatePerMinutes
);
}
formatHeartBeat
(
result
);
return
result
;
}
private
void
formatHeartBeat
(
Map
<
String
,
double
[]>
result
)
{
double
[]
totalStartedThread
=
result
.
get
(
"TotalStartedThread"
);
if
(
totalStartedThread
!=
null
)
{
result
.
put
(
"StartedThread"
,
getAddedCount
(
totalStartedThread
));
}
String
[]
addedDatas
={
"NewGcCount"
,
"OldGcCount"
,
"CatMessageProduced"
,
"CatMessageSize"
,
"CatMessageOverflow"
};
organiseAddedData
(
result
,
addedDatas
);
String
[]
divideByKDates
={
"CatMessageSize"
,
"HeapUsage"
,
"NoneHeapUsage"
,
"MemoryFree"
,
"Disk /"
,
"Disk /data"
};
divideByK
(
result
,
divideByKDates
);
}
private
void
divideByK
(
Map
<
String
,
double
[]>
result
,
String
[]
divideByKDates
)
{
for
(
String
name:
divideByKDates
){
double
[]
data
=
result
.
get
(
name
);
int
divisor
=
name
.
startsWith
(
"Disk"
)?
K
*
K
*
K:
K
*
K
;
for
(
int
i
=
0
;
i
<
data
.
length
;
i
++)
{
data
[
i
]
=
data
[
i
]
/
divisor
;
}
}
}
private
void
organiseAddedData
(
Map
<
String
,
double
[]>
result
,
String
[]
addedNames
)
{
for
(
String
addedName:
addedNames
){
result
.
put
(
addedName
,
getAddedCount
(
result
.
get
(
addedName
)));
}
}
private
double
[]
getAddedCount
(
double
[]
source
)
{
int
size
=
source
.
length
;
double
[]
result
=
new
double
[
size
];
for
(
int
i
=
1
;
i
<=
size
-
1
;
i
++)
{
if
(
source
[
i
-
1
]
>
0
)
{
double
d
=
source
[
i
]
-
source
[
i
-
1
];
if
(
d
<
0
)
{
d
=
source
[
i
];
}
result
[
i
]
=
d
;
}
}
return
result
;
}
private
MobileHeartbeatModel
setMobileModel
(
Model
model
,
DisplayHeartbeat
heartbeat
)
{
MobileHeartbeatModel
result
=
new
MobileHeartbeatModel
();
result
.
display
(
model
,
heartbeat
);
...
...
@@ -140,7 +389,7 @@ public class Handler implements PageHandler<Context> {
return
null
;
}
private
void
set
Model
(
Model
model
,
DisplayHeartbeat
displayHeartbeat
)
{
private
void
set
HeartbeatGraphInfo
(
Model
model
,
DisplayHeartbeat
displayHeartbeat
)
{
if
(
displayHeartbeat
==
null
)
{
return
;
}
...
...
@@ -163,4 +412,10 @@ public class Handler implements PageHandler<Context> {
model
.
setSystemLoadAverageGraph
(
displayHeartbeat
.
getSystemLoadAverageGraph
());
model
.
setMemoryFreeGraph
(
displayHeartbeat
.
getMemoryFreeGraph
());
}
// the detail order of heartbeat is:name min max sum sum2 count_in_minutes
public
enum
DetailOrder
{
NAME
,
MIN
,
MAX
,
SUM
,
SUM2
,
COUNT_IN_MINUTES
}
}
cat-home/src/main/java/com/dianping/cat/report/page/heartbeat/JspFile.java
浏览文件 @
23276035
...
...
@@ -3,6 +3,8 @@ package com.dianping.cat.report.page.heartbeat;
public
enum
JspFile
{
VIEW
(
"/jsp/report/heartbeat.jsp"
),
HISTORY
(
"/jsp/report/heartbeatHistoryGraph.jsp"
),
MOBILE
(
"/jsp/report/heartbeat_mobile.jsp"
);
private
String
m_path
;
...
...
cat-home/src/main/java/com/dianping/cat/report/page/heartbeat/JspViewer.java
浏览文件 @
23276035
...
...
@@ -13,6 +13,9 @@ public class JspViewer extends BaseJspViewer<ReportPage, Action, Context, Model>
return
JspFile
.
VIEW
.
getPath
();
case
MOBILE:
return
JspFile
.
MOBILE
.
getPath
();
case
HISTORY:
return
JspFile
.
HISTORY
.
getPath
();
}
throw
new
RuntimeException
(
"Unknown action: "
+
action
);
...
...
cat-home/src/main/java/com/dianping/cat/report/page/heartbeat/Model.java
浏览文件 @
23276035
...
...
@@ -23,6 +23,10 @@ public class Model extends AbstractReportModel<Action, Context> {
private
int
m_disks
;
private
String
m_disksGraph
;
private
String
m_diskRootGraph
;
private
String
m_diskDataGraph
;
private
String
m_newGcCountGraph
;
...
...
@@ -260,4 +264,21 @@ public class Model extends AbstractReportModel<Action, Context> {
public
void
setMobileResponse
(
String
mobileResponse
)
{
m_mobileResponse
=
mobileResponse
;
}
public
String
getDiskRootGraph
()
{
return
m_diskRootGraph
;
}
public
void
setDiskRootGraph
(
String
diskRootGraph
)
{
m_diskRootGraph
=
diskRootGraph
;
}
public
String
getDiskDataGraph
()
{
return
m_diskDataGraph
;
}
public
void
setDiskDataGraph
(
String
diskDataGraph
)
{
m_diskDataGraph
=
diskDataGraph
;
}
}
cat-home/src/main/java/com/dianping/cat/report/page/heartbeat/Test.java
0 → 100644
浏览文件 @
23276035
package
com.dianping.cat.report.page.heartbeat
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
Test
{
public
static
void
main
(
String
[]
args
)
{
/* Map<String,String> s=new HashMap<String,String>();
s.put("", "kitty");
String k=s.get("");
k="jianmei";*/
System
.
out
.
println
(
"sssssssssssss"
);
}
}
cat-home/src/main/java/com/dianping/cat/report/page/problem/Handler.java
浏览文件 @
23276035
...
...
@@ -3,7 +3,6 @@ package com.dianping.cat.report.page.problem;
import
java.io.IOException
;
import
java.text.DecimalFormat
;
import
java.text.NumberFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
...
...
cat-home/src/main/java/com/dianping/cat/report/page/transaction/Handler.java
浏览文件 @
23276035
...
...
@@ -48,7 +48,7 @@ public class Handler implements PageHandler<Context> {
public
static
final
long
ONE_HOUR
=
3600
*
1000L
;
public
static
final
double
NOTEXIST
=
-
2
;
public
static
final
double
NOTEXIST
=
0
;
@Inject
private
JspViewer
m_jspViewer
;
...
...
@@ -221,7 +221,7 @@ public class Handler implements PageHandler<Context> {
item
.
setStart
(
start
);
item
.
setSize
(
size
);
item
.
setTitles
(
display
+
" Response T
rend
"
);
item
.
setTitles
(
display
+
" Response T
ime
"
);
Map
<
String
,
double
[]>
graphData
=
getGraphData
(
model
,
payload
);
double
[]
sum
=
graphData
.
get
(
"sum"
);
double
[]
totalCount
=
graphData
.
get
(
"total_count"
);
...
...
@@ -235,10 +235,15 @@ public class Handler implements PageHandler<Context> {
model
.
setResponseTrend
(
item
.
getJsonString
());
item
.
getValues
().
clear
();
item
.
setTitles
(
display
+
" Hit
Trend
"
);
item
.
setTitles
(
display
+
" Hit
s
"
);
item
.
addValue
(
totalCount
);
model
.
setHitTrend
(
item
.
getJsonString
());
item
.
getValues
().
clear
();
item
.
setTitles
(
display
+
" Error"
);
item
.
addValue
(
graphData
.
get
(
"failure_count"
));
model
.
setErrorTrend
(
item
.
getJsonString
());
}
private
void
showSummarizeReport
(
Model
model
,
Payload
payload
)
{
...
...
cat-home/src/main/java/com/dianping/cat/report/page/transaction/Model.java
浏览文件 @
23276035
...
...
@@ -32,6 +32,8 @@ public class Model extends AbstractReportModel<Action, Context> {
private
String
m_hitTrend
;
private
String
m_errorTrend
;
public
Model
(
Context
ctx
)
{
super
(
ctx
);
}
...
...
@@ -163,5 +165,12 @@ public class Model extends AbstractReportModel<Action, Context> {
public
void
setHitTrend
(
String
hitTrend
)
{
m_hitTrend
=
hitTrend
;
}
public
String
getErrorTrend
()
{
return
m_errorTrend
;
}
public
void
setErrorTrend
(
String
errorTrend
)
{
m_errorTrend
=
errorTrend
;
}
}
cat-home/src/main/resources/META-INF/plexus/components.xml
浏览文件 @
23276035
...
...
@@ -505,6 +505,9 @@
<role>
com.dianping.cat.report.page.heartbeat.Handler
</role>
<implementation>
com.dianping.cat.report.page.heartbeat.Handler
</implementation>
<requirements>
<requirement>
<role>
com.dianping.cat.hadoop.dal.GraphDao
</role>
</requirement>
<requirement>
<role>
com.dianping.cat.report.page.heartbeat.JspViewer
</role>
</requirement>
...
...
cat-home/src/main/webapp/WEB-INF/tags/body.tag
浏览文件 @
23276035
...
...
@@ -19,7 +19,7 @@
<ul
class=
"tabs"
>
<c:forEach
var=
"page"
items=
"${navBar.visiblePages}"
>
<c:if
test=
"${page.standalone}"
>
<li
${
model.page.name =
=
page.name
?
'
class=
"selected"
'
:
''}
><a
href=
"${model.webapp}/${page.moduleName}/${page.path}?domain=${model.domain}&date=${model.date}"
>
${page.title}
</a></li>
<li
${
model.page.name =
=
page.name
?
'
class=
"selected"
'
:
''}
><a
href=
"${model.webapp}/${page.moduleName}/${page.path}?domain=${model.domain}&date=${model.date}
&reportType=${payload.reportType}&op=${payload.action.name}
"
>
${page.title}
</a></li>
</c:if>
<c:if
test=
"${not page.standalone and model.page.name == page.name}"
>
<li
class=
"selected"
>
${page.title}
</li>
...
...
cat-home/src/main/webapp/WEB-INF/tags/historyReport.tag
浏览文件 @
23276035
...
...
@@ -37,9 +37,9 @@
</div>
</td>
<td class="nav">
[ <a href="?op=history&domain=${domain}&date=${model.date}&reportType=${model.reportType}&step=-1">${model.currentNav.last}</a> ]
[ <a href="?op=history&domain=${domain}&date=${model.date}&reportType=${model.reportType}&step=1">${model.currentNav.next}</a> ]
[ <a href="?op=history&domain=${domain}&reportType=${model.reportType}&nav=next">now</a> ]
[ <a href="?op=history&domain=${
model.
domain}&date=${model.date}&reportType=${model.reportType}&step=-1">${model.currentNav.last}</a> ]
[ <a href="?op=history&domain=${
model.
domain}&date=${model.date}&reportType=${model.reportType}&step=1">${model.currentNav.next}</a> ]
[ <a href="?op=history&domain=${
model.
domain}&reportType=${model.reportType}&nav=next">now</a> ]
</td>
</tr>
<tr>
...
...
@@ -48,10 +48,10 @@
<c:forEach var="nav" items="${model.historyNavs}">
<c:choose>
<c:when test="${nav.title eq model.reportType}">
[ <a href="?op=history&domain=${domain}&date=${model.date}&reportType=${nav.title}" class="current">${nav.title}</a> ]
[ <a href="?op=history&domain=${
model.
domain}&date=${model.date}&reportType=${nav.title}" class="current">${nav.title}</a> ]
</c:when>
<c:otherwise>
[ <a href="?op=history&domain=${domain}&date=${model.date}&reportType=${nav.title}">${nav.title}</a> ]
[ <a href="?op=history&domain=${
model.
domain}&date=${model.date}&reportType=${nav.title}">${nav.title}</a> ]
</c:otherwise>
</c:choose>
</c:forEach>
...
...
cat-home/src/main/webapp/WEB-INF/webres.tld
浏览文件 @
23276035
...
...
@@ -4,23 +4,9 @@
<short-name>res</short-name>
<uri>http://www.unidal.org/webres</uri>
<tag>
<description><![CDATA[Resource Bean Tag to define resource bean variable as bootstrap]]></description>
<name>bean</name>
<tag-class>org.unidal.webres.taglib.basic.BeanTagHandler</tag-class>
<body-content>JSP</body-content>
<attribute>
<description><![CDATA[A valid id for Bean.]]></description>
<name>id</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<dynamic-attributes>false</dynamic-attributes>
</tag>
<tag>
<description><![CDATA[cssSlot Resource Tag]]></description>
<name>cssSlot</name>
<tag-class>org.unidal.webres.taglib.basic.CssSlotTagHandler</tag-class>
<description><![CDATA[jsSlot Resource Tag]]></description>
<name>jsSlot</name>
<tag-class>org.unidal.webres.taglib.basic.JsSlotTagHandler</tag-class>
<body-content>JSP</body-content>
<attribute>
<description><![CDATA[Identify whether the link URL is secure or not.]]></description>
...
...
@@ -30,7 +16,7 @@
<type>boolean</type>
</attribute>
<attribute>
<description><![CDATA[The reference id for
Cs
sSlot.]]></description>
<description><![CDATA[The reference id for
J
sSlot.]]></description>
<name>id</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
...
...
@@ -46,26 +32,33 @@
<dynamic-attributes>true</dynamic-attributes>
</tag>
<tag>
<description><![CDATA[
Image Resource Tag
]]></description>
<name>
img
</name>
<tag-class>org.unidal.webres.taglib.basic.
Image
TagHandler</tag-class>
<description><![CDATA[
Resource Bean Tag to define resource bean variable as bootstrap
]]></description>
<name>
bean
</name>
<tag-class>org.unidal.webres.taglib.basic.
Bean
TagHandler</tag-class>
<body-content>JSP</body-content>
<attribute>
<description><![CDATA[
The value for image, could be a expression or a image path
.]]></description>
<name>
value
</name>
<description><![CDATA[
A valid id for Bean
.]]></description>
<name>
id
</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.
Object
</type>
<type>java.lang.
String
</type>
</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
image
URL is secure or not.]]></description>
<description><![CDATA[Identify whether the
link
URL is secure or not.]]></description>
<name>secure</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>boolean</type>
</attribute>
<attribute>
<description><![CDATA[The reference id for
img
.]]></description>
<description><![CDATA[The reference id for
Css
.]]></description>
<name>id</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
...
...
@@ -78,27 +71,27 @@
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<dynamic-attributes>true</dynamic-attributes>
</tag>
<tag>
<description><![CDATA[jsSlot Resource Tag]]></description>
<name>jsSlot</name>
<tag-class>org.unidal.webres.taglib.basic.JsSlotTagHandler</tag-class>
<body-content>JSP</body-content>
<attribute>
<description><![CDATA[
Identify whether the link URL is secure or not
.]]></description>
<name>
secur
e</name>
<description><![CDATA[
Set the css value with EL or a css ref
.]]></description>
<name>
valu
e</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>
boolean
</type>
<type>
java.lang.Object
</type>
</attribute>
<attribute>
<description><![CDATA[T
he reference id for JsSlot.
]]></description>
<name>
id
</name>
<description><![CDATA[T
arget 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>
<body-content>JSP</body-content>
<attribute>
<description><![CDATA[Customized tag render type]]></description>
<name>renderType</name>
...
...
@@ -106,20 +99,41 @@
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<dynamic-attributes>true</dynamic-attributes>
<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[
Link Resource Tag
]]></description>
<name>
link
</name>
<tag-class>org.unidal.webres.taglib.basic.
Link
TagHandler</tag-class>
<description><![CDATA[
Set tag to define a page attribute with id as name
]]></description>
<name>
set
</name>
<tag-class>org.unidal.webres.taglib.basic.
Set
TagHandler</tag-class>
<body-content>JSP</body-content>
<attribute>
<description><![CDATA[The value for link, could be a expression or a link ref.]]></description>
<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>
<name>value</name>
<required>true</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>
...
...
@@ -128,41 +142,48 @@
<type>boolean</type>
</attribute>
<attribute>
<description><![CDATA[The reference id for Js.]]></description>
<name>id</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<attribute>
<description><![CDATA[Customized tag render type]]></description>
<name>renderType</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<dynamic-attributes>true</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 value
]]></description>
<description><![CDATA[
Set the js value with EL or a js ref.
]]></description>
<name>value</name>
<required>
tru
e</required>
<required>
fals
e</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.Object</type>
</attribute>
<attribute>
<description><![CDATA[T
he name.
]]></description>
<name>
id
</name>
<required>
tru
e</required>
<description><![CDATA[T
arget placement for this js resource to render
]]></description>
<name>
target
</name>
<required>
fals
e</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<dynamic-attributes>
fals
e</dynamic-attributes>
<dynamic-attributes>
tru
e</dynamic-attributes>
</tag>
<tag>
<description><![CDATA[
Resource token tag for page resources
]]></description>
<name>
token
</name>
<tag-class>org.unidal.webres.taglib.basic.
Token
TagHandler</tag-class>
<description><![CDATA[
Link Resource Tag
]]></description>
<name>
link
</name>
<tag-class>org.unidal.webres.taglib.basic.
Link
TagHandler</tag-class>
<body-content>JSP</body-content>
<attribute>
<description><![CDATA[Identify whether the link URL is secure or not.]]></description>
<name>secure</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>boolean</type>
</attribute>
<attribute>
<description><![CDATA[Customized tag render type]]></description>
<name>renderType</name>
<required>false</required>
...
...
@@ -170,35 +191,28 @@
<type>java.lang.String</type>
</attribute>
<attribute>
<description><![CDATA[T
oken type of resource: js, css
]]></description>
<name>
typ
e</name>
<description><![CDATA[T
he value for link, could be a expression or a link ref.
]]></description>
<name>
valu
e</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.
String
</type>
<type>java.lang.
Object
</type>
</attribute>
<dynamic-attributes>
fals
e</dynamic-attributes>
<dynamic-attributes>
tru
e</dynamic-attributes>
</tag>
<tag>
<description><![CDATA[
useCss
Resource Tag]]></description>
<name>
useCss
</name>
<tag-class>org.unidal.webres.taglib.basic.
UseCss
TagHandler</tag-class>
<description><![CDATA[
Image
Resource Tag]]></description>
<name>
img
</name>
<tag-class>org.unidal.webres.taglib.basic.
Image
TagHandler</tag-class>
<body-content>JSP</body-content>
<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[Identify whether the link URL is secure or not.]]></description>
<description><![CDATA[Identify whether the image URL is secure or not.]]></description>
<name>secure</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>boolean</type>
</attribute>
<attribute>
<description><![CDATA[The reference id for
Css
.]]></description>
<description><![CDATA[The reference id for
img
.]]></description>
<name>id</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
...
...
@@ -212,27 +226,20 @@
<type>java.lang.String</type>
</attribute>
<attribute>
<description><![CDATA[T
arget placement for this css resource to render
]]></description>
<name>
target
</name>
<required>
fals
e</required>
<description><![CDATA[T
he value for image, could be a expression or a image path.
]]></description>
<name>
value
</name>
<required>
tru
e</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.
String
</type>
<type>java.lang.
Object
</type>
</attribute>
<dynamic-attributes>true</dynamic-attributes>
</tag>
<tag>
<description><![CDATA[
useJs
Resource Tag]]></description>
<name>
useJs
</name>
<tag-class>org.unidal.webres.taglib.basic.
UseJs
TagHandler</tag-class>
<description><![CDATA[
cssSlot
Resource Tag]]></description>
<name>
cssSlot
</name>
<tag-class>org.unidal.webres.taglib.basic.
CssSlot
TagHandler</tag-class>
<body-content>JSP</body-content>
<attribute>
<description><![CDATA[Set the js value with EL or a js ref.]]></description>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.Object</type>
</attribute>
<attribute>
<description><![CDATA[Identify whether the link URL is secure or not.]]></description>
<name>secure</name>
<required>false</required>
...
...
@@ -240,7 +247,7 @@
<type>boolean</type>
</attribute>
<attribute>
<description><![CDATA[The reference id for
Js
.]]></description>
<description><![CDATA[The reference id for
CssSlot
.]]></description>
<name>id</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
...
...
@@ -253,13 +260,6 @@
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<attribute>
<description><![CDATA[Target placement for this js 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>
</taglib>
cat-home/src/main/webapp/js/heartbeatHistory.js
0 → 100644
浏览文件 @
23276035
function
formatDate
(
date
)
{
var
myyear
=
date
.
getFullYear
();
var
mymonth
=
date
.
getMonth
();
var
myweekday
=
date
.
getDate
();
var
hour
=
date
.
getHours
();
var
minute
=
date
.
getMinutes
();
var
second
=
date
.
getSeconds
();
if
(
mymonth
<
10
)
{
mymonth
=
"
0
"
+
mymonth
;
}
if
(
myweekday
<
10
)
{
myweekday
=
"
0
"
+
myweekday
;
}
hour
=
hour
<
10
?
'
0
'
+
hour
:
hour
;
minute
=
minute
<
10
?
'
0
'
+
minute
:
minute
;
second
=
second
<
10
?
'
0
'
+
second
:
second
;
return
(
myyear
+
"
-
"
+
mymonth
+
"
-
"
+
myweekday
+
"
"
+
hour
+
"
:
"
+
minute
+
"
:
"
+
second
);
}
function
graph
(
container
,
data
)
{
var
hour
=
1000
*
3600
;
var
minute
=
1000
*
60
;
var
real
=
data
.
values
[
0
];
var
d1
=
[],
start
=
new
Date
(
data
.
start
).
getTime
(),
options
,
graph
,
i
,
x
,
o
;
for
(
i
=
0
;
i
<
data
.
size
;
i
++
)
{
x
=
start
+
(
i
*
minute
);
d1
.
push
([
x
+
hour
*
8
,
real
[
i
]
]);
}
options
=
{
xaxis
:
{
mode
:
'
time
'
,
labelsAngle
:
15
},
yaxis
:
{
min
:
0
},
selection
:
{
mode
:
'
x
'
},
HtmlText
:
false
,
title
:
data
.
titles
+
"
From
"
+
formatDate
(
new
Date
(
data
.
start
))
+
"
To
"
+
formatDate
(
new
Date
(
start
+
data
.
size
*
1000
*
60
))
};
// Draw graph with default options, overwriting with passed options
function
drawGraph
(
opts
)
{
// Clone the options, so the 'options' variable always keeps intact.
o
=
Flotr
.
_
.
extend
(
Flotr
.
_
.
clone
(
options
),
opts
||
{});
if
(
opts
!=
null
&&
opts
.
xaxis
!=
null
)
{
console
.
log
(
opts
.
xaxis
.
min
);
console
.
log
(
new
Date
(
opts
.
xaxis
.
min
));
console
.
log
(
formatDate
(
new
Date
(
opts
.
xaxis
.
min
)))
console
.
log
(
opts
.
xaxis
.
max
);
console
.
log
(
new
Date
(
opts
.
xaxis
.
max
));
console
.
log
(
formatDate
(
new
Date
(
opts
.
xaxis
.
max
)))
o
.
title
=
data
.
titles
+
"
From
"
+
formatDate
(
new
Date
(
opts
.
xaxis
.
min
-
hour
*
8
))
+
"
To
"
+
formatDate
(
new
Date
(
opts
.
xaxis
.
max
-
hour
*
8
));
}
else
{
}
// Return a new graph.
return
Flotr
.
draw
(
container
,
[
d1
],
o
);
}
graph
=
drawGraph
();
Flotr
.
EventAdapter
.
observe
(
container
,
'
flotr:select
'
,
function
(
area
)
{
// Draw selected area
graph
=
drawGraph
({
xaxis
:
{
min
:
area
.
x1
,
max
:
area
.
x2
,
mode
:
'
time
'
,
labelsAngle
:
15
},
yaxis
:
{
min
:
area
.
y1
,
max
:
area
.
y2
},
HtmlText
:
true
});
});
// When graph is clicked, draw the graph with default area.
Flotr
.
EventAdapter
.
observe
(
container
,
'
flotr:click
'
,
function
()
{
graph
=
drawGraph
();
});
}
cat-home/src/main/webapp/js/problemHistory.js
浏览文件 @
23276035
...
...
@@ -34,6 +34,9 @@ function graph(container, data) {
xaxis
:
{
mode
:
'
time
'
,
labelsAngle
:
15
},
yaxis
:
{
min
:
0
},
selection
:
{
mode
:
'
x
'
...
...
@@ -52,12 +55,6 @@ function graph(container, data) {
o
=
Flotr
.
_
.
extend
(
Flotr
.
_
.
clone
(
options
),
opts
||
{});
if
(
opts
!=
null
&&
opts
.
xaxis
!=
null
)
{
console
.
log
(
opts
.
xaxis
.
min
);
console
.
log
(
new
Date
(
opts
.
xaxis
.
min
));
console
.
log
(
formatDate
(
new
Date
(
opts
.
xaxis
.
min
)))
console
.
log
(
opts
.
xaxis
.
max
);
console
.
log
(
new
Date
(
opts
.
xaxis
.
max
));
console
.
log
(
formatDate
(
new
Date
(
opts
.
xaxis
.
max
)))
o
.
title
=
data
.
titles
+
"
From
"
+
formatDate
(
new
Date
(
opts
.
xaxis
.
min
-
hour
*
8
))
+
"
To
"
+
formatDate
(
new
Date
(
opts
.
xaxis
.
max
-
hour
*
8
));
...
...
@@ -172,7 +169,3 @@ $(document).delegate('.problem_status_graph_link', 'click', function(e){
cell
.
parentNode
.
style
.
display
=
'
none
'
;
}
});
//graph(document.getElementById("errorTrend"), errorTrend);
//graph(document.getElementById("urlErrorTrend"), urlErrorTrend);
//graph(document.getElementById("longSqlTrend"), longSqlTrend);
//graph(document.getElementById("longUrlTrend"), longUrlTrend);
\ No newline at end of file
cat-home/src/main/webapp/js/transaction.js
浏览文件 @
23276035
...
...
@@ -68,6 +68,9 @@ $(document).delegate('.history_graph_link', 'click', function(e){
data
=
$
(
'
#hitTrendMeta
'
,
cell
).
text
();
graph
(
$
(
'
#hitTrend
'
,
cell
)[
0
],
eval
(
'
(
'
+
data
+
'
)
'
));
data
=
$
(
'
#errorTrendMeta
'
,
cell
).
text
();
graph
(
$
(
'
#errorTrend
'
,
cell
)[
0
],
eval
(
'
(
'
+
data
+
'
)
'
));
}
});
}
...
...
cat-home/src/main/webapp/js/trend.js
已删除
100644 → 0
浏览文件 @
2e3eb172
$
(
function
()
{
$
(
"
#datepicker
"
).
datepicker
({
changeMonth
:
true
,
changeYear
:
true
,
dateFormat
:
"
yy-mm-dd
"
});
});
function
showSelfDefined
(){
var
type
=
$
(
"
#id_selfDefined
"
).
val
();
if
(
type
==
'
problem
'
){
$
(
'
#status
'
).
html
(
"
status:
"
);
}
else
{
$
(
'
#status
'
).
html
(
"
name:
"
);
}
}
function
searchReport
(
domain
,
graphType
){
var
dateType
=
$
(
"
#id_dateType
"
).
val
();
var
queryDate
=
$
(
"
#datepicker
"
).
val
();
var
selfQueryOption
=
$
(
"
#id_selfDefinedType
"
).
val
();
var
queryIP
=
$
(
"
#ip
"
).
val
();
var
queryType
=
$
(
"
#type
"
).
val
();
var
queryName
=
$
(
"
#nameOrStatus
"
).
val
();
window
.
location
.
href
=
"
?domain=
"
+
domain
+
"
&graphType=
"
+
graphType
+
"
&dateType=
"
+
dateType
+
"
&queryDate=
"
+
queryDate
+
"
&selfQueryOption=
"
+
selfQueryOption
+
"
&queryIP=
"
+
queryIP
+
"
&queryType=
"
+
queryType
+
"
&queryName=
"
+
queryName
;
}
function
formatDate
(
date
)
{
var
myyear
=
date
.
getFullYear
();
var
mymonth
=
date
.
getMonth
();
var
myweekday
=
date
.
getDate
();
var
hour
=
date
.
getHours
();
var
minute
=
date
.
getMinutes
();
var
second
=
date
.
getSeconds
();
if
(
mymonth
<
10
){
mymonth
=
"
0
"
+
mymonth
;
}
if
(
myweekday
<
10
){
myweekday
=
"
0
"
+
myweekday
;
}
hour
=
hour
<
10
?
'
0
'
+
hour
:
hour
;
minute
=
minute
<
10
?
'
0
'
+
minute
:
minute
;
second
=
second
<
10
?
'
0
'
+
second
:
second
;
return
(
myyear
+
"
-
"
+
mymonth
+
"
-
"
+
myweekday
+
"
"
+
hour
+
"
:
"
+
minute
+
"
:
"
+
second
);
}
function
maxDay
(
myDate
)
{
var
ary
=
myDate
.
toArray
();
var
date1
=
(
new
Date
(
ary
[
0
],
ary
[
1
]
+
1
,
1
));
var
date2
=
date1
.
dateAdd
(
1
,
'
m
'
,
1
);
var
result
=
dateDiff
(
date1
.
Format
(
'
yyyy-MM-dd
'
),
date2
.
Format
(
'
yyyy-MM-dd
'
));
return
result
;
}
function
onStartDateChange
(){
var
start
=
$
(
"
#datepicker
"
).
val
();
var
type
=
$
(
"
#id_dateType
"
).
val
();
var
startdate
=
new
Date
(
start
);
var
nowDayOfWeek
=
(
startdate
.
getDay
()
-
1
+
7
)
%
7
;
var
nowDay
=
startdate
.
getDate
();
var
nowMonth
=
startdate
.
getMonth
()
+
1
;
var
nowYear
=
startdate
.
getYear
();
nowYear
+=
(
nowYear
<
2000
)
?
1900
:
0
;
if
(
type
==
'
day
'
){
$
(
"
#datepicker
"
).
val
(
formatDate
(
startdate
));
$
(
"
#endDate
"
).
val
(
formatDate
(
new
Date
(
startdate
.
getTime
()
+
24
*
60
*
60
*
1000
)));
}
else
if
(
type
==
'
week
'
){
var
startDateLong
=
startdate
.
getTime
();
var
realStartTime
=
new
Date
(
startdate
.
getTime
()
-
nowDayOfWeek
*
24
*
60
*
60
*
1000
);
var
realEndTime
=
new
Date
(
realStartTime
.
getTime
()
+
7
*
24
*
60
*
60
*
1000
);
$
(
"
#datepicker
"
).
val
(
formatDate
(
realStartTime
));
$
(
"
#endDate
"
).
val
(
formatDate
(
realEndTime
));
}
else
if
(
type
==
'
month
'
){
var
monthStartDate
=
new
Date
(
nowYear
,
nowMonth
,
1
);
var
monthEndDate
=
new
Date
(
nowYear
,
nowMonth
+
1
,
1
);
$
(
"
#datepicker
"
).
val
(
formatDate
(
monthStartDate
));
$
(
"
#endDate
"
).
val
(
formatDate
(
monthEndDate
));
}
}
$
(
"
#id_selfDefinedType
"
).
val
(
$
(
"
#hiddenSelfQueryOption
"
).
val
())
;
$
(
"
#id_dateType
"
).
val
(
$
(
"
#hiddenDateType
"
).
val
())
;
//(function basic_time(container) {
// var real = data.values[0];
// var
// d1 = [],
// start = new Date("2012/05/14 00:00").getTime(),
// options,
// graph,
// i, x, o;
//
// for (i = 0; i < 192; i++) {
// x = start+(i*1000*3600);
// d1.push([x, real[i]]);
// }
//
// options = {
// xaxis : {
// mode : 'time',
// labelsAngle : 15
// },
// selection : {
// mode : 'x'
// },
// HtmlText : false,
// title : 'Time'
// };
//
// // Draw graph with default options, overwriting with passed options
// function drawGraph (opts) {
//
// // Clone the options, so the 'options' variable always keeps intact.
// o = Flotr._.extend(Flotr._.clone(options), opts || {});
//
// if(opts!=null&&opts.xaxis!=null){
// console.log(opts.xaxis.min);
// console.log(new Date(opts.xaxis.min));
// o.title = "From"+new Date(opts.xaxis.min) +o.title;
// }
// // Return a new graph.
// return Flotr.draw(
// container,
// [ d1 ],
// o
// );
// }
//
// graph = drawGraph();
//
// Flotr.EventAdapter.observe(container, 'flotr:select', function(area){
// // Draw selected area
// graph = drawGraph({
// xaxis : { min : area.x1, max : area.x2, mode : 'time', labelsAngle : 15 },
// yaxis : { min : area.y1, max : area.y2 },
// HtmlText : true
// });
// });
//
// // When graph is clicked, draw the graph with default area.
// Flotr.EventAdapter.observe(container, 'flotr:click', function () { graph = drawGraph(); });
// })(document.getElementById("testGraph"));
\ No newline at end of file
cat-home/src/main/webapp/js/trendGraph.js
浏览文件 @
23276035
...
...
@@ -6,16 +6,12 @@ function formatDate(date) {
var
minute
=
date
.
getMinutes
();
var
second
=
date
.
getSeconds
();
if
(
mymonth
<
10
)
{
mymonth
=
"
0
"
+
mymonth
;
}
if
(
myweekday
<
10
)
{
myweekday
=
"
0
"
+
myweekday
;
}
mymonth
=
mymonth
<
10
?
'
0
'
+
mymonth
:
mymonth
;
myweekday
=
myweekday
<
10
?
'
0
'
+
myweekday
:
myweekday
;
hour
=
hour
<
10
?
'
0
'
+
hour
:
hour
;
minute
=
minute
<
10
?
'
0
'
+
minute
:
minute
;
second
=
second
<
10
?
'
0
'
+
second
:
second
;
return
mymonth
+
"
-
"
+
myweekday
+
"
"
+
hour
+
"
:
"
+
minute
;
return
mymonth
+
"
-
"
+
myweekday
+
"
"
+
hour
+
"
:
"
+
minute
;
}
function
graph
(
container
,
data
)
{
...
...
@@ -33,6 +29,9 @@ function graph(container, data) {
mode
:
'
time
'
,
labelsAngle
:
15
},
yaxis
:
{
min
:
0
},
selection
:
{
mode
:
'
x
'
},
...
...
cat-home/src/main/webapp/jsp/report/heartbeat.jsp
浏览文件 @
23276035
...
...
@@ -6,17 +6,12 @@
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ taglib
prefix=
"res"
uri=
"http://www.unidal.org/webres"
%>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<jsp:useBean
id=
"ctx"
type=
"com.dianping.cat.report.page.heartbeat.Context"
scope=
"request"
/>
<jsp:useBean
id=
"payload"
type=
"com.dianping.cat.report.page.heartbeat.Payload"
scope=
"request"
/>
<jsp:useBean
id=
"model"
type=
"com.dianping.cat.report.page.heartbeat.Model"
scope=
"request"
/>
<jsp:useBean
id=
"ctx"
type=
"com.dianping.cat.report.page.heartbeat.Context"
scope=
"request"
/>
<jsp:useBean
id=
"payload"
type=
"com.dianping.cat.report.page.heartbeat.Payload"
scope=
"request"
/>
<jsp:useBean
id=
"model"
type=
"com.dianping.cat.report.page.heartbeat.Model"
scope=
"request"
/>
<c:set
var=
"report"
value=
"
${
model
.
report
}
"
/>
<a:noSwitchReport
title=
"Heartbeat Report"
navUrlPrefix=
"domain=${model.domain}&ip=${model.ipAddress}"
timestamp=
"
${
w:
format
(
model
.
creatTime
,
'yyyy-MM-dd HH:mm:ss'
)
}
"
>
<a:report
title=
"HeartBeat Report"
navUrlPrefix=
"ip=${model.ipAddress}&domain=${model.domain}"
timestamp=
"
${
w:
format
(
model
.
creatTime
,
'yyyy-MM-dd HH:mm:ss'
)
}
"
>
<jsp:attribute
name=
"subtitle"
>
From ${w:format(report.startTime,'yyyy-MM-dd HH:mm:ss')} to ${w:format(report.endTime,'yyyy-MM-dd HH:mm:ss')}
</jsp:attribute>
...
...
@@ -148,4 +143,4 @@
</table>
</jsp:body>
</a:noSwitchReport>
\ No newline at end of file
</a:report>
\ No newline at end of file
cat-home/src/main/webapp/jsp/report/heartbeatHistoryGraph.jsp
0 → 100644
浏览文件 @
23276035
<%@ page
contentType=
"text/html; charset=utf-8"
%>
<%@ taglib
prefix=
"a"
uri=
"/WEB-INF/app.tld"
%>
<%@ taglib
prefix=
"w"
uri=
"http://www.unidal.org/web/core"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ taglib
prefix=
"res"
uri=
"http://www.unidal.org/webres"
%>
<jsp:useBean
id=
"ctx"
type=
"com.dianping.cat.report.page.heartbeat.Context"
scope=
"request"
/>
<jsp:useBean
id=
"payload"
type=
"com.dianping.cat.report.page.heartbeat.Payload"
scope=
"request"
/>
<jsp:useBean
id=
"model"
type=
"com.dianping.cat.report.page.heartbeat.Model"
scope=
"request"
/>
<a:historyReport
title=
"HeartBeat History Report"
>
<jsp:attribute
name=
"subtitle"
>
From ${w:format(payload.historyStartDate,'yyyy-MM-dd HH:mm:ss')} to ${w:format(payload.historyEndDate,'yyyy-MM-dd HH:mm:ss')}
</jsp:attribute>
<jsp:body>
<res:useCss
value=
"
${
res
.
css
.
local
.
transaction_css
}
"
target=
"head-css"
/>
<res:useJs
value=
"
${
res
.
js
.
local
[
'jquery-1.7.1.js'
]
}
"
target=
"head-js"
/>
<res:useJs
value=
"
${
res
.
js
.
local
[
'flotr2_js'
]
}
"
target=
"head-js"
/>
<res:useJs
value=
"
${
res
.
js
.
local
[
'heartbeatHistory_js'
]
}
"
target=
"head-js"
/>
</br>
<table
class=
"machines"
>
<tr
style=
"text-align: left"
>
<th>
Machines:
<c:forEach
var=
"ip"
items=
"
${
model
.
ips
}
"
>
[
<c:choose>
<c:when
test=
"
${
model
.
ipAddress
eq
ip
}
"
>
<a
href=
"?op=history&domain=${model.domain}&date=${model.date}&ip=${ip}&reportType=${model.reportType}"
class=
"current"
>
${ip}
</a>
</c:when>
<c:otherwise>
<a
href=
"?op=history&domain=${model.domain}&date=${model.date}&ip=${ip}&reportType=${model.reportType}"
>
${ip}
</a>
</c:otherwise>
</c:choose>
]
</c:forEach>
</th>
</tr>
</table>
<br>
<table
class=
"graph"
>
<tr>
<th
colspan=
"3"
>
Thread Info
</th>
</tr>
<tr>
<td><div
id=
"ActiveThread"
class=
"graph"
></div></td>
<td><div
id=
"DaemonThread"
class=
"graph"
></div></td>
<td><div
id=
"TotalStartedThread"
class=
"graph"
></div></td>
</tr>
<tr>
<td><div
id=
"StartedThread"
class=
"graph"
></div></td>
<td><div
id=
"CatStartedThread"
class=
"graph"
></div></td>
<td><div
id=
"PigeonStartedThread"
class=
"graph"
></div></td>
</tr>
<tr>
<th
colspan=
"3"
>
System Info
</th>
</tr>
<tr>
<td><div
id=
"NewGcCount"
class=
"graph"
></div></td>
<td><div
id=
"OldGcCount"
class=
"graph"
></div></td>
<td><div
id=
"SystemLoadAverage"
class=
"graph"
></div></td>
</tr>
<tr>
<th
colspan=
"3"
>
Memery Info
</th>
</tr>
<tr>
<td><div
id=
"MemoryFree"
class=
"graph"
></div></td>
<td><div
id=
"HeapUsage"
class=
"graph"
></div></td>
<td><div
id=
"NoneHeapUsage"
class=
"graph"
></div></td>
</tr>
<tr>
<td
style=
"display:none"
>
<div
id =
"MemoryFreeData"
>
${model.memoryFreeGraph}
</div>
<div
id =
"HeapUsageData"
>
${model.heapUsageGraph}
</div>
<div
id =
"NoneHeapUsageData"
>
${model.noneHeapUsageGraph}
</div>
</td>
</tr>
<tr>
<th
colspan=
"3"
>
Disk Info
</th>
</tr>
<tr>
<td><div
id=
"diskRoot"
class=
"graph"
></div></td>
<td><div
id=
"diskData"
class=
"graph"
></div></td>
</tr>
<tr>
<th
colspan=
"3"
>
Cat Message Info
</th>
</tr>
<tr>
<td><div
id=
"CatMessageProduced"
class=
"graph"
></div></td>
<td><div
id=
"CatMessageOverflow"
class=
"graph"
></div></td>
<td><div
id=
"CatMessageSize"
class=
"graph"
></div></td>
</tr>
<tr>
<td
style=
"display:none"
>
<div
id =
"CatMessageProducedData"
>
${model.catMessageProducedGraph}
</div>
<div
id =
"CatMessageOverflowData"
>
${model.catMessageOverflowGraph}
</div>
<div
id =
"CatMessageSizeData"
>
${model.catMessageSizeGraph}
</div>
</td>
</tr>
</table>
<script>
//01
var
activeThreadGraphData
=
$
{
model
.
activeThreadGraph
};
graph
(
document
.
getElementById
(
'
ActiveThread
'
),
activeThreadGraphData
);
//02
var
daemonThreadGraphData
=
$
{
model
.
daemonThreadGraph
};
graph
(
document
.
getElementById
(
'
DaemonThread
'
),
daemonThreadGraphData
);
//03
var
totalThreadGraphData
=
$
{
model
.
totalThreadGraph
};
graph
(
document
.
getElementById
(
'
TotalStartedThread
'
),
totalThreadGraphData
);
//04
var
startedThreadGraphData
=
$
{
model
.
startedThreadGraph
};
graph
(
document
.
getElementById
(
'
StartedThread
'
),
startedThreadGraphData
);
//05
var
catThreadGraphData
=
$
{
model
.
catThreadGraph
};
graph
(
document
.
getElementById
(
'
CatStartedThread
'
),
catThreadGraphData
);
//06
var
pigeonThreadGraphData
=
$
{
model
.
pigeonThreadGraph
};
graph
(
document
.
getElementById
(
'
PigeonStartedThread
'
),
pigeonThreadGraphData
);
//07
var
newGcCountGraphData
=
$
{
model
.
newGcCountGraph
};
graph
(
document
.
getElementById
(
'
NewGcCount
'
),
newGcCountGraphData
);
//08
var
oldGcCountGraphData
=
$
{
model
.
oldGcCountGraph
};
graph
(
document
.
getElementById
(
'
OldGcCount
'
),
oldGcCountGraphData
);
//09
var
systemLoadAverageGraphData
=
$
{
model
.
systemLoadAverageGraph
};
graph
(
document
.
getElementById
(
'
SystemLoadAverage
'
),
systemLoadAverageGraphData
);
//10
var
memoryFreeGraphData
=
$
{
model
.
memoryFreeGraph
};
graph
(
document
.
getElementById
(
'
MemoryFree
'
),
memoryFreeGraphData
);
//11
var
heapUsageGraphData
=
$
{
model
.
heapUsageGraph
};
graph
(
document
.
getElementById
(
'
HeapUsage
'
),
heapUsageGraphData
);
//12
var
noneHeapUsageGraphData
=
$
{
model
.
noneHeapUsageGraph
};
graph
(
document
.
getElementById
(
'
NoneHeapUsage
'
),
noneHeapUsageGraphData
);
//13
var
diskRootGraphData
=
$
{
model
.
diskRootGraph
};
graph
(
document
.
getElementById
(
'
diskRoot
'
),
diskRootGraphData
);
//14
var
diskDataGraphData
=
$
{
model
.
diskDataGraph
};
graph
(
document
.
getElementById
(
'
diskData
'
),
diskDataGraphData
);
//16
var
catMessageProducedGraphData
=
$
{
model
.
catMessageProducedGraph
};
graph
(
document
.
getElementById
(
'
CatMessageProduced
'
),
catMessageProducedGraphData
);
//17
var
catMessageOverflowGraphData
=
$
{
model
.
catMessageOverflowGraph
};
graph
(
document
.
getElementById
(
'
CatMessageOverflow
'
),
catMessageOverflowGraphData
);
//18
var
catMessageSizeGraphData
=
$
{
model
.
catMessageSizeGraph
};
graph
(
document
.
getElementById
(
'
CatMessageSize
'
),
catMessageSizeGraphData
);
</script>
<res:useJs
value=
"
${
res
.
js
.
local
.
transaction_js
}
"
target=
"bottom-js"
/>
</jsp:body>
</a:historyReport>
\ No newline at end of file
cat-home/src/main/webapp/jsp/report/transactionHistoryGraphs.jsp
浏览文件 @
23276035
...
...
@@ -16,14 +16,19 @@
<td><div
id=
"responseTrend"
class=
"graph"
></div></td>
<td><div
id=
"hitTrend"
class=
"graph"
></div></td>
</tr>
<tr><td><div
id=
"errorTrend"
class=
"graph"
></div></td></tr>
<tr><td
style=
"display:none"
>
<div
id =
"responseTrendMeta"
>
${model.responseTrend}
</div>
<div
id =
"hitTrendMeta"
>
${model.hitTrend}
</div>
<div
id =
"errorTrendMeta"
>
${model.errorTrend}
</div>
</td></tr>
</table>
<script
type=
"text/javascript"
>
var
responseTrendData
=
$
{
model
.
responseTrend
};
var
hitTrendData
=
$
{
model
.
hitTrend
};
var
errorTrendData
=
$
{
model
.
errorTrend
};
graph
(
document
.
getElementById
(
'
responseTrend
'
),
responseTrendData
);
graph
(
document
.
getElementById
(
'
hitTrend
'
),
hitTrendData
);
graph
(
document
.
getElementById
(
'
errorTrend
'
),
errorTrendData
);
</script>
cat-home/src/test/java/com/dianping/cat/AllTests.java
浏览文件 @
23276035
...
...
@@ -4,13 +4,19 @@ import org.junit.runner.RunWith;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite.SuiteClasses
;
import
com.dianping.cat.report.graph.ValueTranslaterTest
;
import
com.dianping.cat.report.page.ip.DisplayModelTest
;
import
com.dianping.cat.report.page.ip.location.IPSeekerTest
;
import
com.dianping.cat.report.page.model.EventReportFilterTest
;
import
com.dianping.cat.report.page.model.TransactionReportFilterTest
;
import
com.dianping.cat.report.page.model.event.EventModelServiceTest
;
import
com.dianping.cat.report.page.model.transaction.TransactionModelServiceTest
;
import
com.dianping.cat.report.page.sql.TestComputeStr
;
import
com.dianping.cat.report.page.transaction.GraphDateTest
;
import
com.dianping.cat.report.page.transaction.PayloadTest
;
import
com.dianping.cat.report.page.transaction.TransactionReportMergerTest
;
import
com.dianping.cat.report.task.TaskConsumerTest
;
import
com.dianping.cat.report.task.TaskHelperTest
;
@RunWith
(
Suite
.
class
)
@SuiteClasses
({
...
...
@@ -32,9 +38,22 @@ TransactionModelServiceTest.class,
/* .report.page.transaction */
TransactionReportMergerTest
.
class
,
IPSeekerTest
.
class
/* .report.graph */
ValueTranslaterTest
.
class
,
})
/* .report.page.ip */
DisplayModelTest
.
class
,
IPSeekerTest
.
class
,
/* .report.page.model */
EventReportFilterTest
.
class
,
TransactionReportFilterTest
.
class
,
TestComputeStr
.
class
,
/* . report.page.transcation */
GraphDateTest
.
class
,
PayloadTest
.
class
,
TransactionReportMergerTest
.
class
,
/* .report.task */
TaskConsumerTest
.
class
,
TaskHelperTest
.
class
})
public
class
AllTests
{
}
cat-home/src/test/java/com/dianping/cat/report/page/heartbeat/HeartbeatGraphTest.java
0 → 100755
浏览文件 @
23276035
package
com.dianping.cat.report.page.heartbeat
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.JUnit4
;
import
com.dianping.cat.hadoop.dal.Graph
;
import
com.site.helper.Files
;
import
com.site.lookup.ComponentTestCase
;
@RunWith
(
JUnit4
.
class
)
public
class
HeartbeatGraphTest
extends
ComponentTestCase
{
@Test
public
void
test
()
throws
Exception
{
Handler
handler
=
new
Handler
();
long
time
=
System
.
currentTimeMillis
();
time
=
time
-
time
%
(
3600
*
1000
*
24
);
Date
start
=
new
Date
(
time
-
3600
*
1000
*
24
);
Date
end
=
new
Date
(
time
);
List
<
Graph
>
graphs
=
new
ArrayList
<
Graph
>();
time
=
start
.
getTime
();
for
(;
time
<
end
.
getTime
();
time
+=
3600
*
1000
)
{
Date
addtime
=
new
Date
(
time
);
graphs
.
add
(
creatGraph
(
addtime
));
}
Map
<
String
,
double
[]>
result
=
handler
.
buildHeartbeatDatas
(
start
,
end
,
graphs
);
System
.
out
.
println
(
result
.
size
());
for
(
Entry
<
String
,
double
[]>
entry
:
result
.
entrySet
())
{
System
.
out
.
print
(
entry
.
getKey
()
+
" : "
);
double
sum
=
0
;
double
[]
value
=
entry
.
getValue
();
for
(
int
i
=
0
;
i
<
value
.
length
;
i
++)
{
sum
+=
value
[
i
];
System
.
out
.
print
(
value
[
i
]
+
" "
);
}
System
.
out
.
println
();
if
(
sum
!=
14400
&&
sum
!=
0
)
{
sum
=
sum
*
1024
*
1024
;
}
System
.
out
.
println
(
"sum:"
+
sum
);
}
}
private
Graph
creatGraph
(
Date
start
)
throws
IOException
{
Graph
graph
=
new
Graph
();
graph
.
setCreationDate
(
start
);
graph
.
setDomain
(
"Test"
);
graph
.
setEndDate
(
new
Date
(
start
.
getTime
()
+
3600
*
1000
));
graph
.
setIp
(
"192.168.32.68"
);
graph
.
setName
(
"heartbeat"
);
graph
.
setPeriod
(
start
);
graph
.
setDetailContent
(
getContent
());
return
graph
;
}
private
String
getContent
()
throws
IOException
{
return
Files
.
forIO
().
readFrom
(
getClass
().
getResourceAsStream
(
"detail"
),
"utf-8"
);
}
}
cat-home/src/test/java/com/dianping/cat/report/page/model/TransactionReportFilterTest.java
浏览文件 @
23276035
...
...
@@ -16,7 +16,7 @@ public class TransactionReportFilterTest {
String
source
=
Files
.
forIO
().
readFrom
(
getClass
().
getResourceAsStream
(
"transaction.xml"
),
"utf-8"
);
TransactionReport
report
=
parser
.
parse
(
source
);
TransactionReportFilter
f1
=
new
TransactionReportFilter
(
null
,
null
,
null
);
TransactionReportFilter
f1
=
new
TransactionReportFilter
(
null
,
null
,
"10.1.77.193"
);
String
expected1
=
Files
.
forIO
().
readFrom
(
getClass
().
getResourceAsStream
(
"transaction-type.xml"
),
"utf-8"
);
Assert
.
assertEquals
(
expected1
.
replaceAll
(
"\r"
,
""
),
f1
.
buildXml
(
report
).
replaceAll
(
"\r"
,
""
));
...
...
cat-home/src/test/java/com/dianping/cat/report/page/sql/TestComputeStr.java
浏览文件 @
23276035
...
...
@@ -3,6 +3,8 @@ package com.dianping.cat.report.page.sql;
import
java.util.Arrays
;
import
junit.framework.Assert
;
import
org.junit.Test
;
public
class
TestComputeStr
{
...
...
@@ -11,17 +13,16 @@ public class TestComputeStr {
@Test
public
void
test
()
{
String
s1
=
"0:1,5:1,10:1,15:1,20:1,25:1,30:1,35:1,40:1,45:1,50:1,55:1,60:1"
;
//String s2="0:1,5:1,10:1,15:1,20:2,25:2,30:2,35:2,40:3,45:3,50:4,55:4,60:4";
String
s7
=
"0:1,5:1,10:1,15:1,20:2,25:2,31:2,32:2,33:3,34:3,36:4,37:4,38:4"
;
String
s3
=
"0:0,1:0,2:0,4:3,8:2,16:0,32:0,64:0,128:0,256:0,512:0,1024:0,2048:0,4096:0,8192:0,16384:0,32768:0,65536:0"
;
//String s4="0:0.0,5:0.0,10:0.0,15:0.0,20:0.0,25:0.0,30:0.0,35:0.0,40:0.0,45:0.0,50:0.0,55:2.0,60:0.0";
String
t1
=
handler
.
compute
(
Arrays
.
asList
(
s1
,
new
String
(
s1
),
new
String
(
s1
)));
String
t2
=
handler
.
compute
(
Arrays
.
asList
(
s1
,
new
String
(
s1
),
new
String
(
s1
)));
String
t3
=
handler
.
computeDuration
(
Arrays
.
asList
(
s3
),
Arrays
.
asList
(
s3
));
String
t4
=
handler
.
compute
(
Arrays
.
asList
(
s1
,
s7
));
System
.
out
.
println
(
t1
);
System
.
out
.
println
(
t2
);
System
.
out
.
println
(
t3
);
System
.
out
.
println
(
t4
);
Assert
.
assertEquals
(
"0:3,5:3,10:3,15:3,20:3,25:3,30:3,35:3,40:3,45:3,50:3,55:3,60:3"
,
t1
);
Assert
.
assertEquals
(
"0:3,5:3,10:3,15:3,20:3,25:3,30:3,35:3,40:3,45:3,50:3,55:3,60:3"
,
t2
);
Assert
.
assertEquals
(
"0:0.0,5:0.0,10:0.0,15:3.0,20:2.0,25:0.0,30:0.0,35:0.0,40:0.0,45:0.0,50:0.0,55:0.0,60:0.0"
,
t3
);
Assert
.
assertEquals
(
"0:2,5:2,10:2,15:2,20:3,25:3,30:1,31:2,32:2,33:3,34:3,35:1,36:4,37:4,38:4,40:1,45:1,50:1,55:1,60:1"
,
t4
);
}
}
cat-home/src/test/java/com/dianping/cat/report/page/transaction/GraphDateTest.java
浏览文件 @
23276035
...
...
@@ -15,116 +15,125 @@ import org.junit.Test;
import
com.dianping.cat.hadoop.dal.Graph
;
public
class
GraphDateTest
{
public
static
final
long
ONE_HOUR
=
3600
*
1000L
;
@Test
public
void
testBuildGraphDatesByType
(){
Handler
handler
=
new
Handler
();
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
"yyyyMMddHH"
);
public
void
testBuildGraphDatesByType
()
{
Handler
handler
=
new
Handler
();
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
"yyyyMMddHH"
);
try
{
Date
start
=
sf
.
parse
(
"2012060612"
);
Date
end
=
sf
.
parse
(
"2012060622"
);
List
<
Graph
>
graphs
=
buildGraph
(
start
,
end
);
String
type
=
"URL"
;
Map
<
String
,
double
[]>
graphDates
=
handler
.
buildGraphDates
(
start
,
end
,
type
,
null
,
graphs
);
double
[]
total_count
={
15
,
15
,
15
,
15
,
15
,
15
,
15
,
15
,
15
,
15
};
double
[]
failure_count
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
double
[]
min
=
{
11.836555
,
11.836555
,
11.836555
,
11.836555
,
11.836555
,
11.836555
,
11.836555
,
11.836555
,
11.836555
,
11.836555
};
double
[]
max
=
{
225244.724
,
225244.724
,
225244.724
,
225244.724
,
225244.724
,
225244.724
,
225244.724
,
225244.724
,
225244.724
,
225244.724
};
double
[]
sum
=
{
234038.7
,
234038.7
,
234038.7
,
234038.7
,
234038.7
,
234038.7
,
234038.7
,
234038.7
,
234038.7
,
234038.7
};
double
[]
sum2
={
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
};
double
[]
expectTotalCount
=
graphDates
.
get
(
"total_count"
);
double
[]
expectFailureCount
=
graphDates
.
get
(
"failure_count"
);
double
[]
expectMin
=
graphDates
.
get
(
"min"
);
double
[]
expectMax
=
graphDates
.
get
(
"max"
);
double
[]
expectSum2
=
graphDates
.
get
(
"sum2"
);
double
[]
expectSum
=
graphDates
.
get
(
"sum"
);
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
total_count
,
expectTotalCount
)
);
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
failure_count
,
expectFailureCount
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
min
,
expectMin
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
max
,
expectMax
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
sum
,
expectSum
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
sum2
,
expectSum2
));
}
catch
(
ParseException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
Date
start
=
sf
.
parse
(
"2012060612"
);
Date
end
=
sf
.
parse
(
"2012060622"
);
List
<
Graph
>
graphs
=
buildGraph
(
start
,
end
);
String
type
=
"URL"
;
Map
<
String
,
double
[]>
graphDates
=
handler
.
buildGraphDates
(
start
,
end
,
type
,
null
,
graphs
);
double
[]
total_count
=
{
15
,
15
,
15
,
15
,
15
,
15
,
15
,
15
,
15
,
15
};
double
[]
failure_count
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
double
[]
min
=
{
11.836555
,
11.836555
,
11.836555
,
11.836555
,
11.836555
,
11.836555
,
11.836555
,
11.836555
,
11.836555
,
11.836555
};
double
[]
max
=
{
225244.724
,
225244.724
,
225244.724
,
225244.724
,
225244.724
,
225244.724
,
225244.724
,
225244.724
,
225244.724
,
225244.724
};
double
[]
sum
=
{
234038.7
,
234038.7
,
234038.7
,
234038.7
,
234038.7
,
234038.7
,
234038.7
,
234038.7
,
234038.7
,
234038.7
};
double
[]
sum2
=
{
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
,
5.07448582695E10
};
double
[]
expectTotalCount
=
graphDates
.
get
(
"total_count"
);
double
[]
expectFailureCount
=
graphDates
.
get
(
"failure_count"
);
double
[]
expectMin
=
graphDates
.
get
(
"min"
);
double
[]
expectMax
=
graphDates
.
get
(
"max"
);
double
[]
expectSum2
=
graphDates
.
get
(
"sum2"
);
double
[]
expectSum
=
graphDates
.
get
(
"sum"
);
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
total_count
,
expectTotalCount
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
failure_count
,
expectFailureCount
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
min
,
expectMin
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
max
,
expectMax
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
sum
,
expectSum
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
sum2
,
expectSum2
));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
@Test
public
void
testBuildGraphDatesByTypeAndName
(){
Handler
handler
=
new
Handler
();
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
"yyyyMMddHH"
);
public
void
testBuildGraphDatesByTypeAndName
()
{
Handler
handler
=
new
Handler
();
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
"yyyyMMddHH"
);
try
{
Date
start
=
sf
.
parse
(
"2012060612"
);
Date
end
=
sf
.
parse
(
"2012060622"
);
List
<
Graph
>
graphs
=
buildGraph
(
start
,
end
);
String
type
=
"Result"
;
String
name
=
"cacheService:cacheConfigService_1.0.0:getKeyConfigurations"
;
Map
<
String
,
double
[]>
graphDates
=
handler
.
buildGraphDates
(
start
,
end
,
type
,
name
,
graphs
);
double
[]
total_count
=
{
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
};
double
[]
failure_count
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
double
[]
min
=
{
6.83
,
6.83
,
6.83
,
6.83
,
6.83
,
6.83
,
6.83
,
6.83
,
6.83
,
6.83
};
double
[]
max
=
{
7.583
,
7.583
,
7.583
,
7.583
,
7.583
,
7.583
,
7.583
,
7.583
,
7.583
,
7.583
};
double
[]
sum
=
{
43.2
,
43.2
,
43.2
,
43.2
,
43.2
,
43.2
,
43.2
,
43.2
,
43.2
,
43.2
};
double
[]
sum2
=
{
311.0
,
311.0
,
311.0
,
311.0
,
311.0
,
311.0
,
311.0
,
311.0
,
311.0
,
311.0
};
double
[]
expectTotalCount
=
graphDates
.
get
(
"total_count"
);
double
[]
expectFailureCount
=
graphDates
.
get
(
"failure_count"
);
double
[]
expectMin
=
graphDates
.
get
(
"min"
);
double
[]
expectMax
=
graphDates
.
get
(
"max"
);
double
[]
expectSum2
=
graphDates
.
get
(
"sum2"
);
double
[]
expectSum
=
graphDates
.
get
(
"sum"
);
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
total_count
,
expectTotalCount
)
);
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
failure_count
,
expectFailure
Count
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
min
,
expectMin
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
max
,
expectMax
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
sum
,
expectSum
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
sum2
,
expectSum2
));
}
catch
(
ParseException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
Date
start
=
sf
.
parse
(
"2012060612"
);
Date
end
=
sf
.
parse
(
"2012060622"
);
List
<
Graph
>
graphs
=
buildGraph
(
start
,
end
);
String
type
=
"Result"
;
String
name
=
"cacheService:cacheConfigService_1.0.0:getKeyConfigurations"
;
Map
<
String
,
double
[]>
graphDates
=
handler
.
buildGraphDates
(
start
,
end
,
type
,
name
,
graphs
);
double
[]
total_count
=
{
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
};
double
[]
failure_count
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
double
[]
min
=
{
6.83
,
6.83
,
6.83
,
6.83
,
6.83
,
6.83
,
6.83
,
6.83
,
6.83
,
6.83
};
double
[]
max
=
{
7.583
,
7.583
,
7.583
,
7.583
,
7.583
,
7.583
,
7.583
,
7.583
,
7.583
,
7.583
};
double
[]
sum
=
{
43.2
,
43.2
,
43.2
,
43.2
,
43.2
,
43.2
,
43.2
,
43.2
,
43.2
,
43.2
};
double
[]
sum2
=
{
311.0
,
311.0
,
311.0
,
311.0
,
311.0
,
311.0
,
311.0
,
311.0
,
311.0
,
311.0
};
double
[]
expectTotalCount
=
graphDates
.
get
(
"total_count"
);
double
[]
expectFailureCount
=
graphDates
.
get
(
"failure_count"
);
double
[]
expectMin
=
graphDates
.
get
(
"min"
);
double
[]
expectMax
=
graphDates
.
get
(
"max"
);
double
[]
expectSum2
=
graphDates
.
get
(
"sum2"
);
double
[]
expectSum
=
graphDates
.
get
(
"sum"
);
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
total_count
,
expectTotal
Count
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
failure_count
,
expectFailureCount
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
min
,
expectMin
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
max
,
expectMax
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
sum
,
expectSum
));
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
sum2
,
expectSum2
));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
@Test
public
void
testBuildGraphDatesEmpty
(){
Handler
handler
=
new
Handler
();
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
"yyyyMMddHH"
);
public
void
testBuildGraphDatesEmpty
()
{
Handler
handler
=
new
Handler
();
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
"yyyyMMddHH"
);
try
{
Date
start
=
sf
.
parse
(
"2012060612"
);
Date
end
=
sf
.
parse
(
"2012060622"
);
List
<
Graph
>
graphs
=
buildGraph
(
start
,
end
);
String
type
=
"Result"
;
String
name
=
"Result"
;
Map
<
String
,
double
[]>
graphDates
=
handler
.
buildGraphDates
(
start
,
end
,
type
,
name
,
graphs
);
double
[]
expectSum
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
double
[]
sum
=
graphDates
.
get
(
"sum"
);
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
sum
,
expectSum
));
}
catch
(
ParseException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
Date
start
=
sf
.
parse
(
"2012060612"
);
Date
end
=
sf
.
parse
(
"2012060622"
);
List
<
Graph
>
graphs
=
buildGraph
(
start
,
end
);
String
type
=
"Result"
;
String
name
=
"Result"
;
Map
<
String
,
double
[]>
graphDates
=
handler
.
buildGraphDates
(
start
,
end
,
type
,
name
,
graphs
);
double
[]
expectSum
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
double
[]
sum
=
graphDates
.
get
(
"sum"
);
Assert
.
assertEquals
(
true
,
Arrays
.
equals
(
sum
,
expectSum
));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
private
List
<
Graph
>
buildGraph
(
Date
start
,
Date
end
)
{
private
List
<
Graph
>
buildGraph
(
Date
start
,
Date
end
)
{
List
<
Graph
>
graphs
=
new
ArrayList
<
Graph
>();
String
summary
=
"Call 13704 0 0.993 505.822 133680.3 7678055.5"
+
"\n"
+
"Result 13704 0 0.096 73.104 13377.4 156669.3"
+
"\n"
+
"Task 26 0 36.406555 60.022 1102.4 47641.6"
+
"\n"
+
"URL 15 0 11.836555 225244.724 234038.7 5.07448582695E10"
+
"\n"
;
String
detail
=
"Call cacheService:cacheConfigService_1.0.0:getCacheConfigurations 6 0 261.046 481.68 2369.7 989806.8"
+
"\n"
+
"Call cacheService:cacheConfigService_1.0.0:getKeyConfigurations 6 0 40.301 43.161 250.6 10472.6"
+
"\n"
+
"Call shopService:shopService_1.0.0:findShopRegions 2348 0 1.874 505.822 31048.6 1893017.0"
+
"\n"
+
"Call shopService:shopService_1.0.0:findShops 11344 0 0.993 294.569 100011.4 4784759.1"
+
"\n"
+
"Result cacheService:cacheConfigService_1.0.0:getCacheConfigurations 6 0 28.769 64.718 302.0 16596.8"
+
"\n"
+
"Result cacheService:cacheConfigService_1.0.0:getKeyConfigurations 6 0 6.83 7.583 43.2 311.0"
;
String
summary
=
"Call 13704 0 0.993 505.822 133680.3 7678055.5"
+
"\n"
+
"Result 13704 0 0.096 73.104 13377.4 156669.3"
+
"\n"
+
"Task 26 0 36.406555 60.022 1102.4 47641.6"
+
"\n"
+
"URL 15 0 11.836555 225244.724 234038.7 5.07448582695E10"
+
"\n"
;
String
detail
=
"Call cacheService:cacheConfigService_1.0.0:getCacheConfigurations 6 0 261.046 481.68 2369.7 989806.8"
+
"\n"
+
"Call cacheService:cacheConfigService_1.0.0:getKeyConfigurations 6 0 40.301 43.161 250.6 10472.6"
+
"\n"
+
"Call shopService:shopService_1.0.0:findShopRegions 2348 0 1.874 505.822 31048.6 1893017.0"
+
"\n"
+
"Call shopService:shopService_1.0.0:findShops 11344 0 0.993 294.569 100011.4 4784759.1"
+
"\n"
+
"Result cacheService:cacheConfigService_1.0.0:getCacheConfigurations 6 0 28.769 64.718 302.0 16596.8"
+
"\n"
+
"Result cacheService:cacheConfigService_1.0.0:getKeyConfigurations 6 0 6.83 7.583 43.2 311.0"
;
List
<
Date
>
periods
=
new
ArrayList
<
Date
>();
for
(
long
i
=
start
.
getTime
();
i
<
end
.
getTime
();
i
=
i
+
ONE_HOUR
)
{
periods
.
add
(
new
Date
(
i
));
}
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
Graph
graph
=
new
Graph
();
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
Graph
graph
=
new
Graph
();
graph
.
setDetailContent
(
detail
);
graph
.
setSummaryContent
(
summary
);
graphs
.
add
(
graph
);
...
...
cat-home/src/test/java/com/dianping/cat/report/page/transaction/PayloadTest.java
浏览文件 @
23276035
...
...
@@ -40,7 +40,7 @@ public class PayloadTest {
String
currentHour
=
sdf
.
format
(
new
Date
(
now
-
ONE_HOUR
));
payload
.
setDate
(
currentHour
);
checkDate
(
payload
,
2
,
now
+
ONE_HOUR
,
ModelPeriod
.
FUTURE
);
checkDate
(
payload
,
2
,
now
,
ModelPeriod
.
CURRENT
);
checkDate
(
payload
,
1
,
now
,
ModelPeriod
.
CURRENT
);
checkDate
(
payload
,
0
,
now
-
ONE_HOUR
,
ModelPeriod
.
LAST
);
checkDate
(
payload
,
-
1
,
now
-
2
*
ONE_HOUR
,
ModelPeriod
.
HISTORICAL
);
...
...
@@ -48,7 +48,7 @@ public class PayloadTest {
currentHour
=
sdf
.
format
(
new
Date
(
now
-
2
*
ONE_HOUR
));
payload
.
setDate
(
currentHour
);
checkDate
(
payload
,
3
,
now
+
ONE_HOUR
,
ModelPeriod
.
FUTURE
);
checkDate
(
payload
,
3
,
now
,
ModelPeriod
.
CURRENT
);
checkDate
(
payload
,
2
,
now
,
ModelPeriod
.
CURRENT
);
checkDate
(
payload
,
1
,
now
-
ONE_HOUR
,
ModelPeriod
.
LAST
);
checkDate
(
payload
,
0
,
now
-
2
*
ONE_HOUR
,
ModelPeriod
.
HISTORICAL
);
...
...
@@ -100,7 +100,7 @@ public class PayloadTest {
payload
.
computeStartDate
();
checkDate
(
lastOne
,
payload
.
getHistoryStartDate
());
checkDate
(
current
,
payload
.
getHistoryEndDate
());
payload
.
setStep
(
1
);
payload
.
computeStartDate
();
checkDate
(
lastOne
,
payload
.
getHistoryStartDate
());
...
...
@@ -124,7 +124,7 @@ public class PayloadTest {
int
weekOfDay
=
cal
.
get
(
Calendar
.
DAY_OF_WEEK
);
temp
=
temp
-
24
*
(
weekOfDay
-
1
)
*
ONE_HOUR
;
temp
=
temp
+
24
*
ONE_HOUR
;
temp
=
temp
+
24
*
ONE_HOUR
;
Date
lastTwoWeek
=
new
Date
(
temp
-
7
*
2
*
ONE_DAY
);
Date
lastOneWeek
=
new
Date
(
temp
-
7
*
ONE_DAY
);
Date
currentWeek
=
new
Date
(
temp
);
...
...
@@ -167,7 +167,7 @@ public class PayloadTest {
String
lastTwo
=
"2012040100"
;
String
lastOne
=
"2012050100"
;
String
current
=
"2012060100"
;
payload
.
setDate
(
sdf
.
format
(
input
));
payload
.
setStep
(-
1
);
...
...
cat-home/src/test/java/com/dianping/cat/report/page/transaction/TransactionReportMergerTest.java
浏览文件 @
23276035
...
...
@@ -66,6 +66,7 @@ public class TransactionReportMergerTest {
merger
.
setAllName
(
true
);
merger
.
setType
(
"URL"
);
System
.
out
.
println
(
""
);
reportOld
.
accept
(
merger
);
reportNew
.
accept
(
merger
);
...
...
cat-home/src/test/resources/com/dianping/cat/report/page/heartbeat/detail
0 → 100644
浏览文件 @
23276035
ActiveThread 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
CatMessageOverflow 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
CatMessageProduced 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
CatMessageSize 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
CatThreadCount 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
DaemonThread 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
Disk / 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
Disk /data 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
HeapUsage 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
MemoryFree 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
NewGcCount 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
NoneHeapUsage 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
OldGcCount 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
PigeonStartedThread 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
SystemLoadAverage 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
TotalStartedThread 10 10 10 10 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
cat-home/src/test/resources/com/dianping/cat/report/page/model/event-name.xml
浏览文件 @
23276035
<event-report
domain=
"
Cat"
startTime=
"2012-02-16 23:00:00"
endTime=
"2012-02-16 23:59:00
"
>
<event-report
domain=
"
MobileApi"
startTime=
"2012-06-18 14:00:00"
endTime=
"2012-06-18 14:59:59
"
>
<domain>
Cat
</domain>
<
type
id=
"URL"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
>
<name
id=
"home"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl
>
<
/name
>
<name
id=
"service"
totalCount=
"8
"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
20120216/23/Cat/b10bdefb-1eca-45e1-a9c3-52367078b5a2.html
</successMessageUrl>
</name
>
<name
id=
"t"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<
successMessageUrl>
20120216/23/Cat/8e7c91a0-7549-4b13-b43b-252b2a6ef4bb.html
</successMessageUrl
>
</name>
<name
id=
"ip"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<
successMessageUrl>
20120216/23/Cat/2029c32e-b692-4e43-8eaf-96b8d6c846a2.html
</successMessageUrl
>
</
nam
e>
</
typ
e>
<
domain>
MobileApi
</domain
>
<ip>
10.1.77.193
</ip
>
<machine
ip=
"10.1.77.193"
>
<
type
id=
"URL"
totalCount=
"24"
failCount=
"0"
failPercent=
"0.00"
>
<name
id=
"ClientInfo"
totalCount=
"12
"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl
>
</name
>
<
name
id=
"Payload"
totalCount=
"12"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl
>
<
/name
>
</
typ
e>
</
machin
e>
</event-report>
cat-home/src/test/resources/com/dianping/cat/report/page/model/event-type.xml
浏览文件 @
23276035
<event-report
domain=
"
Cat"
startTime=
"2012-02-16 23:00:00"
endTime=
"2012-02-16 23:59:00
"
>
<event-report
domain=
"
MobileApi"
startTime=
"2012-06-18 14:00:00"
endTime=
"2012-06-18 14:59:59
"
>
<domain>
Cat
</domain>
<type
id=
"URL"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
<type
id=
"MVC"
totalCount=
"33"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
<type
id=
"NEW1"
totalCount=
"33"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
<domain>
MobileApi
</domain>
<ip>
10.1.77.193
</ip>
<machine
ip=
"10.1.77.193"
>
<type
id=
"SQL.PARAM"
totalCount=
"507"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999254922-0
</successMessageUrl>
</type>
<type
id=
"URL"
totalCount=
"24"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
</type>
<type
id=
"User"
totalCount=
"12"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
</type>
<type
id=
"Mobile"
totalCount=
"13"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
</type>
<type
id=
"Response"
totalCount=
"12"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
</type>
<type
id=
"RemoteCall"
totalCount=
"4"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002655592-0
</successMessageUrl>
</type>
<type
id=
"PigeonRespone"
totalCount=
"2"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002655816-0
</successMessageUrl>
</type>
</machine>
</event-report>
cat-home/src/test/resources/com/dianping/cat/report/page/model/event.xml
浏览文件 @
23276035
<event-report
domain=
"Cat"
startTime=
"2012-02-16 23:00:00"
endTime=
"2012-02-16 23:59:00"
>
<domain>
Cat
</domain>
<type
id=
"URL"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"194.0"
avg=
"47.1"
sum=
"518.0"
sum2=
"73942.0"
std=
"67.1"
>
<name
id=
"home"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"175.0"
max=
"175.0"
avg=
"175.0"
sum=
"175.0"
sum2=
"30625.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
<range
minute=
"5"
count=
"123"
events=
"3"
/>
<range
minute=
"10"
count=
"123"
events=
"3"
/>
</name>
<name
id=
"service"
totalCount=
"8"
failCount=
"0"
failPercent=
"0.00"
min=
"1.0"
max=
"58.0"
avg=
"13.0"
sum=
"104.0"
sum2=
"3952.0"
std=
"18.0"
>
<successMessageUrl>
20120216/23/Cat/b10bdefb-1eca-45e1-a9c3-52367078b5a2.html
</successMessageUrl>
</name>
<name
id=
"t"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"193.0"
max=
"193.0"
avg=
"193.0"
sum=
"193.0"
sum2=
"37249.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/8e7c91a0-7549-4b13-b43b-252b2a6ef4bb.html
</successMessageUrl>
</name>
<name
id=
"ip"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"46.0"
max=
"46.0"
avg=
"46.0"
sum=
"46.0"
sum2=
"2116.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/2029c32e-b692-4e43-8eaf-96b8d6c846a2.html
</successMessageUrl>
</name>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
<type
id=
"MVC"
totalCount=
"33"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"191.0"
avg=
"15.1"
sum=
"499.0"
sum2=
"68377.0"
std=
"42.9"
>
<name
id=
"InboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"17.0"
avg=
"1.5"
sum=
"17.0"
sum2=
"289.0"
std=
"4.9"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"TransitionPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"4.9E-324"
avg=
"0.0"
sum=
"0.0"
sum2=
"0.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"OutboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"1.0"
max=
"191.0"
avg=
"43.8"
sum=
"482.0"
sum2=
"68088.0"
std=
"65.3"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
<type
id=
"NEW1"
totalCount=
"33"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"191.0"
avg=
"15.1"
sum=
"499.0"
sum2=
"68377.0"
std=
"42.9"
>
<name
id=
"InboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"17.0"
avg=
"1.5"
sum=
"17.0"
sum2=
"289.0"
std=
"4.9"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"TransitionPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"4.9E-324"
avg=
"0.0"
sum=
"0.0"
sum2=
"0.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"OutboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"1.0"
max=
"191.0"
avg=
"43.8"
sum=
"482.0"
sum2=
"68088.0"
std=
"65.3"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
</event-report>
<event-report
domain=
"MobileApi"
startTime=
"2012-06-18 14:00:00"
endTime=
"2012-06-18 14:59:59"
>
<domain>
Cat
</domain>
<domain>
MobileApi
</domain>
<ip>
10.1.77.193
</ip>
<machine
ip=
"10.1.77.193"
>
<type
id=
"SQL.PARAM"
totalCount=
"507"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999254922-0
</successMessageUrl>
<name
id=
"APIBadge.getBadgeTaskList"
totalCount=
"60"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999254922-0
</successMessageUrl>
<range
value=
"0"
count=
"5"
fails=
"0"
/>
<range
value=
"5"
count=
"5"
fails=
"0"
/>
<range
value=
"10"
count=
"5"
fails=
"0"
/>
<range
value=
"15"
count=
"5"
fails=
"0"
/>
<range
value=
"20"
count=
"5"
fails=
"0"
/>
<range
value=
"25"
count=
"5"
fails=
"0"
/>
<range
value=
"30"
count=
"5"
fails=
"0"
/>
<range
value=
"35"
count=
"5"
fails=
"0"
/>
<range
value=
"40"
count=
"5"
fails=
"0"
/>
<range
value=
"45"
count=
"5"
fails=
"0"
/>
<range
value=
"50"
count=
"5"
fails=
"0"
/>
<range
value=
"55"
count=
"5"
fails=
"0"
/>
</name>
<name
id=
"APIAnnounce.getValid"
totalCount=
"120"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999254947-0
</successMessageUrl>
<range
value=
"0"
count=
"10"
fails=
"0"
/>
<range
value=
"5"
count=
"10"
fails=
"0"
/>
<range
value=
"10"
count=
"10"
fails=
"0"
/>
<range
value=
"15"
count=
"10"
fails=
"0"
/>
<range
value=
"20"
count=
"10"
fails=
"0"
/>
<range
value=
"25"
count=
"10"
fails=
"0"
/>
<range
value=
"30"
count=
"10"
fails=
"0"
/>
<range
value=
"35"
count=
"10"
fails=
"0"
/>
<range
value=
"40"
count=
"10"
fails=
"0"
/>
<range
value=
"45"
count=
"10"
fails=
"0"
/>
<range
value=
"50"
count=
"10"
fails=
"0"
/>
<range
value=
"55"
count=
"10"
fails=
"0"
/>
</name>
<name
id=
"APICampaign.getCampaignCacheList"
totalCount=
"5"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999454591-0
</successMessageUrl>
<range
value=
"0"
count=
"1"
fails=
"0"
/>
<range
value=
"20"
count=
"1"
fails=
"0"
/>
<range
value=
"35"
count=
"1"
fails=
"0"
/>
<range
value=
"50"
count=
"1"
fails=
"0"
/>
<range
value=
"55"
count=
"1"
fails=
"0"
/>
</name>
<name
id=
"APIPush.getAndroidPushItems"
totalCount=
"6"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999658957-0
</successMessageUrl>
<range
value=
"5"
count=
"1"
fails=
"0"
/>
<range
value=
"15"
count=
"1"
fails=
"0"
/>
<range
value=
"25"
count=
"1"
fails=
"0"
/>
<range
value=
"35"
count=
"1"
fails=
"0"
/>
<range
value=
"45"
count=
"1"
fails=
"0"
/>
<range
value=
"55"
count=
"1"
fails=
"0"
/>
</name>
<name
id=
"APICommonToken.queryByType"
totalCount=
"4"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999663688-0
</successMessageUrl>
<range
value=
"5"
count=
"1"
fails=
"0"
/>
<range
value=
"55"
count=
"3"
fails=
"0"
/>
</name>
<name
id=
"APILocation.getOffset"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999968913-0
</successMessageUrl>
<range
value=
"10"
count=
"1"
fails=
"0"
/>
</name>
<name
id=
"APIRegion.getHotRegionList"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999975733-0
</successMessageUrl>
<range
value=
"10"
count=
"1"
fails=
"0"
/>
</name>
<name
id=
"APICategory.getCNTreeList"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999975894-0
</successMessageUrl>
<range
value=
"10"
count=
"1"
fails=
"0"
/>
</name>
<name
id=
"APICategory.getCNTreeChildrenList"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999975894-0
</successMessageUrl>
<range
value=
"10"
count=
"1"
fails=
"0"
/>
</name>
<name
id=
"APILocateCategory.getLocateList"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999994494-0
</successMessageUrl>
<range
value=
"10"
count=
"1"
fails=
"0"
/>
</name>
<name
id=
"APIShop.getShop"
totalCount=
"195"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340000013672-0
</successMessageUrl>
<range
value=
"10"
count=
"195"
fails=
"0"
/>
</name>
<name
id=
"APIShop.getGoogleLatLngByShopId"
totalCount=
"26"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340000013672-0
</successMessageUrl>
<range
value=
"10"
count=
"26"
fails=
"0"
/>
</name>
<name
id=
"APIPromo.getPromoByShop"
totalCount=
"52"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340000013672-0
</successMessageUrl>
<range
value=
"10"
count=
"52"
fails=
"0"
/>
</name>
<name
id=
"APIShop.getChildrenShopIdsByGroupId"
totalCount=
"26"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340000013672-0
</successMessageUrl>
<range
value=
"10"
count=
"26"
fails=
"0"
/>
</name>
<name
id=
"APIRegion.getRegionList"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340000038292-0
</successMessageUrl>
<range
value=
"10"
count=
"1"
fails=
"0"
/>
</name>
<name
id=
"APIRegion.getRegionTreeList"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340000038292-0
</successMessageUrl>
<range
value=
"10"
count=
"1"
fails=
"0"
/>
</name>
<name
id=
"APIHotRgc.getAllHotDistricts"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002657174-0
</successMessageUrl>
<range
value=
"55"
count=
"1"
fails=
"0"
/>
</name>
<name
id=
"APICategory.getAllCategoryList"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002657327-0
</successMessageUrl>
<range
value=
"55"
count=
"1"
fails=
"0"
/>
</name>
<name
id=
"APICategory.getAllCategoryTreeList"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002657702-0
</successMessageUrl>
<range
value=
"55"
count=
"1"
fails=
"0"
/>
</name>
<name
id=
"APICategory.getAllRootCategoryList"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002657908-0
</successMessageUrl>
<range
value=
"55"
count=
"1"
fails=
"0"
/>
</name>
<name
id=
"APICategory.getAllParentCategoryId"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002657975-0
</successMessageUrl>
<range
value=
"55"
count=
"1"
fails=
"0"
/>
</name>
<name
id=
"APISearch.getFilterOptionList"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002658121-0
</successMessageUrl>
<range
value=
"55"
count=
"1"
fails=
"0"
/>
</name>
</type>
<type
id=
"URL"
totalCount=
"24"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
<name
id=
"ClientInfo"
totalCount=
"12"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
<range
value=
"10"
count=
"12"
fails=
"0"
/>
</name>
<name
id=
"Payload"
totalCount=
"12"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
<range
value=
"10"
count=
"12"
fails=
"0"
/>
</name>
</type>
<type
id=
"User"
totalCount=
"12"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
<name
id=
"NotLogIn"
totalCount=
"12"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
<range
value=
"10"
count=
"12"
fails=
"0"
/>
</name>
</type>
<type
id=
"Mobile"
totalCount=
"13"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
<name
id=
"Device"
totalCount=
"12"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
<range
value=
"10"
count=
"12"
fails=
"0"
/>
</name>
<name
id=
"Location"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999968913-0
</successMessageUrl>
<range
value=
"10"
count=
"1"
fails=
"0"
/>
</name>
</type>
<type
id=
"Response"
totalCount=
"12"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
<name
id=
"Status"
totalCount=
"12"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
<range
value=
"10"
count=
"12"
fails=
"0"
/>
</name>
</type>
<type
id=
"RemoteCall"
totalCount=
"4"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002655592-0
</successMessageUrl>
<name
id=
"PigeonRequest"
totalCount=
"2"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002655592-0
</successMessageUrl>
<range
value=
"55"
count=
"2"
fails=
"0"
/>
</name>
<name
id=
"PigeonRespone"
totalCount=
"2"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002655592-0
</successMessageUrl>
<range
value=
"55"
count=
"2"
fails=
"0"
/>
</name>
</type>
<type
id=
"PigeonRespone"
totalCount=
"2"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002655816-0
</successMessageUrl>
<name
id=
"Payload"
totalCount=
"2"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002655816-0
</successMessageUrl>
<range
value=
"55"
count=
"2"
fails=
"0"
/>
</name>
</type>
</machine>
</event-report>
\ No newline at end of file
cat-home/src/test/resources/com/dianping/cat/report/page/model/event/event.xml
浏览文件 @
23276035
<event-report
domain=
"Cat"
startTime=
"2012-02-16 23:00:00"
endTime=
"2012-02-16 23:59:00"
>
<domain>
Cat
</domain>
<type
id=
"URL"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"194.0"
avg=
"47.1"
sum=
"518.0"
sum2=
"73942.0"
std=
"67.1"
>
<name
id=
"home"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"175.0"
max=
"175.0"
avg=
"175.0"
sum=
"175.0"
sum2=
"30625.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
<range
value=
"5"
count=
"123"
sum=
"123456"
avg=
"22.2"
events=
"3"
/>
<range
value=
"15"
count=
"123"
sum=
"12457"
avg=
"222"
events=
"3"
/>
<duration
value=
"128"
count=
"34"
/>
<duration
value=
"256"
count=
"12"
/>
</name>
<name
id=
"service"
totalCount=
"8"
failCount=
"0"
failPercent=
"0.00"
min=
"1.0"
max=
"58.0"
avg=
"13.0"
sum=
"104.0"
sum2=
"3952.0"
std=
"18.0"
>
<successMessageUrl>
20120216/23/Cat/b10bdefb-1eca-45e1-a9c3-52367078b5a2.html
</successMessageUrl>
<range
value=
"5"
count=
"13"
sum=
"1236"
avg=
"22.2"
events=
"0"
/>
<range
value=
"10"
count=
"12"
sum=
"457"
avg=
"222"
events=
"1"
/>
<duration
value=
"64"
count=
"31"
/>
<duration
value=
"256"
count=
"13"
/>
</name>
<name
id=
"t"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"193.0"
max=
"193.0"
avg=
"193.0"
sum=
"193.0"
sum2=
"37249.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/8e7c91a0-7549-4b13-b43b-252b2a6ef4bb.html
</successMessageUrl>
</name>
<name
id=
"ip"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"46.0"
max=
"46.0"
avg=
"46.0"
sum=
"46.0"
sum2=
"2116.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/2029c32e-b692-4e43-8eaf-96b8d6c846a2.html
</successMessageUrl>
</name>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
<type
id=
"MVC"
totalCount=
"33"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"191.0"
avg=
"15.1"
sum=
"499.0"
sum2=
"68377.0"
std=
"42.9"
>
<name
id=
"InboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"17.0"
avg=
"1.5"
sum=
"17.0"
sum2=
"289.0"
std=
"4.9"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"TransitionPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"4.9E-324"
avg=
"0.0"
sum=
"0.0"
sum2=
"0.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"OutboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"1.0"
max=
"191.0"
avg=
"43.8"
sum=
"482.0"
sum2=
"68088.0"
std=
"65.3"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
<type
id=
"NEW1"
totalCount=
"33"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"191.0"
avg=
"15.1"
sum=
"499.0"
sum2=
"68377.0"
std=
"42.9"
>
<name
id=
"InboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"17.0"
avg=
"1.5"
sum=
"17.0"
sum2=
"289.0"
std=
"4.9"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"TransitionPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"4.9E-324"
avg=
"0.0"
sum=
"0.0"
sum2=
"0.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"OutboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"1.0"
max=
"191.0"
avg=
"43.8"
sum=
"482.0"
sum2=
"68088.0"
std=
"65.3"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
</event-report>
<event-report
domain=
"MobileApi"
startTime=
"2012-06-18 15:00:00"
endTime=
"2012-06-18 15:59:59"
>
<domain>
Cat
</domain>
<domain>
MobileApi
</domain>
<ip>
10.1.77.193
</ip>
<ip>
10.1.77.191
</ip>
<machine
ip=
"10.1.77.193"
>
<type
id=
"SQL.PARAM"
totalCount=
"3842"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002843652-0
</successMessageUrl>
</type>
<type
id=
"URL"
totalCount=
"166"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340003006374-0
</successMessageUrl>
</type>
<type
id=
"User"
totalCount=
"83"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340003006374-0
</successMessageUrl>
</type>
<type
id=
"Mobile"
totalCount=
"96"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340003006374-0
</successMessageUrl>
</type>
<type
id=
"Response"
totalCount=
"83"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340003006374-0
</successMessageUrl>
</type>
<type
id=
"PigeonRespone"
totalCount=
"233"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340003346908-1
</successMessageUrl>
</type>
<type
id=
"RemoteCall"
totalCount=
"468"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dc1-1340003346883-0
</successMessageUrl>
</type>
<type
id=
"RuntimeException"
totalCount=
"1"
failCount=
"1"
failPercent=
"0.00"
>
<failMessageUrl>
MobileApi-0a014dc1-1340004797204-0
</failMessageUrl>
</type>
<type
id=
"Exception"
totalCount=
"1"
failCount=
"1"
failPercent=
"0.00"
>
<failMessageUrl>
MobileApi-0a014dc1-1340004797204-0
</failMessageUrl>
</type>
</machine>
<machine
ip=
"10.1.77.191"
>
<type
id=
"RemoteCall"
totalCount=
"4"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dbf-1340004471358-0
</successMessageUrl>
</type>
<type
id=
"PigeonRespone"
totalCount=
"2"
failCount=
"0"
failPercent=
"0.00"
>
<successMessageUrl>
MobileApi-0a014dbf-1340004471574-0
</successMessageUrl>
</type>
</machine>
</event-report>
\ No newline at end of file
cat-home/src/test/resources/com/dianping/cat/report/page/model/transaction-name.xml
浏览文件 @
23276035
<transaction-report
domain=
"
Cat"
startTime=
"2012-02-16 23:00:00"
endTime=
"2012-02-16 23:59:00
"
>
<transaction-report
domain=
"
MobileApi"
startTime=
"2012-06-18 14:00:00"
endTime=
"2012-06-18 14:59:59
"
>
<domain>
Cat
</domain>
<type
id=
"URL"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"194.0"
avg=
"47.1"
sum=
"518.0"
sum2=
"73942.0"
std=
"67.1"
>
<name
id=
"home"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"175.0"
max=
"175.0"
avg=
"175.0"
sum=
"175.0"
sum2=
"30625.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"service"
totalCount=
"8"
failCount=
"0"
failPercent=
"0.00"
min=
"1.0"
max=
"58.0"
avg=
"13.0"
sum=
"104.0"
sum2=
"3952.0"
std=
"18.0"
>
<successMessageUrl>
20120216/23/Cat/b10bdefb-1eca-45e1-a9c3-52367078b5a2.html
</successMessageUrl>
</name>
<name
id=
"t"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"193.0"
max=
"193.0"
avg=
"193.0"
sum=
"193.0"
sum2=
"37249.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/8e7c91a0-7549-4b13-b43b-252b2a6ef4bb.html
</successMessageUrl>
</name>
<name
id=
"ip"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"46.0"
max=
"46.0"
avg=
"46.0"
sum=
"46.0"
sum2=
"2116.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/2029c32e-b692-4e43-8eaf-96b8d6c846a2.html
</successMessageUrl>
</name>
</type>
<domain>
MobileApi
</domain>
<ip>
10.1.77.193
</ip>
<machine
ip=
"10.1.77.193"
>
<type
id=
"URL"
totalCount=
"12"
failCount=
"0"
failPercent=
"0.00"
min=
"2.354"
max=
"2164.387"
avg=
"0.0"
sum=
"2689.6"
sum2=
"4772307.3"
std=
"0.0"
tps=
"0.00"
line95Value=
"2164.00"
line95Sum=
"2164.00"
line95Count=
"1"
>
<name
id=
"/config.bin"
totalCount=
"2"
failCount=
"0"
failPercent=
"0.00"
min=
"2.354"
max=
"2.725"
avg=
"0.0"
sum=
"5.1"
sum2=
"13.0"
std=
"0.0"
tps=
"0.00"
line95Value=
"2.00"
line95Sum=
"2.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
</name>
<name
id=
"/hotregion.bin"
totalCount=
"2"
failCount=
"0"
failPercent=
"0.00"
min=
"2.908"
max=
"8.311"
avg=
"0.0"
sum=
"11.2"
sum2=
"77.5"
std=
"0.0"
tps=
"0.00"
line95Value=
"8.00"
line95Sum=
"8.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960753-0
</successMessageUrl>
</name>
<name
id=
"/category.bin"
totalCount=
"2"
failCount=
"0"
failPercent=
"0.00"
min=
"12.934"
max=
"13.056"
avg=
"0.0"
sum=
"26.0"
sum2=
"337.7"
std=
"0.0"
tps=
"0.00"
line95Value=
"13.00"
line95Sum=
"13.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960794-0
</successMessageUrl>
</name>
<name
id=
"/city.bin"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"38.21"
max=
"38.21"
avg=
"0.0"
sum=
"38.2"
sum2=
"1460.0"
std=
"0.0"
tps=
"0.00"
line95Value=
"38.00"
line95Sum=
"38.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999961753-0
</successMessageUrl>
</name>
<name
id=
"/location.bin"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"249.694"
max=
"249.694"
avg=
"0.0"
sum=
"249.7"
sum2=
"62347.1"
std=
"0.0"
tps=
"0.00"
line95Value=
"249.00"
line95Sum=
"249.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999968913-0
</successMessageUrl>
</name>
<name
id=
"/locatecategory.bin"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"5.392"
max=
"5.392"
avg=
"0.0"
sum=
"5.4"
sum2=
"29.1"
std=
"0.0"
tps=
"0.00"
line95Value=
"5.00"
line95Sum=
"5.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999994494-0
</successMessageUrl>
</name>
<name
id=
"/localshop.bin"
totalCount=
"3"
failCount=
"0"
failPercent=
"0.00"
min=
"42.469"
max=
"2164.387"
avg=
"0.0"
sum=
"2354.1"
sum2=
"4708042.8"
std=
"0.0"
tps=
"0.00"
line95Value=
"2164.00"
line95Sum=
"2164.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1340000001993-0
</successMessageUrl>
</name>
</type>
</machine>
</transaction-report>
cat-home/src/test/resources/com/dianping/cat/report/page/model/transaction-type.xml
浏览文件 @
23276035
<transaction-report
domain=
"
Cat"
startTime=
"2012-02-16 23:00:00"
endTime=
"2012-02-16 23:59:00
"
>
<transaction-report
domain=
"
MobileApi"
startTime=
"2012-06-18 14:00:00"
endTime=
"2012-06-18 14:59:59
"
>
<domain>
Cat
</domain>
<type
id=
"URL"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"194.0"
avg=
"47.1"
sum=
"518.0"
sum2=
"73942.0"
std=
"67.1"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
<type
id=
"MVC"
totalCount=
"33"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"191.0"
avg=
"15.1"
sum=
"499.0"
sum2=
"68377.0"
std=
"42.9"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
<type
id=
"NEW1"
totalCount=
"33"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"191.0"
avg=
"15.1"
sum=
"499.0"
sum2=
"68377.0"
std=
"42.9"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
<domain>
MobileApi
</domain>
<ip>
10.1.77.193
</ip>
<machine
ip=
"10.1.77.193"
>
<type
id=
"Task"
totalCount=
"60"
failCount=
"0"
failPercent=
"0.00"
min=
"96.363"
max=
"621.154"
avg=
"0.0"
sum=
"21662.9"
sum2=
"8482162.5"
std=
"0.0"
tps=
"0.00"
line95Value=
"569.00"
line95Sum=
"569.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999228037-0
</successMessageUrl>
</type>
<type
id=
"SQL"
totalCount=
"507"
failCount=
"0"
failPercent=
"0.00"
min=
"0.417"
max=
"102.919"
avg=
"0.0"
sum=
"1937.0"
sum2=
"34333.7"
std=
"0.0"
tps=
"0.00"
line95Value=
"14.00"
line95Sum=
"14.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999254922-0
</successMessageUrl>
</type>
<type
id=
"URL"
totalCount=
"12"
failCount=
"0"
failPercent=
"0.00"
min=
"2.354"
max=
"2164.387"
avg=
"0.0"
sum=
"2689.6"
sum2=
"4772307.3"
std=
"0.0"
tps=
"0.00"
line95Value=
"2164.00"
line95Sum=
"2164.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
</type>
<type
id=
"Action"
totalCount=
"12"
failCount=
"0"
failPercent=
"0.00"
min=
"0.226"
max=
"2129.164"
avg=
"0.0"
sum=
"2575.0"
sum2=
"4616437.9"
std=
"0.0"
tps=
"0.00"
line95Value=
"2129.00"
line95Sum=
"2129.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
</type>
<type
id=
"Response"
totalCount=
"12"
failCount=
"0"
failPercent=
"0.00"
min=
"0.419"
max=
"37.308"
avg=
"0.0"
sum=
"98.1"
sum2=
"2687.0"
std=
"0.0"
tps=
"0.00"
line95Value=
"37.00"
line95Sum=
"37.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999960694-0
</successMessageUrl>
</type>
<type
id=
"Call"
totalCount=
"6"
failCount=
"0"
failPercent=
"0.00"
min=
"32.677"
max=
"503.84"
avg=
"0.0"
sum=
"1138.3"
sum2=
"379908.0"
std=
"0.0"
tps=
"0.00"
line95Value=
"503.00"
line95Sum=
"503.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1339999968913-0
</successMessageUrl>
</type>
<type
id=
"Result"
totalCount=
"2"
failCount=
"0"
failPercent=
"0.00"
min=
"22.923"
max=
"39.049"
avg=
"0.0"
sum=
"62.0"
sum2=
"2050.3"
std=
"0.0"
tps=
"0.00"
line95Value=
"39.00"
line95Sum=
"39.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1340002655816-0
</successMessageUrl>
</type>
</machine>
</transaction-report>
cat-home/src/test/resources/com/dianping/cat/report/page/model/transaction.xml
浏览文件 @
23276035
此差异已折叠。
点击以展开。
cat-home/src/test/resources/com/dianping/cat/report/page/model/transaction/transaction.xml
浏览文件 @
23276035
<transaction-report
domain=
"Cat"
startTime=
"2012-02-16 23:00:00"
endTime=
"2012-02-16 23:59:00"
>
<domain>
Cat
</domain>
<type
id=
"URL"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"194.0"
avg=
"47.1"
sum=
"518.0"
sum2=
"73942.0"
std=
"67.1"
>
<name
id=
"home"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"175.0"
max=
"175.0"
avg=
"175.0"
sum=
"175.0"
sum2=
"30625.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
<range
value=
"5"
count=
"123"
sum=
"123456"
avg=
"22.2"
transactions=
"3"
/>
<range
value=
"15"
count=
"123"
sum=
"12457"
avg=
"222"
transactions=
"3"
/>
<duration
value=
"128"
count=
"34"
/>
<duration
value=
"256"
count=
"12"
/>
</name>
<name
id=
"service"
totalCount=
"8"
failCount=
"0"
failPercent=
"0.00"
min=
"1.0"
max=
"58.0"
avg=
"13.0"
sum=
"104.0"
sum2=
"3952.0"
std=
"18.0"
>
<successMessageUrl>
20120216/23/Cat/b10bdefb-1eca-45e1-a9c3-52367078b5a2.html
</successMessageUrl>
<range
value=
"5"
count=
"13"
sum=
"1236"
avg=
"22.2"
transactions=
"0"
/>
<range
value=
"10"
count=
"12"
sum=
"457"
avg=
"222"
transactions=
"1"
/>
<duration
value=
"64"
count=
"31"
/>
<duration
value=
"256"
count=
"13"
/>
</name>
<name
id=
"t"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"193.0"
max=
"193.0"
avg=
"193.0"
sum=
"193.0"
sum2=
"37249.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/8e7c91a0-7549-4b13-b43b-252b2a6ef4bb.html
</successMessageUrl>
</name>
<name
id=
"ip"
totalCount=
"1"
failCount=
"0"
failPercent=
"0.00"
min=
"46.0"
max=
"46.0"
avg=
"46.0"
sum=
"46.0"
sum2=
"2116.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/2029c32e-b692-4e43-8eaf-96b8d6c846a2.html
</successMessageUrl>
</name>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
<type
id=
"MVC"
totalCount=
"33"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"191.0"
avg=
"15.1"
sum=
"499.0"
sum2=
"68377.0"
std=
"42.9"
>
<name
id=
"InboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"17.0"
avg=
"1.5"
sum=
"17.0"
sum2=
"289.0"
std=
"4.9"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"TransitionPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"4.9E-324"
avg=
"0.0"
sum=
"0.0"
sum2=
"0.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"OutboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"1.0"
max=
"191.0"
avg=
"43.8"
sum=
"482.0"
sum2=
"68088.0"
std=
"65.3"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
<type
id=
"NEW1"
totalCount=
"33"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"191.0"
avg=
"15.1"
sum=
"499.0"
sum2=
"68377.0"
std=
"42.9"
>
<name
id=
"InboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"17.0"
avg=
"1.5"
sum=
"17.0"
sum2=
"289.0"
std=
"4.9"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"TransitionPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"0.0"
max=
"4.9E-324"
avg=
"0.0"
sum=
"0.0"
sum2=
"0.0"
std=
"0.0"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<name
id=
"OutboundPhase"
totalCount=
"11"
failCount=
"0"
failPercent=
"0.00"
min=
"1.0"
max=
"191.0"
avg=
"43.8"
sum=
"482.0"
sum2=
"68088.0"
std=
"65.3"
>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</name>
<successMessageUrl>
20120216/23/Cat/1168a02c-664b-440c-9ef4-a87bac4d9cb1.html
</successMessageUrl>
</type>
</transaction-report>
<transaction-report
domain=
"MobileApi"
startTime=
"2012-06-18 16:00:00"
endTime=
"2012-06-18 16:59:59"
>
<domain>
Cat
</domain>
<domain>
MobileApi
</domain>
<ip>
10.1.77.193
</ip>
<machine
ip=
"10.1.77.193"
>
<type
id=
"Result"
totalCount=
"208"
failCount=
"0"
failPercent=
"0.00"
min=
"0.225"
max=
"673.736"
avg=
"7.8"
sum=
"1618.0"
sum2=
"490858.8"
std=
"48.0"
tps=
"0.00"
line95Value=
"44.00"
line95Sum=
"44.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1340006403188-1
</successMessageUrl>
</type>
<type
id=
"URL"
totalCount=
"65"
failCount=
"0"
failPercent=
"0.00"
min=
"1.492"
max=
"92376.562"
avg=
"2942.2"
sum=
"191246.2"
sum2=
"9818761147.4"
std=
"11933.2"
tps=
"0.00"
line95Value=
"19399.00"
line95Sum=
"19399.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1340006403187-0
</successMessageUrl>
</type>
<type
id=
"Action"
totalCount=
"65"
failCount=
"0"
failPercent=
"0.00"
min=
"0.203"
max=
"72901.539"
avg=
"2534.1"
sum=
"164717.0"
sum2=
"6558693118.2"
std=
"9720.1"
tps=
"0.00"
line95Value=
"19395.00"
line95Sum=
"19395.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1340006403187-0
</successMessageUrl>
</type>
<type
id=
"Call"
totalCount=
"212"
failCount=
"0"
failPercent=
"0.00"
min=
"3.355"
max=
"3143.928"
avg=
"110.1"
sum=
"23337.1"
sum2=
"26978744.0"
std=
"339.3"
tps=
"0.00"
line95Value=
"562.00"
line95Sum=
"562.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1340006403187-0
</successMessageUrl>
</type>
<type
id=
"SQL"
totalCount=
"7858"
failCount=
"0"
failPercent=
"0.00"
min=
"0.222"
max=
"125.143"
avg=
"0.9"
sum=
"7173.8"
sum2=
"103546.3"
std=
"3.5"
tps=
"0.00"
line95Value=
"1.00"
line95Sum=
"1.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1340006403187-0
</successMessageUrl>
</type>
<type
id=
"Response"
totalCount=
"65"
failCount=
"0"
failPercent=
"0.00"
min=
"0.027"
max=
"78.726"
avg=
"8.3"
sum=
"538.7"
sum2=
"13094.9"
std=
"11.5"
tps=
"0.00"
line95Value=
"22.00"
line95Sum=
"22.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1340006403187-0
</successMessageUrl>
</type>
<type
id=
"Task"
totalCount=
"42"
failCount=
"0"
failPercent=
"0.00"
min=
"82.755"
max=
"560.798"
avg=
"304.4"
sum=
"12786.7"
sum2=
"4510647.4"
std=
"121.3"
tps=
"0.00"
line95Value=
"506.00"
line95Sum=
"506.00"
line95Count=
"1"
>
<successMessageUrl>
MobileApi-0a014dc1-1340006430840-0
</successMessageUrl>
</type>
</machine>
</transaction-report>
\ No newline at end of file
cat-job/pom.xml
浏览文件 @
23276035
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.
2.5
</version>
<version>
0.
3.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-job
</artifactId>
...
...
pom.xml
浏览文件 @
23276035
...
...
@@ -4,7 +4,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.
2.5
</version>
<version>
0.
3.0
</version>
<name>
Tracking
</name>
<packaging>
pom
</packaging>
<modules>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录