Explorar el Código

add php7 support

ikkez hace 9 años
padre
commit
4603aa2064

+ 43 - 0
frameworks/PHP/fat-free/benchmark_config.json

@@ -43,6 +43,49 @@
       "display_name": "fat-free",
       "notes": "",
       "versus": "php"
+    },
+    "php5": {
+      "setup_file": "setup",
+      "json_url": "/json",
+      "plaintext_url": "/plaintext",
+      "db_url": "/db-orm",
+      "query_url": "/db-orm-multiple/",
+      "update_url": "/update-orm/",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Fullstack",
+      "database": "MySQL",
+      "framework": "Fat Free Framework",
+      "language": "PHP5",
+      "orm": "Full",
+      "platform": "PHP-FPM",
+      "webserver": "nginx",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "fat-free",
+      "notes": "",
+      "versus": "php"
+    },
+    "php5-raw": {
+      "setup_file": "setup",
+      "db_url": "/db",
+      "query_url": "/db-multiple/",
+      "fortune_url": "/fortune",
+      "update_url": "/update-raw/",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Fullstack",
+      "database": "MySQL",
+      "framework": "Fat Free Framework",
+      "language": "PHP5",
+      "orm": "Raw",
+      "platform": "PHP-FPM",
+      "webserver": "nginx",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "fat-free",
+      "notes": "",
+      "versus": "php"
     }
   }]
 }

+ 1 - 1
frameworks/PHP/fat-free/deploy/nginx.conf

@@ -65,7 +65,7 @@ http {
         #    proxy_pass   http://127.0.0.1;
         #}
 
-        root /home/ubuntu/FrameworkBenchmarks/fat-free/;
+        root /home/vagrant/FrameworkBenchmarks/frameworks/PHP/fat-free/;
         index  index.php;
 
         location / {

+ 4 - 4
frameworks/PHP/fat-free/setup.sh

@@ -1,9 +1,9 @@
 #!/bin/bash
 
-fw_depends php nginx
+fw_depends php7 nginx
 
 sed -i 's|localhost|'"${DBHOST}"'|g' index.php
-sed -i 's|root .*/FrameworkBenchmarks/fat-free|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|root .*/FrameworkBenchmarks/frameworks/PHP/fat-free|root '"${TROOT}"'|g' deploy/nginx.conf
 sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
 
 F3DIR="$TROOT/src"
@@ -15,5 +15,5 @@ pushd "$F3DIR" > /dev/null
 git checkout -q "b284f0c482e858f0162cab529925e7de14d90746" # v3.5.0
 popd > /dev/null
 
-php-fpm --fpm-config "$FWROOT/config/php-fpm.conf" -g "$TROOT/deploy/php-fpm.pid"
-nginx -c "$TROOT/deploy/nginx.conf"
+php-fpm --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+nginx -c $TROOT/deploy/nginx.conf

+ 19 - 0
frameworks/PHP/fat-free/setup_php5.sh

@@ -0,0 +1,19 @@
+#!/bin/bash
+
+fw_depends php nginx
+
+sed -i 's|localhost|'"${DBHOST}"'|g' index.php
+sed -i 's|root .*/FrameworkBenchmarks/frameworks/PHP/fat-free|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+F3DIR="$TROOT/src"
+
+[[ ! -e "$F3DIR" ]] || rm -r "$F3DIR"
+
+git clone "https://github.com/bcosca/fatfree-core.git" "$F3DIR"
+pushd "$F3DIR" > /dev/null
+git checkout -q "b284f0c482e858f0162cab529925e7de14d90746" # v3.5.0
+popd > /dev/null
+
+php-fpm --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+nginx -c $TROOT/deploy/nginx.conf