wrk压测

以前都是用jmeter压测的,最近学了下wrk.

1. git clone https://github.com/wg/wrk.git
2. cd wrk/
3. make
4. cp wrk /usr/local/bin/
5. 验证wrk是否安装成功。命令行输入wrk能看到命令提示信息则说明安装成功。

Usage: wrk <options> <url>
Options:
-c, --connections <N> Connections to keep open(连接数量)
-d, --duration <T> Duration of test (持续时间)
-t, --threads <N> Number of threads to use (线程数量)

-s, --script <S> Load Lua script file
-H, --header <H> Add header to request
--latency Print latency statistics
--timeout <T> Socket/request timeout
-v, --version Print version details

Numeric arguments may include a SI unit (1k, 1M, 1G)
Time arguments may include a time unit (2s, 2m, 2h)


6. 压测,请根据实际情况修改条件.
wrk -c 100 -d 1h -t 100 https://www.baidu.com/

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值