Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
f17569b6
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,发现更多精彩内容 >>
提交
f17569b6
编写于
11月 26, 2014
作者:
Y
youyong205
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #651 from jialinsun/master
fix broker service bug
上级
b5983e2f
14136f4f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
64 addition
and
4 deletion
+64
-4
cat-broker/src/main/java/com/dianping/cat/broker/api/page/batch/Handler.java
.../java/com/dianping/cat/broker/api/page/batch/Handler.java
+1
-1
cat-broker/src/test/java/com/dianping/cat/broker/SingleTest.java
...ker/src/test/java/com/dianping/cat/broker/SingleTest.java
+60
-0
cat-home/src/main/java/com/dianping/cat/report/page/app/display/AppGraphCreator.java
...dianping/cat/report/page/app/display/AppGraphCreator.java
+2
-2
cat-home/src/main/webapp/jsp/report/app/linechart.jsp
cat-home/src/main/webapp/jsp/report/app/linechart.jsp
+1
-1
未找到文件。
cat-broker/src/main/java/com/dianping/cat/broker/api/page/batch/Handler.java
浏览文件 @
f17569b6
...
...
@@ -176,7 +176,7 @@ public class Handler implements PageHandler<Context>, LogEnabled {
m_logger
.
error
(
e
.
getMessage
(),
e
);
}
}
else
{
Cat
.
logEvent
(
"Invalid
Par"
,
items
[
4
],
Event
.
SUCCESS
,
items
[
4
]
);
Cat
.
logEvent
(
"Invalid
Record"
,
record
,
Event
.
SUCCESS
,
record
);
}
}
...
...
cat-broker/src/test/java/com/dianping/cat/broker/SingleTest.java
0 → 100644
浏览文件 @
f17569b6
package
com.dianping.cat.broker
;
import
java.net.HttpURLConnection
;
import
java.net.URL
;
import
java.net.URLConnection
;
import
org.junit.Test
;
public
class
SingleTest
{
@Test
public
void
test
()
throws
Exception
{
while
(
true
)
{
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
URL
url
=
new
URL
(
buildUrl
(
i
));
URLConnection
URLconnection
=
url
.
openConnection
();
URLconnection
.
setRequestProperty
(
"User-Agent"
,
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon;)"
);
HttpURLConnection
httpConnection
=
(
HttpURLConnection
)
URLconnection
;
int
responseCode
=
httpConnection
.
getResponseCode
();
if
(
responseCode
==
HttpURLConnection
.
HTTP_OK
)
{
System
.
out
.
println
(
"ok"
);
}
else
{
System
.
out
.
println
(
responseCode
);
}
}
Thread
.
sleep
(
1000
);
}
}
private
String
buildUrl
(
int
i
)
{
StringBuilder
sb
=
new
StringBuilder
(
128
);
sb
.
append
(
"http://localhost:2765/broker-service/api/single?v=1&ts=123456&tu=http://j1.s1.dpfile.com/lib/1.0/cdn-perf/res/cdn_small.png/dnsLookup&d=1000&hs=200&ec=100"
);
return
sb
.
toString
();
}
// @Test
// public void test2() throws Exception{
// for (int i = 0; i < 1000; i++) {
// URL url = new URL("http://localhost:2281/cat/r/jsError?error=Script%20error.&file=&line=0×tamp=1371196520045");
// URLConnection URLconnection = url.openConnection();
// URLconnection.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon;)");
// URLconnection.setRequestProperty("referer", "http://www.dianping.com/shop/2340226");
//
// HttpURLConnection httpConnection = (HttpURLConnection) URLconnection;
// int responseCode = httpConnection.getResponseCode();
//
// if (responseCode == HttpURLConnection.HTTP_OK) {
// } else {
// }
// Thread.sleep(100);
// }
// }
}
cat-home/src/main/java/com/dianping/cat/report/page/app/display/AppGraphCreator.java
浏览文件 @
f17569b6
...
...
@@ -177,9 +177,9 @@ public class AppGraphCreator {
title
=
code
.
getName
();
int
status
=
code
.
getStatus
();
if
(
status
==
0
)
{
title
+=
"<span class='text-success'>
【成功】</span>"
;
title
+=
"<span class='text-success'>【成功】</span>"
;
}
else
{
title
+=
"<span class='text-error'>
【失败】</span>"
;
title
+=
"<span class='text-error'>【失败】</span>"
;
}
}
break
;
...
...
cat-home/src/main/webapp/jsp/report/app/linechart.jsp
浏览文件 @
f17569b6
...
...
@@ -143,7 +143,7 @@
var
query2
=
""
;
var
value
=
document
.
getElementById
(
"
checkbox
"
).
checked
;
if
(
value
==
true
)
{
if
(
value
)
{
var
time2
=
$
(
"
#time2
"
).
val
();
var
command2
=
$
(
"
#command2
"
).
val
();
var
code2
=
$
(
"
#code2
"
).
val
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录