wrk HTTP打流测试工具

安装

git clone https://gitee.com/mirrors/wrk.git

参数

复制代码
-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,lua脚本,使用方法往下看
-H, --header      <H>  Add header to request,添加http header, 比如. "User-Agent: wrk"
--latency          Print latency statistics,显示延迟统计
--timeout, -T:    <T>  Socket/request timeout,超时的时间
-v, --version          Print version details

例子

wrk -c 10000 -t 100 http://127.0.0.1:80/test -s wrk_keep.lua -d 20s -T2 --latency

复制代码
Running 20s test @ http://127.0.0.1/test
  100 threads and 10000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   146.36ms  253.95ms   2.00s    88.39%
    Req/Sec     1.24k   298.79     3.61k    69.12%
  Latency Distribution
     50%   34.30ms
     75%  176.93ms
     90%  459.42ms
     99%    1.16s
  2484504 requests in 20.10s, 781.90MB read
  Socket errors: connect 0, read 0, write 0, timeout 9316
Requests/sec: 123612.53
Transfer/sec:     38.90MB
相关推荐
大隐隐于野28 分钟前
tcp 丢包分析
linux·服务器·网络
千里镜宵烛2 小时前
深入 Lua 元表与元方法
junit
qqxhb2 小时前
系统架构设计师备考第64天——网络构建关键技术
网络·系统架构·mtbf·mttr·冗余硬件·软件热备·快速检测
哈乐6 小时前
网工应用题:配置命令补全类题目
服务器·前端·网络
梁正雄6 小时前
19、docker跨主机网络 Overlay\Underlay
网络·docker·容器
沧澜sincerely6 小时前
运输层协议概述及UDP
网络·udp·运输层
国科安芯7 小时前
抗辐照MCU芯片在无人叉车领域的性能评估与选型建议
网络·人工智能·单片机·嵌入式硬件·安全
国科安芯7 小时前
抗辐照MCU芯片在激光雷达领域的适配性分析
网络·人工智能·单片机·嵌入式硬件·fpga开发
xixixi777777 小时前
水坑攻击的攻击原理和特点+案例和防御方法
网络·安全·web安全
王道长服务器 | 亚马逊云8 小时前
AWS + WordPress:中小型外贸独立站的理想组合
服务器·网络·云计算·音视频·aws