# sy_swoole **Repository Path**: open-php/sy_swoole ## Basic Information - **Project Name**: sy_swoole - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-03 - **Last Updated**: 2026-06-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ``` # my_sy symfony:8.0 php:8.4 需要下载symfony.exe https://symfony.com/download #### 运行 symfony server:start php bin/console swoole:server:run 清除缓存 php bin/console cache:clear ### 手动编译镜像 demo,在docker目录下 [//]: # (docker build -t phpswoole/phpswoole/swoole:6.2.0-php8.4 -f dockerfiles/6.0.2/php8.4/cli/Dockerfile .) #### 挂在工作目录 docker compose up swoole -d composer require symfony/maker-bundle --dev php bin/console make:entity --from-database php bin/console doctrine:query:sql "SELECT version()" php bin/console doctrine:query:sql "SELECT * FROM admin ORDER BY RAND() LIMIT 1" bin/console list Symfony 7.4.13 (env: dev, debug: true) Usage: command [options] [arguments] Options: -h, --help Display help for the given command. When no command is given display help for the list command --silent Do not output any message -q, --quiet Only errors are displayed. All other output is suppressed -V, --version Display this application version --ansi|--no-ansi Force (or disable --no-ansi) ANSI output -n, --no-interaction Do not ask any interactive question -e, --env=ENV The Environment name. [default: "dev"] --no-debug Switch off debug mode. --profile Enables profiling (requires debug). -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: about Display information about the current project completion Dump the shell completion script help Display help for a command list List commands assets assets:install Install bundle's web assets under a public directory cache cache:clear Clear the cache cache:pool:clear Clear cache pools cache:pool:delete Delete an item from a cache pool cache:pool:invalidate-tags Invalidate cache tags for all or a specific pool cache:pool:list List available cache pools cache:pool:prune Prune cache pools cache:warmup Warm up an empty cache config config:dump-reference Dump the default configuration for an extension debug debug:autowiring List classes/interfaces you can use for autowiring debug:config Dump the current configuration for an extension debug:container Display current services for an application debug:dotenv List all dotenv files with variables and values debug:event-dispatcher Display configured listeners for an application debug:router Display current routes for an application error error:dump Dump error pages to plain HTML files that can be directly served by a web server lint lint:container Ensure that arguments injected into services match type declarations lint:yaml Lint a YAML file and outputs encountered errors router router:match Help debug routes by simulating a path info match secrets secrets:decrypt-to-local Decrypt all secrets and stores them in the local vault secrets:encrypt-from-local Encrypt all local secrets to the vault secrets:generate-keys Generate new encryption keys secrets:list List all secrets secrets:remove Remove a secret from the vault secrets:reveal Reveal the value of a secret secrets:set Set a secret in the vault swoole swoole:server:profile Handle specified amount of requests to Swoole HTTP server. Useful for profiling. swoole:server:reload Reload Swoole HTTP server's workers running in the background. It will reload only classes not loaded before server initialization. swoole:server:run Run Swoole HTTP server. swoole:server:start Run Swoole HTTP server in the background. swoole:server:status Get current status of the Swoole HTTP Server by querying running API Server. swoole:server:stop Stop Swoole HTTP server running in the background. git bash执行 docker exec -i symfony-mysql mysql -usymfony -psymfony web < ./sql/web.sql ab -n 10000 -c 1000 http://127.0.0.1:9501/ test url: 随机数 http://127.0.0.1:9501/lucky/number/111 随机一条数据 http://127.0.0.1:9501/list PS D:\phpstudy_pro\Extensions\Apache2.4.43\bin> ./ab.exe -n 10000 -c 1000 http://127.0.0.1:9501/lucky/number/111 This is ApacheBench, Version 2.3 <$Revision: 1874286 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient) Completed 1000 requests Completed 2000 requests Completed 3000 requests Completed 4000 requests Completed 5000 requests Completed 6000 requests Completed 7000 requests Completed 8000 requests Completed 9000 requests Completed 10000 requests Finished 10000 requests Server Software: swoole-http-server Server Hostname: 127.0.0.1 Server Port: 9501 Document Path: /lucky/number/111 Document Length: 2 bytes Concurrency Level: 1000 Time taken for tests: 3.351 seconds Complete requests: 10000 Failed requests: 1924 (Connect: 0, Receive: 0, Length: 1924, Exceptions: 0) Total transferred: 2280184 bytes HTML transferred: 20184 bytes Requests per second: 2984.48 [#/sec] (mean) Time per request: 335.067 [ms] (mean) Time per request: 0.335 [ms] (mean, across all concurrent requests) Transfer rate: 664.57 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.3 0 3 Processing: 53 284 156.1 280 1278 Waiting: 16 185 170.7 142 1243 Total: 54 285 156.1 281 1278 Percentage of the requests served within a certain time (ms) 50% 281 66% 288 75% 292 80% 294 90% 307 95% 688 98% 764 99% 776 100% 1278 (longest request) PS D:\phpstudy_pro\Extensions\Apache2.4.43\bin> ./ab.exe -n 100000 -c 1000 http://127.0.0.1:9501/lucky/number/111 This is ApacheBench, Version 2.3 <$Revision: 1874286 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient) Completed 10000 requests Completed 20000 requests Completed 30000 requests Completed 40000 requests Completed 50000 requests Completed 60000 requests Completed 70000 requests Completed 80000 requests Completed 90000 requests Completed 100000 requests Finished 100000 requests Server Software: swoole-http-server Server Hostname: 127.0.0.1 Server Port: 9501 Document Path: /lucky/number/111 Document Length: 2 bytes Concurrency Level: 1000 Time taken for tests: 29.345 seconds Complete requests: 100000 Failed requests: 19906 (Connect: 0, Receive: 0, Length: 19906, Exceptions: 0) Total transferred: 22801614 bytes HTML transferred: 201614 bytes Requests per second: 3407.70 [#/sec] (mean) Time per request: 293.453 [ms] (mean) Time per request: 0.293 [ms] (mean, across all concurrent requests) Transfer rate: 758.80 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 2.3 0 508 Processing: 45 288 59.4 284 825 Waiting: 4 174 87.5 174 803 Total: 45 288 59.4 285 825 Percentage of the requests served within a certain time (ms) 50% 285 66% 288 75% 290 80% 291 90% 296 95% 302 98% 309 99% 777 100% 825 (longest request) PS D:\phpstudy_pro\Extensions\Apache2.4.43\bin> ./ab.exe -n 10000 -c 100 http://127.0.0.1:9501/lucky/number/111 This is ApacheBench, Version 2.3 <$Revision: 1874286 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient) Completed 1000 requests Completed 2000 requests Completed 3000 requests Completed 4000 requests Completed 5000 requests Completed 6000 requests Completed 7000 requests Completed 8000 requests Completed 9000 requests Completed 10000 requests Finished 10000 requests Server Software: swoole-http-server Server Hostname: 127.0.0.1 Server Port: 9501 Document Path: /lucky/number/111 Document Length: 2 bytes Concurrency Level: 100 Time taken for tests: 2.579 seconds Complete requests: 10000 Failed requests: 1934 (Connect: 0, Receive: 0, Length: 1934, Exceptions: 0) Total transferred: 2280082 bytes HTML transferred: 20082 bytes Requests per second: 3878.10 [#/sec] (mean) Time per request: 25.786 [ms] (mean) Time per request: 0.258 [ms] (mean, across all concurrent requests) Transfer rate: 863.51 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.3 0 2 Processing: 4 25 3.5 26 35 Waiting: 2 18 5.7 18 34 Total: 4 25 3.5 26 35 Percentage of the requests served within a certain time (ms) 50% 26 66% 27 75% 28 80% 28 90% 29 95% 30 98% 31 99% 32 100% 35 (longest request) ```