HTTP压力测试工具

WRK-HTTP压力测试工的下载安装与使用方法

天涯浪子 提交于 2020-03-05 15:05:11
wrk 是一款采用异步并发模型的HTTP基准测试工具:采用异步并发模型,能够发送更大且可控的压力;内置 LuaJIT,能够通过 lua 脚本模拟常见的业务行为,模拟更加真实的场景;相比常见的HTTP基准测试工具,占用更少CPU、更少内存; 支持 HTTP、 HTTPS,能够动态修改头、修改Body方法等;支持混合场景 编译安装 1.sudo yum groupinstall ‘Development Tools’ 2.sudo yum install openssl-devel 3.sudo yum install git #下载安装git,并下载wrk 4.git clone https://github.com/wg/wrk.git 5.cd wrk 6.make 基本测试方法: wrk -t12 -c400 -d30s http://127.0.0.1:8080/index.html This runs a benchmark for 30 seconds, using 12 threads, and keeping 400 HTTP connections open. Output: Running 30s test @ http://127.0.0.1:8080/index.html 12 threads and 400 connections Thread Stats