web压力测试之siege

1 篇文章 0 订阅
1 篇文章 0 订阅

siege一个不错开源软件。

1、官方网站:http://www.joedog.org/JoeDog/Siege
2、下载地址:ftp://ftp.joedog.org/pub/siege/siege-2.65.tar.gz
3、安装方法:
tar zxvf siege-2.65.tar.gz
cd siege-2.65
./configure
make
make install
4、参数说明:
siege 2.65
Usage: siege [options]
       siege [options] URL
       siege -g URL
Options:
  -V, --version           VERSION, prints version number to screen.
  -h, --help              HELP, prints this section.
  -C, --config            CONFIGURATION, show the current configuration.
  -v, --verbose           VERBOSE, prints notification to screen.
  -g, --get               GET, pull down headers from the server and display HTTP
                          transaction. Great for web application debugging.
  -c, --concurrent=NUM    CONCURRENT users, default is 10    //并发用户数量,缺省为10
  -u, --url="URL"         Deprecated. Set URL as the last argument.   //要做压力测试的url
  -i, --internet          INTERNET user simulation, hits the URLs randomly.  //模拟internet用户随机访问url
  -b, --benchmark         BENCHMARK, signifies no delay for time testing.  //hit没有时间间隔
  -t, --time=NUMm         TIME based testing where "m" is the modifier S, M, or H //压力测试持续的时间
                          no space between NUM and "m", ex: --time=1H, one hour test.
  -r, --reps=NUM          REPS, number of times to run the test, default is 25  //压力测试的次数缺省为25
  -f, --file=FILE         FILE, change the configuration file to file.   //测试的url列表文件
  -R, --rc=FILE           RC, change the siegerc file to file.  Overrides
                          the SIEGERC environmental variable.
  -l, --log               LOG, logs the transaction to PREFIX/var/siege.log  
  -m, --mark="text"       MARK, mark the log file with a string separator.
  -d, --delay=NUM         Time DELAY, random delay between 1 and num designed
                          to simulate human activity. Default value is 3
  -H, --header="text"     Add a header to request (can be many)
  -A, --user-agent="text" Sets User-Agent in request

siege -c 10  -r 2 "http://www.sina.com.cn"    //10个并发做两次测试
siege -c 10  -t 1m "http://www.sina.com.cn"   //10个并发持续一分钟
siege -c 10  -t 1m -i -f urllist.txt       //10个并发持续一分钟,模拟internat方式访问,urllist.txt内容为所有要做测试的url
5、测试结果:
Lifting the server siege...      done.
Transactions:                   1090 hits
Availability:                 100.00 %
Elapsed time:                  59.72 secs
Data transferred:              57.00 MB
Response time:                  0.06 secs
Transaction rate:              18.25 trans/sec
Throughput:                     0.95 MB/sec
Concurrency:                    1.00
Successful transactions:        1090
Failed transactions:               0
Longest transaction:            3.03
Shortest transaction:           0.00

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值