Browse Source

Update for Simps (#5676)

* add hook

* Update benchmark_config.json

* Update README.md
Luffy 5 years ago
parent
commit
9001e488cb

+ 2 - 6
frameworks/PHP/simps/README.md

@@ -8,7 +8,7 @@
 [![Latest Version](https://img.shields.io/packagist/v/simple-swoole/simps.svg)](https://packagist.org/packages/simple-swoole/simps)
 [![Simps Doc](https://img.shields.io/badge/docs-passing-blue.svg)](https://doc.simps.io)
 [![Contact Simps Team](https://img.shields.io/badge/[email protected]?style=flat)](mailto:[email protected])
-[![Php Version](https://img.shields.io/badge/php-%3E=7.2-brightgreen.svg)](https://www.php.net)
+[![Php Version](https://img.shields.io/badge/php-%3E=7.1-brightgreen.svg)](https://www.php.net)
 [![Swoole Version](https://img.shields.io/badge/swoole-%3E=4.4.0-brightgreen.svg)](https://github.com/swoole/swoole-src)
 
 # Simps Benchmarking Test
@@ -34,10 +34,6 @@ The tests were run with:
 
 http://localhost:8080/json
 
-### PLAINTEXT
-
-http://localhost:8080/plaintext
-
 ### DB
 
 http://localhost:8080/db
@@ -52,4 +48,4 @@ http://localhost:8080/fortunes
 
 ### QUERY
 
-http://localhost:8080/queries/
+http://localhost:8080/queries/

+ 0 - 1
frameworks/PHP/simps/benchmark_config.json

@@ -4,7 +4,6 @@
     {
       "default": {
         "json_url": "/json",
-        "plaintext_url": "/plaintext",
         "db_url": "/db",
         "fortune_url": "/fortunes",
         "update_url": "/updates/",

+ 4 - 2
frameworks/PHP/simps/sbin/simps.php

@@ -1,8 +1,10 @@
 #!/usr/bin/env php
 <?php
-! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
-! defined('CONFIG_PATH') && define('CONFIG_PATH', dirname(__DIR__) . '/config/');
+!defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
+!defined('CONFIG_PATH') && define('CONFIG_PATH', dirname(__DIR__) . '/config/');
+!defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
 
 require BASE_PATH . '/vendor/autoload.php';
 
+\Swoole\Runtime::enableCoroutine(SWOOLE_HOOK_FLAGS);
 Simps\Application::run();