wrk - http性能测试工具

安装( Mac )

brew install 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)

启动 web 应用

➜  ~ wrk -c10 -t10 -d 100s --latency http://localhost:8080/redis/city
Running 2m test @ http://localhost:8080/redis/city
  10 threads and 10 connections (10 个线程 10 个连接)
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    30.16ms  133.96ms   1.01s    95.31%
    Req/Sec   508.01     76.93   676.00     80.64%
  Latency Distribution
     50%    1.89ms
     75%    2.21ms
     90%    2.87ms
     99%  824.71ms (99% 的请求耗时)
  479638 requests in 1.67m, 61.84MB read
Requests/sec:   4794.01 (每秒4794个请求)
Transfer/sec:    632.91KB
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值