压力测试工具ApacheBench使用体会

一、简介

ApacheBench,简称ab,是 Apache 附带的一个小工具,专门用于 HTTP Server 的压力测试。

二、使用方法

最常用的使用方法如下:

ab -n 10 -c 10 http://www.google.com

这个命令表示向www.google.com发送10个请求,一次并发请求数为10次,即一次发送完10个请求。

所有可用参数如下:

Usage: /usr/local/apache/bin/ab [options] [http://]hostname[:port]/path 
Options are: 
-n requests Number of requests to perform 
-c concurrency Number of multiple requests to make 
-t timelimit Seconds to max. wait for responses 
-p postfile File containg data to POST 
-T content-type Content-type header for POSTing 
-v verbosity How much troubleshooting info to print 
-w Print out results in HTML tables 
-x attributes String to insert as table attributes 
-y attributes String to insert as tr attributes 
-z attributes String to insert as td or th attributes 
-V Print version number and exit 
-k Use HTTP KeepAlive feature 
-h Display usage information (this message)



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值