網站壓力測試工具Siege

Siege

[官方網站][1] [github][2] [1]: https://www.joedog.org/ [2]: https://github.com/JoeDog/siegegit

###Siege的安裝github

<!-- lang: shell -->
wget http://download.joedog.org/siege/siege-latest.tar.gz
tar -zxvf siege-latest.tar.gz
cd siege-3.0.9/
./configure
make
make install

###Siege的簡單使用shell

<!-- lang: shell -->
siege -c 50 -r 20 'http://localhost:5000'
併發五十用戶訪問本地5000端口20次,共1000次訪問(GET)
siege -c 50 -r 20 'http://localhost:5000 POST request'

readme併發

  • -c 模擬c個用戶同時訪問
  • -r 模擬c個用戶須要訪問r次
  • -f 指定一個文件,文件內容< 'http://localhost:5000'

###Siege測試結果分析測試

Result:網站

  • Transactions: 1000 hits
  • Availability: 100.00 %
  • Elapsed time: 1.12 secs
  • Data transferred: 0.09 MB
  • Response time: 0.05 secs
  • Transaction rate: 892.86 trans/sec
  • Throughput: 0.08 MB/sec
  • Concurrency: 48.96
  • Successful transactions: 1000
  • Failed transactions: 0
  • Longest transaction: 0.12
  • Shortest transaction: 0.01

ps:完成1000次處理,百分百成功,共耗時1.12秒,傳輸數據爲0.09MB,響應時間爲0.05秒,平均每秒完成892.86次處理, 平均每秒傳輸數據爲0.08MB,實際併發訪問爲48.96,成功處理1000次,失敗次數爲0,每次傳輸花費最高時長爲0.12秒, 最短期爲0.01秒url

######參考.net

相關文章
相關標籤/搜索