Skip to content

Commit eca3849

Browse files
committed
Sync with latest framework benchmark setup script changes
1 parent db42690 commit eca3849

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

php-zend-framework/benchmark_config

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
{
2-
"framework": "zend-framework",
2+
"framework": "ZendFramework",
33
"tests": [{
44
"default": {
55
"setup_file": "setup",
66
"json_url": "/json",
77
"db_url": "/db",
88
"query_url": "/db-multi?queries=",
99
"port": 8080,
10-
"sort": 51
10+
"approach": "Realistic",
11+
"classification": "Fullstack",
12+
"database": "MySQL",
13+
"framework": "ZendFramework",
14+
"language": "PHP",
15+
"orm": "Full",
16+
"platform": "PHP-FPM",
17+
"webserver": "nginx",
18+
"os": "Linux",
19+
"database_os": "Linux",
20+
"display_name": "ZendFramework",
21+
"notes": "",
22+
"versus": "php"
1123
}
1224
}]
1325
}

php-zend-framework/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"homepage": "http://framework.zend.com/",
1010
"require": {
1111
"php": ">=5.3.3",
12-
"zendframework/zendframework": ">2.1.3"
12+
"zendframework/zendframework": "~2.2"
1313
},
1414
"autoload": {
1515
"psr-0": {

php-zend-framework/setup.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
21
import subprocess
32
import sys
43
import setup_util
54
from os.path import expanduser
65

76
home = expanduser("~")
87

9-
def start(args):
8+
def start(args, logfile, errfile):
109
setup_util.replace_text("php-zend-framework/config/benchmarks.local.php", "mysql:dbname=hello_world;host=localhost", "mysql:dbname=hello_world;host=" + args.database_host)
1110
setup_util.replace_text("php-zend-framework/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
1211

1312
try:
14-
subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-zend-framework")
15-
subprocess.check_call("sudo chown -R www-data:www-data php-zend-framework", shell=True)
16-
subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-zend-framework/deploy/php-fpm.pid", shell=True)
17-
subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-zend-framework/deploy/nginx.conf", shell=True)
13+
subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-zend-framework", stderr=errfile, stdout=logfile)
14+
subprocess.check_call("sudo chown -R www-data:www-data php-zend-framework", shell=True, stderr=errfile, stdout=logfile)
15+
subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-zend-framework/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
16+
subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-zend-framework/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
1817
return 0
1918
except subprocess.CalledProcessError:
2019
return 1
21-
def stop():
20+
def stop(logfile, errfile):
2221
try:
23-
subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
24-
subprocess.call("sudo kill -QUIT $( cat php-zend-framework/deploy/php-fpm.pid )", shell=True)
25-
subprocess.check_call("sudo chown -R $USER:$USER php-zend-framework", shell=True)
22+
subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
23+
subprocess.call("sudo kill -QUIT $( cat php-zend-framework/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
24+
subprocess.check_call("sudo chown -R $USER:$USER php-zend-framework", shell=True, stderr=errfile, stdout=logfile)
2625
return 0
2726
except subprocess.CalledProcessError:
2827
return 1

0 commit comments

Comments
 (0)