go压测工具
地址: https://github.com/tsenart/vegeta
1. 使用
1 echo "GET http://example.com" | vegeta attack -duration=10s -rate=50 > results.bin 2 cat results.bin | vegeta report //终端使用 3 cat results.bin | vegeta plot > plot.html //浏览器相关客户端使用
post示例
准备target.info和body.info
1 # body.info 2 {"keyword":""}
1 # target.info 2 POST http://test.go 3 Authorization: Bearer 123 4 Content-Type: application/json 5 Body: {"keyword":""} 6 @body.info 7 #终端示例 8 vegeta attack -targets=target.info -duration=10s -rate=100 | vegeta report
浙公网安备 33010602011771号