Browse Source

Create new php-eloquent and php-laravel-query-builder tests (#4530)

* laravel: update to laravel 5.8
lumen: update to laravel 5.8 and phpdotenv 3.x

laravel-swoole: update to php 7.3, Swoole 4.3.0, Laravel 5.8, and laravel-swoole 2.6.5.3
lumen-swoole: update to php 7.3, Swoole 4.3.0, Laravel 5.8, and laravel-swoole 2.6.5.3, phpdotenv 3.x

laravel-swoole and lumen-swoole updated to swoole 4.3.0 and perhaps also laravel-swoole 2.6.5.3 resolves an issue where plaintext tests did not return data.  This happened presumably because the swoole server crashed.

swoole: update to php 7.3 and Swoole 4.3.0

* Create new php-eloquent and php-laravel-query-builder tests
use Laravel components without framework and measure overhead
Fix test warning for /?queries=0 tests for all PHP benchmark variations
Refactor ActiveRecord implementation (a 3rd party ORM) from default to php-activerecord
Brion Finlay 6 years ago
parent
commit
782794b91b

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

@@ -18,11 +18,33 @@ Use the PHP standard [JSON encoder](http://www.php.net/manual/en/function.json-e
 ## Infrastructure Software Versions
 ## Infrastructure Software Versions
 The tests were run with:
 The tests were run with:
 
 
-* [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 Version 7.3.2](http://www.php.net/) with FPM and OPcache
+* [nginx 1.15.5](http://nginx.org/)
+* [MySQL 5.7.25](https://dev.mysql.com/)
+
+## ActiveRecord
+
 * [PHP ActiveRecord Nightly 20121221](http://www.phpactiverecord.org/)
 * [PHP ActiveRecord Nightly 20121221](http://www.phpactiverecord.org/)
 
 
+## Eloquent ORM / Laravel Query Builder
+
+* [illuminate/database 5.8](https://github.com/illuminate/database)
+
+
+The Laravel query builder / eloquent ORM components can be run separately from the Laravel framework.
+([Instructions](https://github.com/illuminate/database)) This is used for two tests:
+
+* php-laravel-query-builder: uses the [Laravel query builder](https://laravel.com/docs/5.8/queries) without using the full Eloquent ORM.  
+This tests the overhead of the dependency injection container ([Capsule](https://github.com/illuminate/database/blob/master/Capsule/Manager.php)) 
+and the query builder without the overhead of the Eloquent ORM models. 
+* php-eloquent: uses the [Laravel Eloquent ORM](https://laravel.com/docs/5.8/eloquent) which is built on top of the
+Laravel query builder.  This tests the incremental overhead of the Eloquent ORM models.
+
+These tests measure overhead compared to a PHP-PDO implementation.  Comparing these tests to the Laravel framework results
+also illustrates the overhead of the Laravel frontend components relative to the backend components. 
+
+[Brion Finlay](https://github.com/bfinlay)
+
 ## Test URLs
 ## Test URLs
 ### JSON Encoding Test
 ### JSON Encoding Test
 
 
@@ -44,3 +66,12 @@ http://localhost/dbraw.php?queries=5
 
 
 ORM:
 ORM:
 http://localhost/dborm.php?queries=5
 http://localhost/dborm.php?queries=5
+
+### Eloquent ORM / Laravel Query Builder tests
+#### Eloquent ORM
+* db: http://localhost/eloquent/db-eloquent.php,
+* query: http://localhost/eloquent/db-eloquent.php?queries=x
+* update: http://localhost/eloquent/update-eloquent.php?queries=x
+* fortune: http://localhost/eloquent/fortune-eloquent.php
+#### Laravel Query Builder
+* db: http://localhost/eloquent/db-laravel-query-builder.php

+ 65 - 4
frameworks/PHP/php/benchmark_config.json

@@ -4,6 +4,27 @@
     "default": {
     "default": {
       "json_url": "/json.php",
       "json_url": "/json.php",
       "plaintext_url": "/plaintext.php",
       "plaintext_url": "/plaintext.php",
+      "db_url": "/dbraw.php",
+      "query_url": "/dbraw.php?queries=",
+      "fortune_url": "/fortune.php",
+      "update_url": "/updateraw.php?queries=",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Platform",
+      "database": "MySQL",
+      "framework": "None",
+      "language": "PHP",
+      "flavor": "PHP7",
+      "orm": "Raw",
+      "platform": "None",
+      "webserver": "nginx",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "PHP",
+      "notes": "",
+      "versus": "php"
+    },
+    "activerecord": {
       "db_url": "/dborm.php",
       "db_url": "/dborm.php",
       "query_url": "/dborm.php?queries=",
       "query_url": "/dborm.php?queries=",
       "port": 8080,
       "port": 8080,
@@ -18,7 +39,7 @@
       "webserver": "nginx",
       "webserver": "nginx",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
-      "display_name": "PHP",
+      "display_name": "PHP-activerecord",
       "notes": "",
       "notes": "",
       "versus": "php"
       "versus": "php"
     },
     },
@@ -148,9 +169,9 @@
       "webserver": "nginx",
       "webserver": "nginx",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
-      "display_name": "PHP",
+      "display_name": "PHP5-activerecord",
       "notes": "",
       "notes": "",
-      "versus": "php-php5"
+      "versus": "php5-raw"
     },
     },
     "php5-raw": {
     "php5-raw": {
       "db_url": "/dbraw.php",
       "db_url": "/dbraw.php",
@@ -171,7 +192,7 @@
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "PHP-raw",
       "display_name": "PHP-raw",
       "notes": "",
       "notes": "",
-      "versus": "php-php5"
+      "versus": "php"
     },
     },
     "pools": {
     "pools": {
       "json_url": "/json.php",
       "json_url": "/json.php",
@@ -195,6 +216,46 @@
       "display_name": "PHP",
       "display_name": "PHP",
       "notes": "With php-fpm pools",
       "notes": "With php-fpm pools",
       "versus": "php"
       "versus": "php"
+    },
+    "eloquent": {
+      "db_url": "/eloquent/db-eloquent.php",
+      "query_url": "/eloquent/db-eloquent.php?queries=",
+      "update_url": "/eloquent/update-eloquent.php?queries=",
+      "fortune_url": "/eloquent/fortune-eloquent.php",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Platform",
+      "database": "MySQL",
+      "framework": "None",
+      "language": "PHP",
+      "flavor": "PHP7",
+      "orm": "Full",
+      "platform": "None",
+      "webserver": "nginx",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "PHP-Eloquent",
+      "notes": "",
+      "versus": "php"
+    },
+    "laravel-query-builder": {
+      "db_url": "/eloquent/db-laravel-query-builder.php",
+      "query_url": "/eloquent/db-laravel-query-builder.php?queries=",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Platform",
+      "database": "MySQL",
+      "framework": "None",
+      "language": "PHP",
+      "flavor": "PHP7",
+      "orm": "Full",
+      "platform": "None",
+      "webserver": "nginx",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "PHP-Eloquent",
+      "notes": "",
+      "versus": "php"
     }
     }
   }]
   }]
 }
 }

+ 0 - 58
frameworks/PHP/php/composer.lock

@@ -1,58 +0,0 @@
-{
-    "_readme": [
-        "This file locks the dependencies of your project to a known state",
-        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
-        "This file is @generated automatically"
-    ],
-    "content-hash": "a6ffc1631ba60673e4f6c924935d9f68",
-    "packages": [
-        {
-            "name": "php-activerecord/php-activerecord",
-            "version": "v1.2.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/jpfuentes2/php-activerecord.git",
-                "reference": "e6d2dad090617336dee730190be0294c5f132c69"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/jpfuentes2/php-activerecord/zipball/e6d2dad090617336dee730190be0294c5f132c69",
-                "reference": "e6d2dad090617336dee730190be0294c5f132c69",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.0"
-            },
-            "require-dev": {
-                "pear/log": "~1.12",
-                "pear/pear_exception": "1.0-beta1",
-                "phpunit/phpunit": "4.*"
-            },
-            "type": "library",
-            "autoload": {
-                "files": [
-                    "ActiveRecord.php"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "description": "php-activerecord is an open source ORM library based on the ActiveRecord pattern.",
-            "homepage": "http://www.phpactiverecord.org/",
-            "keywords": [
-                "activerecord",
-                "orm"
-            ],
-            "time": "2017-06-11T22:05:37+00:00"
-        }
-    ],
-    "packages-dev": [],
-    "aliases": [],
-    "minimum-stability": "stable",
-    "stability-flags": [],
-    "prefer-stable": false,
-    "prefer-lowest": false,
-    "platform": [],
-    "platform-dev": []
-}

+ 9 - 5
frameworks/PHP/php/dborm.php

@@ -19,15 +19,17 @@ ActiveRecord\Config::initialize(function($cfg)
 
 
 // Read number of queries to run from URL parameter
 // Read number of queries to run from URL parameter
 $query_count = 1;
 $query_count = 1;
-if (isset($_GET['queries']) && $_GET['queries'] > 0) {
-  $query_count = $_GET["queries"] > 500 ? 500 : $_GET['queries'];
+$query_param = isset($_GET['queries']);
+if ($query_param && $_GET['queries'] > 0) {
+    $query_count = $_GET['queries'] > 500 ? 500 : $_GET['queries'];
 }
 }
 
 
 // Create an array with the response string.
 // Create an array with the response string.
 $arr = array();
 $arr = array();
 
 
 // For each query, store the result set values in the response array
 // For each query, store the result set values in the response array
-for ($i = 0; $i < $query_count; $i++) {
+$query_counter = $query_count;
+while (0 < $query_counter--) {
   // Choose a random row
   // Choose a random row
   // http://www.php.net/mt_rand
   // http://www.php.net/mt_rand
   $id = mt_rand(1, 10000);
   $id = mt_rand(1, 10000);
@@ -37,9 +39,11 @@ for ($i = 0; $i < $query_count; $i++) {
   // Store result in array.
   // Store result in array.
   $arr[] = $world->to_array();
   $arr[] = $world->to_array();
 }
 }
-if ($query_count === 1) {
-  $arr = $arr[0];
+
+if ($query_count === 1 && !$query_param) {
+    $arr = $arr[0];
 }
 }
+
 // Use the PHP standard JSON encoder.
 // Use the PHP standard JSON encoder.
 // http://www.php.net/manual/en/function.json-encode.php
 // http://www.php.net/manual/en/function.json-encode.php
 echo json_encode($arr);
 echo json_encode($arr);

+ 5 - 3
frameworks/PHP/php/dbraw.php

@@ -9,7 +9,8 @@ $pdo = new PDO('mysql:host=tfb-database;dbname=hello_world', 'benchmarkdbuser',
 
 
 // Read number of queries to run from URL parameter
 // Read number of queries to run from URL parameter
 $query_count = 1;
 $query_count = 1;
-if (isset($_GET['queries']) && $_GET['queries'] > 0) {
+$query_param = isset($_GET['queries']);
+if ($query_param && $_GET['queries'] > 0) {
   $query_count = $_GET['queries'] > 500 ? 500 : $_GET['queries'];
   $query_count = $_GET['queries'] > 500 ? 500 : $_GET['queries'];
 }
 }
 
 
@@ -20,7 +21,8 @@ $arr = array();
 $statement = $pdo->prepare('SELECT randomNumber FROM World WHERE id = ?');
 $statement = $pdo->prepare('SELECT randomNumber FROM World WHERE id = ?');
 
 
 // For each query, store the result set values in the response array
 // For each query, store the result set values in the response array
-while (0 < $query_count--) {
+$query_counter = $query_count;
+while (0 < $query_counter--) {
   $id = mt_rand(1, 10000);
   $id = mt_rand(1, 10000);
   $statement->execute(array($id));
   $statement->execute(array($id));
   
   
@@ -30,7 +32,7 @@ while (0 < $query_count--) {
 
 
 // Use the PHP standard JSON encoder.
 // Use the PHP standard JSON encoder.
 // http://www.php.net/manual/en/function.json-encode.php
 // http://www.php.net/manual/en/function.json-encode.php
-if (count($arr) === 1) {
+if ($query_count === 1 && !$query_param) {
       $arr = $arr[0];
       $arr = $arr[0];
 }
 }
 
 

+ 0 - 0
frameworks/PHP/php/composer.json → frameworks/PHP/php/deploy/activerecord/composer.json


+ 7 - 0
frameworks/PHP/php/deploy/eloquent/composer.json

@@ -0,0 +1,7 @@
+{
+  "require": {
+    "illuminate/database": "5.8.*",
+    "illuminate/events": "5.8.*",
+    "illuminate/container": "5.8.*"
+  }
+}

+ 14 - 0
frameworks/PHP/php/eloquent/boot-eloquent.php

@@ -0,0 +1,14 @@
+<?php
+
+require_once __DIR__ . '/../vendor/autoload.php';
+require_once __DIR__ . '/init-capsule.php';
+
+use Illuminate\Database\Capsule\Manager as Capsule;
+
+class World extends \Illuminate\Database\Eloquent\Model {
+    protected $table = 'World';
+    public $timestamps = false;
+}
+
+$capsule->bootEloquent();
+

+ 37 - 0
frameworks/PHP/php/eloquent/db-eloquent.php

@@ -0,0 +1,37 @@
+<?php
+
+require_once __DIR__ . '/boot-eloquent.php';
+
+// Read number of queries to run from URL parameter
+$query_count = 1;
+$query_param = isset($_GET['queries']);
+if ($query_param && $_GET['queries'] > 0) {
+    $query_count = $_GET['queries'] > 500 ? 500 : $_GET['queries'];
+}
+
+// Create an array with the response string.
+$arr = array();
+
+// For each query, store the result set values in the response array
+$query_counter = $query_count;
+while (0 < $query_counter--) {
+    // Choose a random row
+    // http://www.php.net/mt_rand
+    $id = mt_rand(1, 10000);
+
+    $world = World::find($id);
+
+    // Store result in array.
+    $arr[] = $world->toArray();
+}
+
+if ($query_count === 1 && !$query_param) {
+    $arr = $arr[0];
+}
+
+// Set content type
+header("Content-type: application/json");
+
+// Use the PHP standard JSON encoder.
+// http://www.php.net/manual/en/function.json-encode.php
+echo json_encode($arr);

+ 39 - 0
frameworks/PHP/php/eloquent/db-laravel-query-builder.php

@@ -0,0 +1,39 @@
+<?php
+
+require_once __DIR__ . '/init-capsule.php';
+
+use Illuminate\Database\Capsule\Manager as Capsule;
+
+// Read number of queries to run from URL parameter
+$query_count = 1;
+$query_param = isset($_GET['queries']);
+if ($query_param && $_GET['queries'] > 0) {
+    $query_count = $_GET['queries'] > 500 ? 500 : $_GET['queries'];
+}
+
+// Create an array with the response string.
+$arr = array();
+
+// For each query, store the result set values in the response array
+$query_counter = $query_count;
+while (0 < $query_counter--) {
+    // Choose a random row
+    // http://www.php.net/mt_rand
+    $id = mt_rand(1, 10000);
+
+    $world = Capsule::table('World')->where('id',$id)->get()->first();
+
+    // Store result in array.
+    $arr[] = $world;
+}
+
+if ($query_count === 1 && !$query_param) {
+    $arr = $arr[0];
+}
+
+// Set content type
+header("Content-type: application/json");
+
+// Use the PHP standard JSON encoder.
+// http://www.php.net/manual/en/function.json-encode.php
+echo json_encode($arr);

+ 24 - 0
frameworks/PHP/php/eloquent/fortune-eloquent.php

@@ -0,0 +1,24 @@
+<?php
+//
+// Database Test
+//
+
+require_once __DIR__ . '/boot-eloquent.php';
+
+class Fortune extends \Illuminate\Database\Eloquent\Model {
+    protected $table = 'fortune';
+    public $timestamps = false;
+    protected $primaryKey = 'id';
+}
+
+// Define query and store result in array.
+$arr = Fortune::all()->pluck('message', 'id')->all();
+
+$arr[0] = 'Additional fortune added at request time.';
+
+asort($arr);
+?>
+<!DOCTYPE html><html><head><title>Fortunes</title></head><body><table><tr><th>id</th><th>message</th></tr>
+<?php foreach ( $arr as $id => $fortune ) : ?>
+<tr><td><?= $id ?></td><td><?= htmlspecialchars($fortune, ENT_QUOTES, 'UTF-8') ?></td></tr>
+<?php endforeach ?></table></body></html>

+ 20 - 0
frameworks/PHP/php/eloquent/init-capsule.php

@@ -0,0 +1,20 @@
+<?php
+
+require_once __DIR__ . '/../vendor/autoload.php';
+
+use Illuminate\Database\Capsule\Manager as Capsule;
+
+$capsule = new Capsule;
+
+$capsule->addConnection([
+    'driver' => 'mysql',
+//    'host' => 'localhost',
+    'host' => 'tfb-database',
+    'database' => 'hello_world',
+    'username' => 'benchmarkdbuser',
+    'password' => 'benchmarkdbpass',
+]);
+
+$capsule->setAsGlobal();
+
+

+ 29 - 0
frameworks/PHP/php/eloquent/update-eloquent.php

@@ -0,0 +1,29 @@
+<?php
+
+require_once __DIR__ . '/boot-eloquent.php';
+
+// Read number of queries to run from URL parameter
+$query_count = 1;
+if (isset($_GET['queries']) && $_GET['queries'] > 0) {
+  $query_count = $_GET['queries'] > 500 ? 500 : $_GET['queries'];
+}
+
+// Create an array with the response string.
+$arr = array();
+
+// For each query, store the result set values in the response array
+while (0 < $query_count--) {
+  $id = mt_rand(1, 10000);
+  $randomNumber = mt_rand(1, 10000);
+
+  $world = World::find($id);
+  $world->randomNumber = $randomNumber;
+  $world->save();
+
+  $arr[] = $world->toArray();
+}
+
+// Use the PHP standard JSON encoder.
+// http://www.php.net/manual/en/function.json-encode.php
+header('Content-type: application/json');
+echo json_encode($arr);

+ 25 - 0
frameworks/PHP/php/php-activerecord.dockerfile

@@ -0,0 +1,25 @@
+FROM ubuntu:18.10
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
+RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
+RUN apt-get update -yqq > /dev/null && \
+    apt-get install -yqq nginx git unzip php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-mysql  > /dev/null
+
+RUN apt-get install -yqq composer > /dev/null
+
+COPY deploy/conf/* /etc/php/7.3/fpm/
+
+ADD ./ /php
+WORKDIR /php
+
+RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
+
+COPY deploy/activerecord/composer* ./
+RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
+
+RUN chmod -R 777 /php
+
+CMD service php7.3-fpm start && \
+    nginx -c /php/deploy/nginx7.conf -g "daemon off;"

+ 25 - 0
frameworks/PHP/php/php-eloquent.dockerfile

@@ -0,0 +1,25 @@
+FROM ubuntu:18.10
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
+RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
+RUN apt-get update -yqq > /dev/null && \
+    apt-get install -yqq nginx git unzip php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-mysql  php7.3-mbstring > /dev/null
+
+RUN apt-get install -yqq composer > /dev/null
+
+COPY deploy/conf/* /etc/php/7.3/fpm/
+
+ADD ./ /php
+WORKDIR /php
+
+RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
+
+COPY deploy/eloquent/composer* ./
+RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
+
+RUN chmod -R 777 /php
+
+CMD service php7.3-fpm start && \
+    nginx -c /php/deploy/nginx7.conf -g "daemon off;"

+ 25 - 0
frameworks/PHP/php/php-laravel-query-builder.dockerfile

@@ -0,0 +1,25 @@
+FROM ubuntu:18.10
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
+RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
+RUN apt-get update -yqq > /dev/null && \
+    apt-get install -yqq nginx git unzip php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-mysql  php7.3-mbstring > /dev/null
+
+RUN apt-get install -yqq composer > /dev/null
+
+COPY deploy/conf/* /etc/php/7.3/fpm/
+
+ADD ./ /php
+WORKDIR /php
+
+RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
+
+COPY deploy/eloquent/composer* ./
+RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
+
+RUN chmod -R 777 /php
+
+CMD service php7.3-fpm start && \
+    nginx -c /php/deploy/nginx7.conf -g "daemon off;"

+ 1 - 0
frameworks/PHP/php/php-php5.dockerfile

@@ -17,6 +17,7 @@ WORKDIR /php
 
 
 RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/5.6/fpm/php-fpm.conf ; fi;
 RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/5.6/fpm/php-fpm.conf ; fi;
 
 
+COPY deploy/activerecord/composer* ./
 RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
 RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
 
 
 RUN chmod -R 777 /php
 RUN chmod -R 777 /php

+ 0 - 4
frameworks/PHP/php/php.dockerfile

@@ -7,8 +7,6 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
 RUN apt-get update -yqq > /dev/null && \
 RUN apt-get update -yqq > /dev/null && \
     apt-get install -yqq nginx git unzip php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-mysql  > /dev/null
     apt-get install -yqq nginx git unzip php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-mysql  > /dev/null
 
 
-RUN apt-get install -yqq composer > /dev/null
-
 COPY deploy/conf/* /etc/php/7.3/fpm/
 COPY deploy/conf/* /etc/php/7.3/fpm/
 
 
 ADD ./ /php
 ADD ./ /php
@@ -16,8 +14,6 @@ WORKDIR /php
 
 
 RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
 RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
 
 
-RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
-
 RUN chmod -R 777 /php
 RUN chmod -R 777 /php
 
 
 CMD service php7.3-fpm start && \
 CMD service php7.3-fpm start && \

+ 61 - 0
toolset/databases/mysql/create8.sql

@@ -0,0 +1,61 @@
+# To maintain consistency across servers and fix a problem with the jdbc per
+# http://stackoverflow.com/questions/37719818/the-server-time-zone-value-aest-is-unrecognized-or-represents-more-than-one-ti
+SET GLOBAL time_zone = '+00:00';
+
+# modified from SO answer http://stackoverflow.com/questions/5125096/for-loop-in-mysql
+CREATE DATABASE hello_world;
+USE hello_world;
+
+CREATE TABLE  world (
+  id int(10) unsigned NOT NULL auto_increment,
+  randomNumber int NOT NULL default 0,
+  PRIMARY KEY  (id)
+)
+ENGINE=INNODB;
+CREATE USER 'benchmarkdbuser'@'%' IDENTIFIED WITH mysql_native_password BY 'benchmarkdbpass';
+CREATE USER 'benchmarkdbuser'@'localhost' IDENTIFIED WITH mysql_native_password BY 'benchmarkdbpass';
+GRANT SELECT, UPDATE ON hello_world.world TO 'benchmarkdbuser'@'%';
+GRANT SELECT, UPDATE ON hello_world.world TO 'benchmarkdbuser'@'localhost';
+
+DELIMITER #
+CREATE PROCEDURE load_data()
+BEGIN
+
+declare v_max int unsigned default 10000;
+declare v_counter int unsigned default 0;
+
+  TRUNCATE TABLE world;
+  START TRANSACTION;
+  while v_counter < v_max do
+    INSERT INTO world (randomNumber) VALUES ( floor(0 + (rand() * 10000)) );
+    SET v_counter=v_counter+1;
+  end while;
+  commit;
+END 
+#
+
+DELIMITER ;
+
+CALL load_data();
+
+CREATE TABLE  fortune (
+  id int(10) unsigned NOT NULL auto_increment,
+  message varchar(2048) CHARACTER SET 'utf8' NOT NULL,
+  PRIMARY KEY  (id)
+)
+ENGINE=INNODB;
+GRANT SELECT ON hello_world.fortune TO 'benchmarkdbuser'@'%';
+GRANT SELECT ON hello_world.fortune TO 'benchmarkdbuser'@'localhost';
+
+INSERT INTO fortune (message) VALUES ('fortune: No such file or directory');
+INSERT INTO fortune (message) VALUES ('A computer scientist is someone who fixes things that aren''t broken.');
+INSERT INTO fortune (message) VALUES ('After enough decimal places, nobody gives a damn.');
+INSERT INTO fortune (message) VALUES ('A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1');
+INSERT INTO fortune (message) VALUES ('A computer program does what you tell it to do, not what you want it to do.');
+INSERT INTO fortune (message) VALUES ('Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen');
+INSERT INTO fortune (message) VALUES ('Any program that runs right is obsolete.');
+INSERT INTO fortune (message) VALUES ('A list is only as strong as its weakest link. — Donald Knuth');
+INSERT INTO fortune (message) VALUES ('Feature: A bug with seniority.');
+INSERT INTO fortune (message) VALUES ('Computers make very fast, very accurate mistakes.');
+INSERT INTO fortune (message) VALUES ('<script>alert("This should not be displayed in a browser alert box.");</script>');
+INSERT INTO fortune (message) VALUES ('フレームワークのベンチマーク');