Skip to content

Zeroplex 生活隨筆

小 縮小字型大小。 中 重設字型大小。 大 放大字型大小。

用 Siege 替代 Apache Bench

Posted on 2022 年 2 月 14 日2022 年 2 月 14 日 By 日落 在〈用 Siege 替代 Apache Bench〉中尚無留言

查資料注意到 Apache Bench 並沒有 follow redirect 的功能,因此部分的測試可能會不準確。

文章中看到作者推薦了一個新的工具 – Siege,一個功能比 Apache Bench 更完整的 HTTP server 壓力測試工具,可以支援的功能也更齊全:

$ siege -C
CURRENT  SIEGE  CONFIGURATION
Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/4.0.4
Edit the resource file to change the settings.
----------------------------------------------
version:                        4.0.4
verbose:                        false
color:                          true
quiet:                          false
debug:                          false
protocol:                       HTTP/1.1
HTML parser:                    disabled
get method:                     HEAD
connection:                     close
concurrent users:               25
time to run:                    n/a
repetitions:                    n/a
socket timeout:                 30
cache enabled:                  false
.....

執行測試的範例:

$ siege -c 1 -r 100 'https://www.your.domain/'
** SIEGE 4.0.4
** Preparing 1 concurrent users for battle.
The server is now under siege...
Transactions:                    200 hits
Availability:                 100.00 %
Elapsed time:                  43.85 secs
Data transferred:               0.53 MB
Response time:                  0.22 secs
Transaction rate:               4.56 trans/sec
Throughput:                     0.01 MB/sec
Concurrency:                    1.00
Successful transactions:         200
Failed transactions:               0
Longest transaction:            0.58
Shortest transaction:           0.11
Tags:網路架站

文章導覽

Previous Post: 手動更新 Office 365 的操作流程
Next Post: 社群大小與活躍程度影響工具選擇

發佈留言 取消回覆

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

其他

關於我  (About me)

小額贊助

  文章 RSS Feed

  留言 RSS Feed

Apache AWS Bash C/C++ Docker FreeBSD Git Google Java JavaScript Laravel Linux Microsoft MSSQL MySQL Nginx PHP PHPUnit PostgreSQL Python Qt Ubuntu Unix Vim Web Windows WordPress XD 作業系統 分享 好站推薦 專題 小提琴 攝影 新奇搞笑 新聞 旅遊 生活雜記 程式設計 網路架站 網頁設計 資訊學習 資訊安全 遊戲 音樂


創用 CC 授權條款
本著作係採用創用 CC 姓名標示-相同方式分享 4.0 國際 授權條款授權.

Go to mobile version