使用apache效能測試node

2021-08-02 02:10:12 字數 4598 閱讀 1279

apache的ab的用法是(用tomcat裡的ab.exe來測試):

(需要進到目錄/usr/bin/目錄裡)

ab常用引數的介紹:

-n :總共的請求執行數,預設是1

-c: 併發數,預設是1

-t:測試所進行的總時間,秒為單位,預設50000s

-p:post時的資料檔案

-w: 以html表的格式輸出結果[root@localhost bin]# ./ab

我用xshell開了2個視窗(乙個用ab,乙個用node dome.js)

[root@localhost bin]# ./ab -n 1000 -c 10

this is apachebench, version 2.3

licensed to the apache software foundation,

benchmarking 192.168.100.50 (be patient)

completed 100 requests

completed 200 requests

completed 300 requests

completed 400 requests

completed 500 requests

completed 600 requests

completed 700 requests

completed 800 requests

completed 900 requests

completed 1000 requests

finished 1000 requests

server software:        

server hostname:        192.168.100.50

server port:            2017

document path:          /

document length:        12 bytes

concurrency level:      10

time taken for tests:   0.399 seconds

complete requests:      1000

failed requests:        0

write errors:           0

total transferred:      113000 bytes

html transferred:       12000 bytes

requests per second:    2508.74 [#/sec] (mean)

time per request:       3.986 [ms] (mean)

time per request:       0.399 [ms] (mean, across all concurrent requests)

transfer rate:          276.84 [kbytes/sec] received

connection times (ms)

min  mean[+/-sd] median   max

connect:        0    0   0.3      0       7

processing:     0    4   4.5      2      38

waiting:        0    4   4.5      2      38

total:          1    4   4.5      2      38

percentage of the requests served within a certain time (ms)

50%      2

66%      3

75%      4

80%      5

90%      7

95%     11

98%     19

99%     35

100%     38 (longest request)

[root@localhost bin]#

apache效能測試

apache效能測試 好久沒有更新部落格了,最近實在太忙,由於電腦配置比較好,一時衝動用ab測試了一把apache。得出一些資料,希望對大家有幫助。ab是apache附帶的元件非常易於使用,ab可以直接再web伺服器上面使用,直接傳送請求到apache上。測試的響應時間正是伺服器的時間,不包括網路傳...

Apache效能測試工具Apache Bench

ab是apache超文字傳輸協議 http 的效能測試工具。其設計意圖是描繪當前所安裝的apache的執行效能,主要是顯示你安裝的apache每秒可以處理多少個請求。概要ab a auth username password c concurrency c cookie name value d e...

開源apache效能測試工具介紹

apache ab 簡單介紹 apache ab 的全稱是apachebench,是apache 附帶的乙個小工具,專門用於http server 的benchmark testing,可以同時模擬多個併發請求。使用比較簡單 測試環境 安裝apache ab 格式 格式 引數 n requests ...