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
相关推荐
照海19Gin40 分钟前
【企业网架构实验解析】三层组网与 AC+AP 无线部署的协议逻辑(eNSP 仿真实践)
网络
Lilixxs1 小时前
wireshark LLDP 协议抓包获取 M580 PLC 网口地址
网络·测试工具·wireshark·plc·施耐德·lldp·m580
vortex51 小时前
Linux下局域网IPv6地址发现与扫描
网络
北邮刘老师2 小时前
【智能体互联协议解析】身份码-智能体的身份证号
网络·人工智能·大模型·智能体·智能体互联网
日更嵌入式的打工仔3 小时前
Ethercat COE 笔记
网络·笔记·ethercat
UVM_ERROR4 小时前
UVM实战:RDMA Host侧激励开发全流程问题排查与解决
服务器·网络·数据库
福尔摩斯张4 小时前
插件式架构:解耦与扩展的艺术与实践(超详细)
linux·服务器·网络·网络协议·tcp/ip
老王熬夜敲代码5 小时前
网路编程--协议
linux·网络·笔记
北邮刘老师6 小时前
智能体,超越人类与机器的世界“理解者”
网络·人工智能·大模型·智能体·智能体互联网
A13247053126 小时前
SSH远程连接入门:安全高效地管理服务器
linux·运维·服务器·网络·chrome·github