ab 压力测试--参数详情

来源:互联网 发布:msqrd.软件 编辑:程序博客网 时间:2024/05/23 23:14

H:\phpStudy2\Apache\bin>ab -n 1000 -c 100 http://www.php.com/test.php

     -n 请求数  -c 病发数

This is ApacheBench, Version 2.3 <Revision:1748469>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.php.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests

Server Software: Apache/2.4.23
Server Hostname: www.php.com
Server Port: 80

Document Path: /test.php
Document Length: 38890 bytes #HTTP 响应正文的长度

Concurrency Level: 100 #病发的级别
Time taken for tests: 5.772 seconds #所有请求花费的时间
Complete requests: 1000 #完成请求数
Failed requests: 0 #失败请求数
Total transferred: 39087000 bytes #网络传输总量
HTML transferred: 38890000 bytes #HTML 内容传输量
Requests per second: 173.25 [#/sec] (mean) #吞吐量– 每秒请求数
Time per request: 577.210 [ms] (mean) # 服务器接收到请求后,响应页面花费的时间
Time per request: 5.772 [ms] (mean, across all concurrent requests)# #处理每一个病发平均花费的时间
Transfer rate: 6613.00 [Kbytes/sec] received #平均每秒网络上的流量,可以用于排除是否是网络流量过大导致的时间延长问题

.#网络上消耗的时间的分解
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 2.7 0 84
Processing: 19 547 243.1 599 1099
Waiting: 8 520 235.7 543 1087
Total: 20 547 243.2 599 1099

.#在一定时间内送达请求数
Percentage of the requests served within a certain time (ms)
50% 599 #百分之50的请求数,相应时间这里写代码片小于599 毫秒
66% 708
75% 771
80% 785
90% 831
95% 867
98% 905
99% 953
100% 1099 (longest request)

0 0
原创粉丝点击