myron / swoole-pool
swoole pool 框架
dev-master
2019-07-31 02:07 UTC
Requires
- php: >=7.2
Requires (Dev)
- phpunit/phpunit: ^7.0
- swoole: ^4.4
This package is auto-updated.
Last update: 2019-12-31 00:24:15 UTC
README
为swoole4.4编写的swoole-pool
安装
composer require myron/swoole-pool
phpunit 测试
#: cd Mecyu/SwoolePool
SwoolePool#: phpunit
运行服务器 && ab 测试
使用默认的mysql数据库,要更改数据库
SwoolePool#: vim server.php
将'$this->pool = pool('Mysql');'更改为'$this->pool = pool('Redis');'
在一个终端中
SwoolePool#: php server.php
在另一个终端中
SwoolePool#: ab -c 200 -n 100000 -k http://127.0.0.1:9501/
注意
为了确保所有步骤成功运行,请确保您正在使用
`
php7.2版本
phpunit7.0
swoole4.4。
`
- 谢谢!
- 这是我关于swoole的学习项目。感谢您的观看和宝贵意见!