使用ApacheBenchmarking(AB)工具進行Web服務器壓力測試

Apache HTTP server benchmarking tool

# 單個cookie參數
ab -n 100 -c 100 -C JSESSIONID=XXXX http://localhost:8080/demo/test1.do

# 多個cookie對象
ab -n 100 -c 100 -H "Cookie:JSESSIONID=XXXX;Key2=Value2" http://localhost:8080/demo/test2.do

# 通過文檔傳遞請求參數
ab -n 100 -c 100 -T "text/plain" -p p.txt http://localhost:8080/demo/test3.do

# p.txt 文檔內容
username=admin&password=1
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章