linux安装压力测试工具vegeta

github 地址: https://github.com/tsenart/vegeta/releases
https://github.com/tsenart/vegeta/releases/download/v8.0.0/vegeta-8.0.0-linux-amd64.tar.gz

# 下载
wget https://github.com/tsenart/vegeta/releases/download/v8.0.0/vegeta-8.0.0-linux-amd64.tar.gz

# 解压
tar zxvf vegeta-8.0.0-linux-amd64.tar.gz 

# 写target.txt 文件 内容如下: 
GET https://www.baidu.com

# 测试
./vegeta attack -targets="target.txt" -rate=100 -duration=30s > res.bin

# 分析测试结果
vegeta report -inputs=res.bin -reporter=json > res.json

#查看json


# 分析请求时间
cat res.bin | ./vegeta report -reporter='hist[0,40ms,100ms,200ms,600ms,1000ms,2000ms]'



#分析结果生成html
cat res.bin | ./vegeta report -reporter=plot > plot.html






/ END



猜你喜欢

转载自blog.csdn.net/Dong_Alex/article/details/80877774