亚洲中字慕日产2020,大陆极品少妇内射AAAAAA,无码av大香线蕉伊人久久,久久精品国产亚洲av麻豆网站

資訊專欄INFORMATION COLUMN

2017 非標(biāo)準(zhǔn) PHP 框架性能測(cè)試比較

aikin / 3871人閱讀

摘要:我最近在給完善說明文檔有一節(jié)是性能測(cè)試比較才有了下面這個(gè)項(xiàng)目項(xiàng)目托管地址針對(duì)上比較活躍的幾個(gè)開源項(xiàng)目,做了簡(jiǎn)單的比較。供大家參考所有框架僅輸出就僅測(cè)試框架的本身的性能。如果有精力可以測(cè)下帶有數(shù)據(jù)庫交互的測(cè)試。祝國內(nèi)產(chǎn)生更多優(yōu)秀的開源產(chǎn)品

我最近在給tastphp 完善說明文檔 有一節(jié)是性能測(cè)試比較 ,才有了下面這個(gè)項(xiàng)目

項(xiàng)目托管地址: https://github.com/xujiajun/p...

針對(duì)github上比較活躍的幾個(gè)開源項(xiàng)目,做了簡(jiǎn)單的比較。供大家參考:

php framework benchmark (include laravel、symfony、silex、lumen、slim、yii2、tastphp)

所有框架僅輸出 "ok",就僅測(cè)試框架的本身的性能。如果有精力可以測(cè)下帶有數(shù)據(jù)庫交互的測(cè)試。

以下測(cè)試僅供參考,如果你想測(cè)的準(zhǔn),建議在生產(chǎn)環(huán)境測(cè)試!

測(cè)試的環(huán)境
OS Name:        Mac OS X
OS Version:     10.12.6
Architecture:   x86_64
CPU:Intel Core i7  1.7 GHz *2
RAM:8 GB
PHP version 7.1.10
opcache 開的
各個(gè)框架的版本
Laravel version 5.5.0
Lumen version 5.5.0
symfony version 3.3.10
Silex version 2.0.2
Silm version 3.1.4
yii2 version 2.0.12
Tastphp version 1.3.6
測(cè)試結(jié)果

Detail Laravel ab test

Laravel version 5.5.0

optimization

run commands before test:

composer install --optimize-autoloader
php artisan config:cache
// php artisan route:cache  //cannot use route caching if you have ANY route closures

ab test result:

