Sfoglia il codice sorgente

Php optimize (#3165)

* Git ignore .vscode

* Updated: PHP 7.2.1, Phalcon 3.24, yaf 3.0.6
Deleted mcript module in php 7.2.1
Updated Readmes

* Laravel and Cakephp only php5
Until they upgrade the version
Joan Miquel 7 anni fa
parent
commit
4cc5c07aba

+ 3 - 0
.gitignore

@@ -53,6 +53,9 @@ benchmark.cfg
 # netbeans
 /nbproject
 
+# Visual Studio Code
+.vscode
+
 # vim
 .*.sw[a-p]
 

+ 3 - 3
frameworks/PHP/cakephp/README.md

@@ -19,10 +19,10 @@ Uses the CakePHP Model functionality.
 The tests were run with:
 
 * [Cake Version 2.10.4](https://cakephp.org/)
-* [PHP Version 5.6.30](http://www.php.net/) with FPM and APC
-* [PHP Version 7.1.4](http://www.php.net/) with FPM and Opcache
+* [PHP Version 5.6.32](http://www.php.net/) with FPM and APC
+* [PHP Version 7.2.1](http://www.php.net/) No PHP7 until upgrade the framework version
 * [nginx 1.12.0](http://nginx.org/)
-* [MySQL 5.7.19](https://dev.mysql.com/)
+* [MySQL 5.7.20](https://dev.mysql.com/)
 
 Cake Debug mode is set to 0 in [core.php](app/Config/core.php), as
 appropriate for a production deployment.

+ 28 - 52
frameworks/PHP/cakephp/benchmark_config.json

@@ -1,53 +1,29 @@
 {
-  "framework": "cakephp",
-  "tests": [{
-    "default": {
-      "setup_file": "setup",
-      "json_url": "/json",
-      "db_url": "/db",
-      "query_url": "/queries?queries=",
-      "fortune_url": "/fortunes",
-      "plaintext_url": "/plaintext",
-	  "update_url": "/updates?queries=",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Fullstack",
-      "database": "MySQL",
-      "framework": "cakephp",
-      "language": "PHP",
-      "flavor": "PHP7",
-      "orm": "Full",
-      "platform": "None",
-      "webserver": "nginx",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "CakePHP 2.10 (PHP7)",
-      "notes": "",
-      "versus": "php7"
-    },
-    "php5": {
-      "setup_file": "setup_php5",
-	  "json_url": "/json",
-	  "db_url": "/db",
-	  "query_url": "/queries?queries=",
-	  "fortune_url": "/fortunes",
-	  "plaintext_url": "/plaintext",
-	  "update_url": "/updates?queries=",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Fullstack",
-      "database": "MySQL",
-      "framework": "cakephp",
-      "language": "PHP",
-      "flavor": "PHP5",
-      "orm": "Full",
-      "platform": "None",
-      "webserver": "nginx",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "CakePHP 2.10 (PHP5)",
-      "notes": "",
-      "versus": "php-php5"
-    }
-  }]
-}
+    "framework": "cakephp",
+    "tests": [{
+        "default": {
+            "setup_file": "setup_php5",
+            "json_url": "/json",
+            "db_url": "/db",
+            "query_url": "/queries?queries=",
+            "fortune_url": "/fortunes",
+            "plaintext_url": "/plaintext",
+            "update_url": "/updates?queries=",
+            "port": 8080,
+            "approach": "Realistic",
+            "classification": "Fullstack",
+            "database": "MySQL",
+            "framework": "cakephp",
+            "language": "PHP",
+            "flavor": "PHP5",
+            "orm": "Full",
+            "platform": "None",
+            "webserver": "nginx",
+            "os": "Linux",
+            "database_os": "Linux",
+            "display_name": "CakePHP 2.10 (PHP5)",
+            "notes": "",
+            "versus": "php-php5"
+        }
+    }]
+}

+ 6 - 83
frameworks/PHP/laravel/benchmark_config.json

@@ -2,27 +2,9 @@
     "framework": "laravel",
     "tests": [{
         "default": {
-            "setup_file": "setup",
+            "setup_file": "setup_php5",
             "json_url": "/json",
             "plaintext_url": "/plaintext",
-            "port": 8080,
-            "approach": "Realistic",
-            "classification": "Fullstack",
-            "database": "None",
-            "framework": "laravel",
-            "language": "PHP",
-            "flavor": "PHP7",
-            "orm": "Raw",
-            "platform": "None",
-            "webserver": "nginx",
-            "os": "Linux",
-            "database_os": "Linux",
-            "display_name": "laravel",
-            "notes": "",
-            "versus": "php7"
-        },
-        "raw": {
-            "setup_file": "setup",
             "db_url": "/db",
             "query_url": "/query?queries=",
             "fortune_url": "/fortunes",
@@ -32,38 +14,20 @@
             "database": "MySQL",
             "framework": "laravel",
             "language": "PHP",
-            "flavor": "PHP7",
+            "flavor": "PHP5",
             "orm": "Raw",
             "platform": "None",
             "webserver": "nginx",
             "os": "Linux",
             "database_os": "Linux",
-            "display_name": "laravel-raw",
+            "display_name": "laravel 4.2 raw php5",
             "notes": "",
-            "versus": "php7"
+            "versus": "php-php5"
         },
-        "hhvm": {
+        "hhvm-raw": {
             "setup_file": "setup_hhvm",
             "json_url": "/json",
             "plaintext_url": "/plaintext",
-            "port": 8080,
-            "approach": "Realistic",
-            "classification": "Fullstack",
-            "database": "None",
-            "framework": "laravel",
-            "language": "PHP",
-            "flavor": "HHVM",
-            "orm": "Raw",
-            "platform": "None",
-            "webserver": "nginx",
-            "os": "Linux",
-            "database_os": "Linux",
-            "display_name": "laravel",
-            "notes": "",
-            "versus": "php7"
-        },
-        "hhvm-raw": {
-            "setup_file": "setup_hhvm",
             "db_url": "/db",
             "query_url": "/query?queries=",
             "fortune_url": "/fortunes",
@@ -79,50 +43,9 @@
             "webserver": "nginx",
             "os": "Linux",
             "database_os": "Linux",
-            "display_name": "laravel-raw",
+            "display_name": "laravel 4.2 raw hhvm",
             "notes": "",
             "versus": "php7"
-        },
-        "php5": {
-            "setup_file": "setup_php5",
-            "json_url": "/json",
-            "plaintext_url": "/plaintext",
-            "port": 8080,
-            "approach": "Realistic",
-            "classification": "Fullstack",
-            "database": "None",
-            "framework": "laravel",
-            "language": "PHP",
-            "flavor": "PHP5",
-            "orm": "Raw",
-            "platform": "None",
-            "webserver": "nginx",
-            "os": "Linux",
-            "database_os": "Linux",
-            "display_name": "laravel",
-            "notes": "",
-            "versus": "php-php5"
-        },
-        "php5-raw": {
-            "setup_file": "setup_php5",
-            "db_url": "/db",
-            "query_url": "/query?queries=",
-            "fortune_url": "/fortunes",
-            "port": 8080,
-            "approach": "Realistic",
-            "classification": "Fullstack",
-            "database": "MySQL",
-            "framework": "laravel",
-            "language": "PHP",
-            "flavor": "PHP5",
-            "orm": "Raw",
-            "platform": "None",
-            "webserver": "nginx",
-            "os": "Linux",
-            "database_os": "Linux",
-            "display_name": "laravel-raw",
-            "notes": "",
-            "versus": "php-php5"
         }
     }]
 }

+ 3 - 3
frameworks/PHP/laravel/readme.md

@@ -23,9 +23,9 @@ Uses Laravels template engine 'blade'
 The tests were run with:
 
 * [Laravel Version 4.2](http://laravel.com/)
-* [PHP Version 7.1.4](http://www.php.net/) with FPM and OPcache
-* [nginx 1.9.9](http://nginx.org/)
-* [MySQL 5.5.54](https://dev.mysql.com/)
+* [PHP Version 7.2.1](http://www.php.net/) No PHP7 until upgrade the framework version
+* [nginx 1.12.0](http://nginx.org/)
+* [MySQL 5.7.20](https://dev.mysql.com/)
 
 ## Test URLs
 ### JSON Encoding Test

+ 4 - 4
frameworks/PHP/phalcon-micro/README.md

@@ -22,10 +22,10 @@ Uses Phalcon's template engine 'Volt'
 ## Infrastructure Software Versions
 The tests were run with:
 
-* [Phalcon 1.0.0](http://phalconphp.com/)
-* [PHP Version 5.5.17](http://www.php.net/) with FPM, APC and Phalcon extension
-* [nginx 1.4.0](http://nginx.org/)
-* [MySQL 5.5.29](https://dev.mysql.com/)
+* [Phalcon 3.2.4](http://phalconphp.com/)
+* [PHP Version 5.6.32](http://www.php.net/) with FPM, APC and Phalcon extension
+* [nginx 1.12.0](http://nginx.org/)
+* [MySQL 5.7.20](https://dev.mysql.com/)
 
 ## Test URLs
 ### JSON Encoding Test

+ 3 - 3
frameworks/PHP/phalcon/README.md

@@ -23,9 +23,9 @@ Uses Phalcons template engine 'Volt'
 ## Infrastructure Software Versions
 The tests were run with:
 
-* [Phalcon 3.1.2](http://phalconphp.com/)
-* [PHP Version 7.1.4](http://www.php.net/) with FPM, OPcache and Phalcon extension
-* [nginx 1.9.9](http://nginx.org/)
+* [Phalcon 3.2.4](http://phalconphp.com/)
+* [PHP Version 7.2.1](http://www.php.net/) with FPM, OPcache and Phalcon extension
+* [nginx 1.12.0](http://nginx.org/)
 * [MySQL 5.5.54](https://dev.mysql.com/)
 * [MongoDB 2.4.8](https://mongodb.org/)
 

+ 3 - 3
frameworks/PHP/php/README.md

@@ -18,9 +18,9 @@ Use the PHP standard [JSON encoder](http://www.php.net/manual/en/function.json-e
 ## Infrastructure Software Versions
 The tests were run with:
 
-* [PHP Version 7.1.4](http://www.php.net/) with FPM and OPcache
-* [nginx 1.9.9](http://nginx.org/)
-* [MySQL 5.5.54](https://dev.mysql.com/)
+* [PHP Version 7.2.1](http://www.php.net/) with FPM and OPcache
+* [nginx 1.12.0](http://nginx.org/)
+* [MySQL 5.7.20](https://dev.mysql.com/)
 * [PHP ActiveRecord Nightly 20121221](http://www.phpactiverecord.org/)
 
 ## Test URLs

+ 3 - 3
frameworks/PHP/slim/README.md

@@ -18,9 +18,9 @@ Uses the PDO access layer
 The tests were run with:
 
 * [Slim 3.3.0](http://www.slimframework.com/)
-* [PHP Version 7.1.4](http://www.php.net/) with FPM and OPcache
-* [nginx 1.9.9](http://nginx.org/)
-* [MySQL 5.5.54](https://dev.mysql.com/)
+* [PHP Version 7.2.1](http://www.php.net/) with FPM and OPcache
+* [nginx 1.12.0](http://nginx.org/)
+* [MySQL 5.7.20](https://dev.mysql.com/)
 
 ## Test URLs
 ### JSON Encoding Test

+ 1 - 1
toolset/setup/linux/frameworks/phalcon.sh

@@ -7,7 +7,7 @@ fw_installed phalcon && return 0
 # Enable the PHP phalcon extension
 sed -i 's|;extension=phalcon.so|extension=phalcon.so|g' $PHP_HOME/lib/php.ini
 
-VERSION="3.1.2"
+VERSION="3.2.4"
 
 fw_get -O https://github.com/phalcon/cphalcon/archive/v${VERSION}.tar.gz
 fw_untar v${VERSION}.tar.gz

+ 13 - 0
toolset/setup/linux/frameworks/yaf3.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+
+fw_depends php7
+
+fw_installed yaf && return 0
+
+# Enable the PHP yaf extension
+sed -i 's|;extension=yaf.so|extension=yaf.so|g' $PHP_HOME/lib/php.ini
+printf "\n" | $PHP_HOME/bin/pecl -q install -f yaf-3.0.6
+
+echo "" > $IROOT/yaf.installed
+
+source $IROOT/yaf.installed

+ 2 - 2
toolset/setup/linux/languages/php/php7.sh

@@ -10,7 +10,7 @@ RETCODE=$(fw_exists ${IROOT}/php7.installed)
   source $IROOT/php7.installed
   return 0; }
 
-VERSION="7.1.4"
+VERSION="7.2.1"
 PHP_HOME=$IROOT/php-$VERSION
 
 rm -rf $IROOT/php7
@@ -21,7 +21,7 @@ cd php7
 
 echo "Configuring PHP quietly..."
 ./configure --prefix=$PHP_HOME --with-pdo-mysql \
-  --with-mcrypt --enable-intl --enable-mbstring \
+  --enable-intl --enable-mbstring \
   --enable-fpm --with-openssl --with-mysqli \
   --with-zlib --enable-opcache --quiet
 echo "Making PHP quietly..."