wrkHTTP 压力测试工具
wrk 是一个比较先进的 HTTP 压力测试工具,当在单个多核 CPU 上运行时,能够产生大量负载。它结合了多线程设计和可扩展的事件通知系统,例如 epoll 和 kqueue。
可选的 LuaJIT 脚本可以执行 HTTP 请求生成,响应处理和自定义报告。
测试方法:
wrk -t8 -c400 -r10m http://localhost:8080/index.html
输出结果:
  Making 10000000 requests to http://localhost:8080/index.html
    8 threads and 400 connections
    Thread Stats   Avg      Stdev     Max   +/- Stdev
      Latency   439.75us  350.49us   7.60ms   92.88%
      Req/Sec    61.13k     8.26k   72.00k    87.54%
    10000088 requests in 19.87s, 3.42GB read
  Requests/sec: 503396.23
  Transfer/sec:    176.16MB评论
