解释如下:
totalread / 1024 / timetaken
Percentage of the requests served within a certain time (ms)
表示小于某一时间的请求数在全过程中的占比
update 2016年8月10日 16:55:23
Connection Times:下面这里说的靠谱:
http://stackoverflow.com/questions/2820306/definition-of-connect-processing-waiting-in-apache-bench
Connect and Waiting times
The amount of time it took to establish the connection and get the first bits of a response
Processing time
The server response time—i.e., the time it took for the server to process the request and send a reply
Total time
The sum of the Connect and Processing times
I equate this to:
- Connect time: the amount of time it took for the socket to open
- Processing time: first byte + transfer
- Waiting: time till first byte
- Total: Sum of Connect + Processing
2. 以下貌似更靠谱,可以作为上述的补充:即Waiting时间被包含在Processing时间内。
By looking at the source code we find these timing points:
apr_time_t start, /* Start of connection */ connect, /* Connected, start writing */ endwrite, /* Request written */ beginread, /* First byte of input */ done; /* Connection closed */And when request is done some timings are stored as:
s->starttime = c->start; s->ctime = ap_max(0, c->connect - c->start); s->time = ap_max(0, c->done - c->start); s->waittime = ap_max(0, c->beginread - c->endwrite);And the 'Processing time' is later calculated as
s->time - s->ctime;So if we translate this to a timeline:
t1: Start of connection t2: Connected, start writing t3: Request written t4: First byte of input t5: Connection closedThen the definitions would be:
Connect: t1-t2 Most typically the network latency Processing: t2-t5 Time to receive full response after connection was opened Waiting: t3-t4 Time-to-first-byte after the request was sent Total time: t1-t5
update:
通常所说的吞吐量或者rps/tps/qps 是指服务器的处理能力,因为我们一般所测试的所关心的就是服务器的性能。以下用qps来表示。
qps是单位时间内处理的请求数,平均响应时间是指服务器的处理时间,所以qps和平均响应时间是互为倒数。
平均等待时间是从请求发出到获取到完整响应的总时间, 这表示用户端的性能,值是:平均响应时间*并发用户数,表示并发用户数越多,同时发送请求过来的总数越大,服务器处理要排队,就算多进程或者多线程来增加性能也是会有排队的情况,总的来说的计算方法就是如此。
所以一般测试结果的响应时间是指平均等待时间,是指客户端的响应时间,并不是上面所说的平均响应时间!!!!
所以为了错误理解,测试时,应该直接说响应时间,或者平均用户等待时间,这个是测试工具统计出来的结果。服务器“平均响应时间”应该是服务器处理平均响应时间,平均处理时间,该值不是一个统计值,是通过计算而来。
以上就是【原创】Apache ab结果参数详解的详细内容,更多关于【原创】Apache ab结果参数详解的资料请关注九品源码其它相关文章!