美文网首页
wrk性能测试

wrk性能测试

作者: 会动的木头疙瘩儿 | 来源:发表于2018-11-14 14:41 被阅读37次

github: https://github.com/wg/wrk

基本压测

wrk -t12 -c400 -d30s http://127.0.0.1:8080/index.html

使用12个线程运行30秒, 400个http并发

命令行选项

-c, --connections: 总的http并发数

-d, --duration:    持续压测时间, 比如: 2s, 2m, 2h

-t, --threads:     总线程数

-s, --script:      luajit脚本,使用方法往下看

-H, --header:      添加http header, 比如. "User-Agent: wrk"

    --latency:     在控制台打印出延迟统计情况

    --timeout:     http超时时间

相关文章

网友评论

      本文标题:wrk性能测试

      本文链接:https://www.haomeiwen.com/subject/ikhjfqtx.html