支持Https的压力测试工具
作者:网络转载 发布时间:[ 2015/7/23 13:45:35 ] 推荐标签:软件测试工具 压力测试
六、httperf工具,来自hp的工具,不过已经n年没有更新了。
wget ftp://ftp.hpl.hp.com/pub/httperf/httperf-0.9.0.tar.gz
$ mkdir build
$ cd build
$ SRCDIR/configure
$ make
$ make install
工具使用方法:
/usr/local/bin/httperf –help
Usage: httperf [-hdvV] [--add-header S] [--burst-length N] [--client N/N]
[--close-with-reset] [--debug N] [--failure-status N]
[--help] [--hog] [--http-version S] [--max-connections N]
[--max-piped-calls N] [--method S] [--no-host-hdr]
[--num-calls N] [--num-conns N] [–period [d|u|e]T1[,T2]]
[--port N] [–print-reply [header|body]] [–print-request [header|body]]
[--rate X] [--recv-buffer N] [--retry-on-failure] [--send-buffer N]
[--server S] [--server-name S] [--session-cookies]
[--ssl] [--ssl-ciphers L] [--ssl-no-reuse]
[--think-timeout X] [--timeout X] [--uri S] [--verbose] [--version]
[--wlog y|n,file] [--wsess N,N,X] [--wsesslog N,X,file]
[--wset N,X]
如:
/usr/local/bin/httperf –server www.2hei.net
–port 443 –uri /mt/index.html
–rate 15 –num-conn 1000
–num-call 1 –timeout 5
发现会有如下错误:
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE
以下是解决办法:
# Edit /etc/security/limits.conf and add the line * hard nofile 65535 (or instead of * you can put the username of the user for whom you want to change the limit)
# Edit /usr/include/bits/typesizes.h and change #define __FD_SET_SIZE 1024 to #define __FD_SET_SIZE 65535 (in /usr/include/sys/select.h FD_SETSIZE is defined as __FD_SETSIZE)
重新编译即可。
实例测试如下:
/usr/local/bin/httperf –client=0/1 –ssl –server=www.2hei.net –port=443 –uri=/mt/index.html –rate=1 –num-conns=1000 –rate=50 –num-calls=1 –hog
httperf –hog –client=0/1 –server=www.2hei.net –port=443 –uri=/mt/index.html –rate=50 –send-buffer=4096 –rec
v-buffer=16384 –ssl –num-conns=1000 –num-calls=1
Maximum connect burst length: 1
Total: connections 1000 requests 1000 replies 1000 test-duration 33.758 s
Connection rate: 29.6 conn/s (33.8 ms/conn, <=394 concurrent connections)
Connection time [ms]: min 73.1 avg 6513.5 max 22013.1 median 5371.5 stddev 4176.3
Connection time [ms]: connect 5670.7
Connection length [replies/conn]: 1.000
Request rate: 29.6 req/s (33.8 ms/req)
Request size [B]: 80.0
Reply rate [replies/s]: min 26.6 avg 31.3 max 33.6 stddev 2.4 (6 samples)
Reply time [ms]: response 842.7 transfer 0.0
Reply size [B]: header 331.0 content 163.0 footer 2.0 (total 496.0)
Reply status: 1xx=0 2xx=1000 3xx=0 4xx=0 5xx=0
CPU time [s]: user 9.91 system 23.11 (user 29.4% system 68.5% total 97.8%)
Net I/O: 16.6 KB/s (0.1*10^6 bps)
Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0
本文内容不用于商业目的,如涉及知识产权问题,请权利人联系SPASVO小编(021-61079698-8054),我们将立即处理,马上删除。
相关推荐
更新发布
功能测试和接口测试的区别
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热门文章
常见的移动App Bug??崩溃的测试用例设计如何用Jmeter做压力测试QC使用说明APP压力测试入门教程移动app测试中的主要问题jenkins+testng+ant+webdriver持续集成测试使用JMeter进行HTTP负载测试Selenium 2.0 WebDriver 使用指南