Forráskód Böngészése

Added hhvm tests. Double checked this time

Mattie Coccia 10 éve
szülő
commit
e858d9bd60

+ 39 - 0
frameworks/PHP/php-laravel/benchmark_config.json

@@ -39,6 +39,45 @@
       "display_name": "laravel",
       "notes": "",
       "versus": "php"
+    },
+    "hhvm": {
+      "setup_file": "setup_hhvm",
+      "json_url": "/json",
+      "plaintext_url": "/plaintext",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Fullstack",
+      "database": "None",
+      "framework": "laravel",
+      "language": "PHP",
+      "orm": "Raw",
+      "platform": "HPHP",
+      "webserver": "nginx",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "laravel_hhvm",
+      "notes": "",
+      "versus": "php"
+    },
+    "hhvm-raw": {
+      "setup_file": "setup_hhvm",
+      "db_url": "/db",
+      "query_url": "/db?queries=",
+      "fortune_url": "/fortunes",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Fullstack",
+      "database": "MySQL",
+      "framework": "laravel",
+      "language": "PHP",
+      "orm": "Raw",
+      "platform": "HPHP",
+      "webserver": "nginx",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "laravel_hhvm",
+      "notes": "",
+      "versus": "php"
     }
   }]
 }

+ 47 - 0
frameworks/PHP/php-laravel/deploy/config.hdf

@@ -0,0 +1,47 @@
+# main configuration file
+
+# Application PID File
+PidFile = /home/vagrant/FrameworkBenchmarks/frameworks/PHP/php-laravel/hhvm.pid
+
+# Server settings
+Server {
+  Port = 9001
+  Type = fastcgi
+  SourceRoot = /home/vagrant/FrameworkBenchmarks/frameworks/PHP/php-laravel
+  DefaultDocument = index.php
+}
+
+# Disable logging completely
+Log {
+  UseLogFile = false
+  UseSyslog = false
+  Level = Error
+  #File = /home/vagrant/FrameworkBenchmarks/frameworks/PHP/php-laravel/error.log
+}
+
+# Enable jit for production mode
+Eval {
+    Jit = true
+    CheckSymLink = false
+}
+
+# Repo file
+Repo {
+  Central {
+    Path = /home/vagrant/FrameworkBenchmarks/frameworks/PHP/php-laravel/.hhvm.bbhc
+  }
+}
+
+# Setup basic rewrite
+VirtualHost {
+    * {
+        Pattern = .*
+        RewriteRules {
+            * {
+                pattern = ^(.*)$
+                to = $1.php
+                qsa = true
+            }
+        }
+    }
+}

+ 1 - 0
frameworks/PHP/php-laravel/hhvm.pid

@@ -0,0 +1 @@
+14748

+ 19 - 0
frameworks/PHP/php-laravel/setup_hhvm.sh

@@ -0,0 +1,19 @@
+#!/bin/bash
+
+export PHP_HOME=${IROOT}/php-5.5.17
+export COMPOSER_HOME=${IROOT}/php-composer
+export PHP_FPM=${PHP_HOME}/sbin/php-fpm
+export NGINX_HOME=${IROOT}/nginx
+
+sed -i 's|127.0.0.1|'"${DBHOST}"'|g' app/config/database.php
+sed -i 's|SourceRoot = .*/FrameworkBenchmarks/php-laravel|SourceRoot = '"${TROOT}"'|g' deploy/config.hdf
+sed -i 's|Path = .*/.hhvm.hhbc|Path = '"${TROOT}"'/.hhvm.bbhc|g' deploy/config.hdf
+sed -i 's|PidFile = .*/hhvm.pid|PidFile = '"${TROOT}"'/hhvm.pid|g' deploy/config.hdf
+sed -i 's|File = .*/error.log|File = '"${TROOT}"'/error.log|g' deploy/config.hdf
+sed -i 's|root .*/FrameworkBenchmarks/frameworks/PHP/php-laravel|root '"${TROOT}"'|g' deploy/nginx.conf 
+sed -i 's|/home/vagrant/FrameworkBenchmarks/installs/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="${PHP_HOME}/bin:${PHP_HOME}/sbin:$PATH"
+
+hhvm --config $TROOT/deploy/config.hdf --user $(whoami) -m daemon
+${NGINX_HOME}/sbin/nginx -c ${TROOT}/deploy/nginx.conf