Pārlūkot izejas kodu

Added php5 tests to php/slim framework to compare to php7
Edited .gitignore to ignore files touched during test

Nate Brady 9 gadi atpakaļ
vecāks
revīzija
53c9928f81

+ 2 - 0
frameworks/PHP/slim/.gitignore

@@ -1,3 +1,5 @@
+deploy/nginx.conf
+deploy/php-fpm.pid
 /app/cache
 /app/logs
 /bin

+ 20 - 0
frameworks/PHP/slim/benchmark_config.json

@@ -40,6 +40,26 @@
       "display_name": "slim_hhvm",
       "notes": "",
       "versus": "php"
+    },
+    "php5": {
+      "setup_file": "setup_php5",
+      "json_url": "/json",
+      "db_url": "/db",
+      "query_url": "/dbs?queries=",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Micro",
+      "database": "MySQL",
+      "framework": "slim",
+      "language": "PHP5",
+      "orm": "Raw",
+      "platform": "PHP-FPM",
+      "webserver": "nginx",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "slim-php5",
+      "notes": "",
+      "versus": "php"
     }
   }]
 }

+ 10 - 0
frameworks/PHP/slim/setup_php5.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+fw_depends php nginx
+
+sed -i 's|localhost|'"${DBHOST}"'|g' index.php
+sed -i 's|root .*/FrameworkBenchmarks/php-slim| root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+php-fpm --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+nginx -c $TROOT/deploy/nginx.conf