1、安装
>brew install siege
>siege -v
2、使用
#get
>siege -c 20 -r 10 http://www.cnwytnet.com
#参数说明: -c 是并发量,并发数为20人 -r 是重复次数, 重复10次
#post json
>siege -c 500 r 1 '10.23.54.151:19595/v1/db/nova/service_get_all POST <./postfile.json'
#siege只能通过文件的扩展名来确定content type为application/json
>siege -c 1 -t 60 'http://127.0.0.1:80/api/app/order-middle/create POST <./addcart.json';