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
相关推荐
想睡hhh9 分钟前
网络基础——Socket编程预备
网络
zzc92113 分钟前
Wireshark获取数据传输的码元速率
网络·测试工具·wifi·wireshark·路由器·802.11n·物理层参数
搬码临时工14 分钟前
端口映射原理操作详解教程:实现外网访问内网服务,本地路由器端口映射公网ip和软件端口映射域名2种方法
网络·tcp/ip·智能路由器
当你需要个夏天21715 分钟前
软考网工选择题-1
网络·智能路由器·选择题·软考网工
极客范儿17 分钟前
新华三H3CNE网络工程师认证—等价路由
网络·智能路由器
Mr_Xuhhh19 分钟前
NAT、代理服务、内网穿透
网络·网络协议·http·https·udp·智能路由器
厦门辰迈智慧科技有限公司2 小时前
水闸安全综合监测系统解决方案
网络·物联网·安全·自动化·监测
挨踢攻城3 小时前
华为 | SD-WAN场景丢包类问题定位
网络·华为·php·hcie·hcia·hcip·厦门微思网络
Jewel Q5 小时前
AAA服务器技术
网络
Johny_Zhao13 小时前
基于 Docker 的 LLaMA-Factory 全流程部署指南
linux·网络·网络安全·信息安全·kubernetes·云计算·containerd·yum源·系统运维·llama-factory