2014年4月8日 星期二

wrk HTTP基準測試工具

github fork wrk 


下載到/tmp
 解壓縮後 sudo make
然後搬移wrk  
sudo mv wrk /usr/local/bin

就能執行下面命令


  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.
  
  -t :多少線程
  -c :多少同時連線測試數量
  -d :執行多少秒


*測試注意sudo ulimit -n 可查詢最大連線數 依照需求調整

搜尋此網誌