Linux性能测试工具ab
作者:网络转载 发布时间:[ 2013/11/11 10:20:18 ] 推荐标签:
举个栗子
参数很多,一般我们用 -c 和 -n 参数可以了. 例如:
01 bixiaopeng@bixiaopengtekiMacBook-Pro ~$ ab -c 10 -n 1000 http://www.wirelessqa.com/?p=143
02 This is ApacheBench, Version 2.3 <$Revision: 655654 $>
03 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
04 Licensed to The Apache Software Foundation, http://www.apache.org/
05
06
07 Benchmarking www.wirelessqa.com (be patient)
08 Completed 100 requests
09 Completed 200 requests
10 Completed 300 requests
11 Completed 400 requests
12 Completed 500 requests
13 Completed 600 requests
14 Completed 700 requests
15 Completed 800 requests
16 Completed 900 requests
17 Completed 1000 requests
18 Finished 1000 requests
19
20
21
22
23 Server Software: IIS
24 Server Hostname: www.wirelessqa.com
25 Server Port: 80
26
27
28 Document Path: /?p=143
29 Document Length: 40865 bytes
30
31
32 Concurrency Level: 10
33 Time taken for tests: 349.234 seconds
34 Complete requests: 1000
35 Failed requests: 674
36 (Connect: 0, Receive: 0, Length: 674, Exceptions: 0)
37 Write errors: 0
38 Total transferred: 41114189 bytes
39 HTML transferred: 40889965 bytes
40 Requests per second: 2.86 [#/sec] (mean)
41 Time per request: 3492.343 [ms] (mean)
42 Time per request: 349.234 [ms] (mean, across all concurrent requests)
43 Transfer rate: 114.97 [Kbytes/sec] received
44
45
46 Connection Times (ms)
47 min mean[+/-sd] median max
48 Connect: 35 161 401.6 59 3394
49 Processing: 571 3282 2723.1 2648 28374
50 Waiting: 309 654 767.3 538 21420
51 Total: 610 3443 2777.4 2826 28514
52
53
54 Percentage of the requests served within a certain time (ms)
55 50% 2826
56 66% 3636
57 75% 4364
58 80% 4799
59 90% 6239
60 95% 7744
61 98% 11263
62 99% 14251
63 28514 (longest request)
结果:在同一时间有10个访问请求的情况下,完成1000次请求,失败674次,共花时间349.234秒,这个页面每秒平均处理2.86个请求
相关推荐
更新发布
功能测试和接口测试的区别
2023/3/23 14:23:39如何写好测试用例文档
2023/3/22 16:17:39常用的选择回归测试的方式有哪些?
2022/6/14 16:14:27测试流程中需要重点把关几个过程?
2021/10/18 15:37:44性能测试的七种方法
2021/9/17 15:19:29全链路压测优化思路
2021/9/14 15:42:25性能测试流程浅谈
2021/5/28 17:25:47常见的APP性能测试指标
2021/5/8 17:01:11