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
相关推荐
white-persist几秒前
MCP协议深度解析:AI时代的通用连接器
网络·人工智能·windows·爬虫·python·自动化
running thunderbolt1 小时前
项目---网络通信组件JsonRpc
linux·服务器·c语言·开发语言·网络·c++·性能优化
YoungLime1 小时前
DVWA靶场之十:DOM 型 XSS(DOM Based Cross Site Scripting (XSS))
网络·安全·web安全
点亮一颗LED(从入门到放弃)2 小时前
Linux应用(6)——网络通信/TCP/IP
linux·网络·tcp/ip
fat house cat_4 小时前
记一次网络io学习流水账
网络·学习
is08155 小时前
全志 H3 armbian 备份
linux·服务器·网络
国科安芯6 小时前
ASP4644芯片低功耗设计思路解析
网络·单片机·嵌入式硬件·安全
艾菜籽6 小时前
网络原理-HTTPS
网络·网络协议·https
努力学习的小廉7 小时前
深入了解linux网络—— TCP网络通信(下)
linux·网络·tcp/ip
Bruce_Liuxiaowei9 小时前
MQTT协议在物联网环境中的安全风险与防范指南
运维·网络·物联网·安全·网络安全