Siege is an http load testing and benchmarking utility. It was designed to let web developers measure their code under duress, to see how it will stand up to load on the internet. Siege supports basic authentication, cookies, HTTP and HTTPS protocols. It lets its user hit a web server with a configurable number of simulated web browsers. Those browsers place the server “under siege.”
下载最新版
wget http://www.joedog.org/pub/siege/siege-latest.tar.gz
tar -zxf siege-lastest.tar.gz
cd siege-xxx
./configure && make && install
vi /tmp/tmpurl
http://127.0.0.1/index.html
http://127.0.0.1/images/banner/1.jpg
http://127.0.0.1/images/banner/8.jpg
siege -c 100 -b -i -r 100 -f /tmp/tmpurl
100个用户,执行100次。
** SIEGE 3.0.0
** Preparing 100 concurrent users for battle.
The server is now under siege.. done.Transactions: 10000 hits
Availability: 100.00 %
Elapsed time: 2.44 secs
Data transferred: 1396.79 MB
Response time: 0.02 secs
Transaction rate: 4098.36 trans/sec
Throughput: 572.45 MB/sec
Concurrency: 91.24
Successful transactions: 10000
Failed transactions: 0
Longest transaction: 0.23
Shortest transaction: 0.00