thinkphp适配php8,Swoole 适配 ThinkPHP 5 ab 压力测试 与 原生 ThinkPHP 对比
swoole 适配 thinkphp 5.0.21

Server Software: swoole-http-server
Server Hostname: 127.0.0.1
Server Port: 9501
Document Path: /
Document Length: 39 bytes
Concurrency Level: 10
Time taken for tests: 2.378 seconds
Complete requests: 10000
Failed requests: 0
Total transferred: 1870000 bytes
HTML transferred: 390000 bytes
Requests per second: 4204.38 [#/sec] (mean)
Time per request: 2.378 [ms] (mean)
Time per request: 0.238 [ms] (mean, across all concurrent requests)
Transfer rate: 767.79 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 2
Processing: 1 2 1.2 2 21
Waiting: 1 2 1.1 2 21
Total: 1 2 1.1 2 21
与原生 ThinkPHP 对比

Server Software: nginx/1.15.3
Server Hostname: 127.0.0.1
Server Port: 8080
Document Path: /index.php
Document Length: 39 bytes
Concurrency Level: 10
Time taken for tests: 48.468 seconds
Complete requests: 10000
Failed requests: 0
Total transferred: 2020000 bytes
HTML transferred: 390000 bytes
Requests per second: 206.32 [#/sec] (mean)
Time per request: 48.468 [ms] (mean)
Time per request: 4.847 [ms] (mean, across all concurrent requests)
Transfer rate: 40.70 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 2 75.8 0 3611
Processing: 9 45 73.4 42 3651
Waiting: 9 45 73.4 42 3651
Total: 9 47 105.2 42 3651
原生 PHP 输出 hello world

Server Software: nginx/1.15.3
Server Hostname: 127.0.0.1
Server Port: 8080
Document Path: /hello_world.php
Document Length: 11 bytes
Concurrency Level: 10
Time taken for tests: 0.870 seconds
Complete requests: 5000
Failed requests: 0
Total transferred: 870000 bytes
HTML transferred: 55000 bytes
Requests per second: 5749.02 [#/sec] (mean)
Time per request: 1.739 [ms] (mean)
Time per request: 0.174 [ms] (mean, across all concurrent requests)
Transfer rate: 976.88 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 2
Processing: 1 2 0.5 1 5
Waiting: 1 1 0.4 1 4
Total: 1 2 0.5 2 5
本机配置

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)