2012年1月10日火曜日

siege(stress tool)を使う

ab(apache bench)だと物足りなく、jMeterだと面倒で、なにか良さげなのは無いかと探していたら発見。
siege

install
$ sudo apt-get install siege

generate config
$ siege.config
$ grep -v -E "(^#|^$)" $HOME/.siegerc
logfile = $(HOME)/siege/siege.log
verbose = true
show-logfile = true
logging = true
protocol = HTTP/1.0
chunked = true
connection = close
concurrent = 15
file = $HOME/url.lst
delay = 1
internet = true
benchmark = true
accept-encoding = gzip
spinner = true

execute
$ siege -r 10

** SIEGE 2.66
** Preparing 15 concurrent users for battle.
The server is now under siege...
 .
 .
HTTP/1.1 200   0.03 secs:     103 bytes ==> /
HTTP/1.1 200   0.37 secs:      64 bytes ==> /
HTTP/1.1 200   0.01 secs:      51 bytes ==> /
 .
 .
done.                                                                                                                                                        Transactions:                     150 hits
Availability:                 100.00 %
Elapsed time:                   2.98 secs
Data transferred:               0.01 MB
Response time:                  0.27 secs
Transaction rate:              50.34 trans/sec
Throughput:                     0.00 MB/sec
Concurrency:                   13.80
Successful transactions:         150
Failed transactions:               0
Longest transaction:            0.88
Shortest transaction:           0.01
 

stress tool まとめ
http://www.softwareqatest.com/qatweb1.html

0 件のコメント:

コメントを投稿