[转载]apache压测命令ab
ab的全称是ApacheBench,是Apache附带的一个小工具,专门用于HTTP Server的benchmark
testing,可以同时模拟多个并发请求。
在这个例子的一开始,我执行了这样一个命令ab -n 10
-c 10
http://www.google.com/
向www.google.com发送10个请求(-n 10)
,并每次发送10个请求(-c
10)
D:apahcebin>ab.exe -n 10 -c 10
http://www.google.com/
This is ApacheBench, Version 2.0.40-dev <$Revision:
1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation,
http://www.apache.org/
Benchmarking www.google.com (be patient).....done
Server
Software:
Server
Hostname:
Server
Port:
Document
Path:
Document
Length:
Concurrency
Level:
Time taken for tests:
Complete
requests:
Failed
requests:
Write
errors:
Total
transferred:
HTML
transferred:
Requests per
second:
Time per
request:
Time per
request:
Transfer
rate:
Connection Times
Connect:
Processing:
Waiting:
Total:
**下面的内容为整个场景中所有请求的响应情况。在场景中每个请求都有一个响应时间,其中50%的用户响应时间小于**毫秒,60%的用户响应时间小于**毫秒,最大的响应时间小于
Percentage of the requests served within a certain
time
格式: ./ab [options] [http://]hostname[:port]/path
参数: