CNode

mac os 下 不能用 ab 做压力测试

Xxian366发布于14 年前最后回复12 年前16 回复27022 浏览0 收藏
查看回复

回复 (16)

L
leizongmin#1·14 年前

上代码么?

X
xian366#2·14 年前
引用 leizongmin上代码么?

就是普通的hello world 都不行。

var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(8888);

X
xian366#3·14 年前
引用 leizongmin上代码么?

不好意思格式乱了。

X
xian366#4·14 年前

var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(8888);

普通的hello world 都不行。

X
xqunix#5·14 年前

ab 的一个bug,使用 127.0.0.1 代替 localhost 就行了,参见: http://stackoverflow.com/questions/7938869/ab-is-erroring-out-with-apr-socket-recv-connection-refused-61

X
xian366#6·14 年前
引用 xqunixab 的一个bug,使用 127.0.0.1 代替 localhost 就行了,参见: http://stackoverflow.com/questions/7938869/ab is err...

执行: ab -n 10 -c 1 http://127.0.0.1:8888/view

还是报错,如下:

This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)...Send request failed! Send request failed! apr_socket_recv: Connection reset by peer (54) Total of 3 requests completed

L
leizongmin#7·14 年前
引用 leizongmin上代码么?

有开启防火墙么?或者试试telnet 127.0.0.1 8888 看能不能连接上去

F
fengmk2#8·14 年前

ab在我mac一直无法跑成功,我换http_load了

X
xian366#10·14 年前

发现了一个新的测试工具;webbench

这个比较简单。

Q
qingdu#11·14 年前

siege: http://www.joedog.org/siege-home/ 简单可依赖

J
JacksonTian#12·14 年前

Mac下的压力测试不可靠啊~跳动太大了,根本不准。

S
sumory#13·14 年前
引用 qingdusiege: http://www.joedog.org/siege home/ 简单可依赖

simple and reliable,哦去,你也在百度待过?

M
mackjoner#14·14 年前

我觉得也是,ab每次差别幅度很大,不过我最近发现pylot还比较轻便。

C
changboter#15·13 年前

晕,搜索问题搜到你发的了。。。 我也ab同问题了。。。

参与回复
登录后即可参与回复。登录