ab [options] url
options.
-n 請求數(shù)量
-c 并發(fā)數(shù)
-H 請求頭
-p POST請求的請求數(shù)據(jù)
-T post數(shù)據(jù)所使用的Content-Type頭信息,例如 -T 'application/x-www-form-urlencoded'
GET
e.g :
// 注意 如果需要攜帶參數(shù)必須把url用引號引起來 不然識別不到&
ab -n 10000 -c 10 -H “Cookie:123” “https://test.com?a=1&b=2”
POST
ab -n 100 -c 10 -p 'post.txt' -T 'application/x-www-form-urlencoded' 'http://test.api.com/ttk/auth/info/‘