?  laravel-5.5.0 git:(master) ? ab -n 1000 -c 100 http://laravel-benchmark.dev/
This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking laravel-benchmark.dev (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:        nginx/1.12.0
Server Hostname:        laravel-benchmark.dev
Server Port:            80

Document Path:          /
Document Length:        2 bytes

Concurrency Level:      100
Time taken for tests:   3.295 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      982346 bytes
HTML transferred:       2000 bytes
Requests per second:    303.46 [#/sec] (mean)
Time per request:       329.538 [ms] (mean)
Time per request:       3.295 [ms] (mean, across all concurrent requests)
Transfer rate:          291.11 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   1.8      0       8
Processing:    22  311  59.4    315     571
Waiting:       22  311  59.4    315     571
Total:         30  312  58.0    315     571

Percentage of the requests served within a certain time (ms)
  50%    315
  66%    335
  75%    351
  80%    354
  90%    362
  95%    367
  98%    378
  99%    407
 100%    571 (longest request)
Lumen version 5.5.0

run commands before test:

composer install --optimize-autoloader

ab test result:

?  lumen-5.5.0 git:(master) ? ab -n 1000 -c 100 http://lumen-benchmark.dev/
This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking lumen-benchmark.dev (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:        nginx/1.12.0
Server Hostname:        lumen-benchmark.dev
Server Port:            80

Document Path:          /
Document Length:        2 bytes

Concurrency Level:      100
Time taken for tests:   0.639 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      199000 bytes
HTML transferred:       2000 bytes
Requests per second:    1565.02 [#/sec] (mean)
Time per request:       63.897 [ms] (mean)
Time per request:       0.639 [ms] (mean, across all concurrent requests)
Transfer rate:          304.14 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.9      0       6
Processing:     9   61   9.9     62      74
Waiting:        9   61   9.9     62      74
Total:         14   61   9.1     62      74

Percentage of the requests served within a certain time (ms)
  50%     62
  66%     64
  75%     65
  80%     66
  90%     68
  95%     71
  98%     72
  99%     73
 100%     74 (longest request)
Symfony version 3.3.10

run commands before test:

composer install --optimize-autoloader

ab test result:

?  symfony-3.3.10 git:(master) ? ab -n 1000 -c 100 http://symfony-benchmark.dev/
This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking symfony-benchmark.dev (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:        nginx/1.12.0
Server Hostname:        symfony-benchmark.dev
Server Port:            80

Document Path:          /
Document Length:        2 bytes

Concurrency Level:      100
Time taken for tests:   1.716 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      237000 bytes
HTML transferred:       2000 bytes
Requests per second:    582.60 [#/sec] (mean)
Time per request:       171.646 [ms] (mean)
Time per request:       1.716 [ms] (mean, across all concurrent requests)
Transfer rate:          134.84 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   0.9      0       5
Processing:    12  163  34.6    168     218
Waiting:       12  163  34.6    168     218
Total:         17  163  33.9    169     218
WARNING: The median and mean for the initial connection time are not within a normal deviation
        These results are probably not that reliable.

Percentage of the requests served within a certain time (ms)
  50%    169
  66%    176
  75%    184
  80%    187
  90%    199
  95%    207
  98%    211
  99%    213
 100%    218 (longest request)
Silex version 2.0.2

run commands before test:

composer install --optimize-autoloader

ab test result:

?  silex-2.0.2 git:(master) ? ab -n 1000 -c 100 http://silex-benchmark.dev/
This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking silex-benchmark.dev (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:        nginx/1.12.0
Server Hostname:        silex-benchmark.dev
Server Port:            80

Document Path:          /
Document Length:        2 bytes

Concurrency Level:      100
Time taken for tests:   0.747 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      237000 bytes
HTML transferred:       2000 bytes
Requests per second:    1338.53 [#/sec] (mean)
Time per request:       74.709 [ms] (mean)
Time per request:       0.747 [ms] (mean, across all concurrent requests)
Transfer rate:          309.80 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.9      0       4
Processing:    15   71   9.3     73      88
Waiting:       15   71   9.3     73      88
Total:         20   72   8.6     73      89

Percentage of the requests served within a certain time (ms)
  50%     73
  66%     74
  75%     75
  80%     76
  90%     79
  95%     81
  98%     82
  99%     84
 100%     89 (longest request)
slim version 3.1.4

run commands before test:

composer install --optimize-autoloader

ab test:

?  silm-3.1.4 git:(master) ? ab -n 1000 -c 100 http://slim-benchmark.dev/
This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking slim-benchmark.dev (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:        nginx/1.12.0
Server Hostname:        slim-benchmark.dev
Server Port:            80

Document Path:          /
Document Length:        2 bytes

Concurrency Level:      100
Time taken for tests:   0.703 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      333000 bytes
HTML transferred:       2000 bytes
Requests per second:    1423.44 [#/sec] (mean)
Time per request:       70.252 [ms] (mean)
Time per request:       0.703 [ms] (mean, across all concurrent requests)
Transfer rate:          462.90 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.0      0       5
Processing:     7   67  15.7     65     210
Waiting:        7   66  15.7     65     210
Total:         12   67  15.1     66     210

Percentage of the requests served within a certain time (ms)
  50%     66
  66%     69
  75%     70
  80%     72
  90%     88
  95%     96
  98%    102
  99%    105
 100%    210 (longest request)
yii2 version 2.0.12

run commands before test:

composer install --optimize-autoloader

ab test result:

?  yii2-2.0.12 git:(master) ? ab -n 1000 -c 100 http://yii2-benchmark.dev/
This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking yii2-benchmark.dev (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:        nginx/1.12.0
Server Hostname:        yii2-benchmark.dev
Server Port:            80

Document Path:          /
Document Length:        2 bytes

Concurrency Level:      100
Time taken for tests:   0.649 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      165000 bytes
HTML transferred:       2000 bytes
Requests per second:    1539.74 [#/sec] (mean)
Time per request:       64.946 [ms] (mean)
Time per request:       0.649 [ms] (mean, across all concurrent requests)
Transfer rate:          248.10 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.0      0       5
Processing:    16   62   9.2     61      96
Waiting:       16   62   9.2     61      96
Total:         21   62   9.2     61      98

Percentage of the requests served within a certain time (ms)
  50%     61
  66%     64
  75%     67
  80%     69
  90%     73
  95%     77
  98%     89
  99%     94
 100%     98 (longest request)
Tastphp version 1.3.6

run commands before test:

composer install --optimize-autoloader
php bin/console cache:config
php bin/console cache:route

?  tastphp-1.3.6 git:(master) mv config/example.app.yml config/app.yml
?  tastphp-1.3.6 git:(master) cat config/app.yml
version: v1.3.6
debug: false
secret: tastphp
# dev | test | prod
env: prod
timezone: UTC
name: tastphp

ab test result:

?  tastphp-1.3.6 git:(master) ? ab -n 1000 -c 100 http://tastphp-benchmark.dev/
This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking tastphp-benchmark.dev (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:        nginx/1.12.0
Server Hostname:        tastphp-benchmark.dev
Server Port:            80

Document Path:          /
Document Length:        2 bytes

Concurrency Level:      100
Time taken for tests:   0.487 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      165000 bytes
HTML transferred:       2000 bytes
Requests per second:    2051.92 [#/sec] (mean)
Time per request:       48.735 [ms] (mean)
Time per request:       0.487 [ms] (mean, across all concurrent requests)
Transfer rate:          330.63 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.8      0       4
Processing:     7   46   7.5     48      55
Waiting:        7   46   7.5     48      55
Total:         11   46   6.8     48      56

Percentage of the requests served within a certain time (ms)
  50%     48
  66%     49
  75%     50
  80%     51
  90%     52
  95%     53
  98%     54
  99%     55
 100%     56 (longest request)
廣告時(shí)間 start 關(guān)注下:

?

tastphp 骨架: https://github.com/tastphp/ta...

tastphp 內(nèi)核: https://github.com/tastphp/fr...

最近也在編寫以實(shí)際項(xiàng)目來說明 tastphp 的簡(jiǎn)單優(yōu)雅好用

中文文檔: https://github.com/tastphp/ta...

歡迎 PR、issure 給我 你的 star,確實(shí)給我不小鼓勵(lì)!讓我堅(jiān)持下去。祝國內(nèi)產(chǎn)生更多優(yōu)秀的開源產(chǎn)品!

文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請(qǐng)注明本文地址:http://www.ezyhdfw.cn/yun/30698.html

相關(guān)文章

  • 使用jMeter構(gòu)造大量并發(fā)HTTP請(qǐng)求進(jìn)行微服務(wù)性能測(cè)

    摘要:比如我開發(fā)好了一個(gè)微服務(wù),想測(cè)試其在大并發(fā)請(qǐng)求下的性能表現(xiàn)如何。比較方便的一個(gè)做法是使用工具來構(gòu)造這些請(qǐng)求。這個(gè)請(qǐng)求的意思是使用請(qǐng)求查詢賬號(hào)名稱為的實(shí)例。維護(hù)完畢之后點(diǎn)執(zhí)行按鈕,會(huì)觀察到個(gè)線程同時(shí)發(fā)出請(qǐng)求,并能看到每個(gè)請(qǐng)求的響應(yīng)時(shí)間。 比如我開發(fā)好了一個(gè)微服務(wù),想測(cè)試其在大并發(fā)請(qǐng)求下的性能表現(xiàn)如何。 比較方便的一個(gè)做法是使用工具jMeter來構(gòu)造這些請(qǐng)求。 創(chuàng)建一個(gè)新的工程: show...

    LeanCloud 評(píng)論0 收藏0
  • node.js中文資料導(dǎo)航

    摘要:中文資料導(dǎo)航官網(wǎng)七牛鏡像深入淺出系列進(jìn)階必讀中文文檔被誤解的編寫實(shí)戰(zhàn)系列熱門模塊排行榜,方便找出你想要的模塊多線程,真正的非阻塞淺析的類利用編寫異步多線程的實(shí)例中與的區(qū)別管道拒絕服務(wù)漏洞高級(jí)編程業(yè)界新聞看如何評(píng)價(jià)他們的首次嘗鮮程序員如何說服 node.js中文資料導(dǎo)航 Node.js HomePage Node官網(wǎng)七牛鏡像 Infoq深入淺出Node.js系列(進(jìn)階必讀) Nod...

    geekidentity 評(píng)論0 收藏0
  • 朋友當(dāng)初選擇測(cè)行業(yè)大家都嘲笑他,如今月薪17K實(shí)力打我的臉...

    摘要:我一個(gè)朋友就是選擇性能測(cè)試如今幾經(jīng)月薪一什么是性能測(cè)試性能測(cè)試是指通過特定方式,對(duì)被測(cè)系統(tǒng)按照一定策略施加壓力,獲取系統(tǒng)響應(yīng)時(shí)間吞吐量資源利用率等性能指標(biāo),以期保證生產(chǎn)系統(tǒng)的性能能夠滿足用戶需求的過程。 ...

    acrazing 評(píng)論0 收藏0

發(fā)表評(píng)論

0條評(píng)論

aikin

|高級(jí)講師

TA的文章

閱讀更多
最新活動(dòng)
閱讀需要支付1元查看
<