国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

如何測試php項目的并發(fā),php項目壓力測試,壓力測試結果分享

測試php項目的并發(fā)


環(huán)境:

php版本:php7.4

系統(tǒng)版本:Centos7 / Nginx 1.20

程序:      Think5.1做的一個網站


文章來源地址http://www.zghlxwxcb.cn/article/165.html


開始


1、安裝壓力測試工具ab

yum install httpd-tools -y


2、測試命令

ab -n 200 -c 2 http://測試網址/

//-n總的請求次數(shù)

//-c并發(fā)請求數(shù)

//-k是否開啟長連接


3、參數(shù)詳解

Benchmarking 測試網址 (be patient)
Completed 100 requests
Completed 200 requests
Finished 200 requests

#服務器軟件名稱及版本信息
Server Software:        nginx
#服務器主機名
Server Hostname:        測試網址
#服務器端口
Server Port:            80

#供測試的URL路徑
Document Path:          /
#供測試的URL返回的文檔大小
Document Length:        29167 bytes

#并發(fā)數(shù)
Concurrency Level:      2
#壓力測試消耗的總時間
Time taken for tests:   12.726 seconds

#壓力測試的的總次數(shù)
Complete requests:      200
#失敗的請求數(shù)
Failed requests:        178
   (Connect: 0, Receive: 0, Length: 178, Exceptions: 0)
#傳輸?shù)目倲?shù)據(jù)量
Total transferred:      5864178 bytes
#HTML文檔的總數(shù)據(jù)量
HTML transferred:       5833578 bytes
#平均每秒的請求數(shù)
Requests per second:    15.72 [#/sec] (mean)
#所有并發(fā)用戶(這里是100)都請求一次的平均時間
Time per request:       127.261 [ms] (mean)
#單個用戶請求一次的平均時間
Time per request:       63.630 [ms] (mean, across all concurrent requests)
#傳輸速率,單位:KB/s
Transfer rate:          450.00 [Kbytes/sec] received

#連接時間
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       1
Processing:    89  120  88.5    111    1350
Waiting:       89  119  88.4    110    1348
Total:         89  120  88.6    111    1351

#特定時間內服務的請求百分比(毫秒)
Percentage of the requests served within a certain time (ms)
  50%    111
  66%    115
  75%    119
  80%    123
  90%    132
  95%    145
  98%    162
  99%    165
 100%   1351 (longest request)



到此這篇關于如何測試php項目的并發(fā),php項目壓力測試,壓力測試結果分享的文章就介紹到這了,更多相關內容可以在右上角搜索或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!

原文地址:http://www.zghlxwxcb.cn/article/165.html

如若轉載,請注明出處: 如若內容造成侵權/違法違規(guī)/事實不符,請聯(lián)系站長進行投訴反饋,一經查實,立即刪除!

領支付寶紅包贊助服務器費用

相關文章

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領取紅包,優(yōu)惠每天領

二維碼1

領取紅包

二維碼2

領紅包