《weighttp 压测工具安装》
1 简介
weighttp 是 lighttpd 项目组开发的 HTTP 压测工具,基于 libev 事件库实现,适合在 Linux 下绕过操作系统 select/poll 限制做高并发压测。
2 安装依赖
Ubuntu / Debian 需要先安装 libev:
sudo apt-get install libev4 libev-dev
# 也可以从源码编译最新版 libev
wget http://dist.schmorp.de/libev/libev-4.11.tar.gz
tar xvf libev-4.11.tar.gz
cd libev-4.11
sudo ./configure
sudo make
sudo make install
3 编译安装 weighttp
git clone https://github.com/lighttpd/weighttp.git
cd weighttp
./autogen.sh
./configure
make -j`nproc`
make -j`nproc` install
4 基本用法
# 指定并发与请求总数
weighttp -n 100000 -c 100 http://example.com/
更多参数可用 weighttp -? 查看(-n 请求总数、-c 并发数、-k 开启 keepalive 等)。
5 参考文档
阅读 —
·
全站 —