Browse Source

Merge branch 'master' of https://github.com/TechEmpower/FrameworkBenchmarks into python-r8

Conflicts:
	falcon/setup.py
	flask/setup.py
INADA Naoki 11 years ago
parent
commit
77361b485a
100 changed files with 858 additions and 553 deletions
  1. 2 0
      .gitignore
  2. 4 4
      HttpListener/setup.py
  3. 9 9
      README.md
  4. 4 4
      aspnet-stripped/setup_iis.py
  5. 4 4
      aspnet/setup_iis.py
  6. 10 10
      aspnet/setup_nginx.py
  7. 6 6
      aspnet/setup_xsp.py
  8. 8 8
      beego/setup.py
  9. 1 1
      beego/src/hello/hello.go
  10. 31 0
      benchmark.cfg.example
  11. 3 3
      bottle/setup.py
  12. 6 6
      bottle/setup_nginxuwsgi.py
  13. 3 3
      bottle/setup_py3.py
  14. 3 3
      bottle/setup_pypy.py
  15. 11 11
      cake/setup.py
  16. 7 7
      compojure/setup.py
  17. 5 5
      cowboy/setup_erlang.py
  18. 4 4
      cpoll_cppsp/setup.py
  19. 4 4
      dancer/setup.py
  20. 6 6
      dart-start/setup.py
  21. 10 10
      dart-stream/server.dart
  22. 6 6
      dart-stream/setup.py
  23. 6 6
      dart/setup.py
  24. 3 3
      django/setup.py
  25. 3 3
      django/setup_pg.py
  26. 3 3
      django/setup_py3.py
  27. 4 4
      dropwizard/setup.py
  28. 6 6
      elli/setup_erlang.py
  29. 8 0
      evhttp-sharp/.gitignore
  30. 24 0
      evhttp-sharp/benchmark_config
  31. 28 0
      evhttp-sharp/setup.py
  32. 69 0
      evhttp-sharp/src/EvHttpSharpBenchmark.csproj
  33. 20 0
      evhttp-sharp/src/EvHttpSharpBenchmark.sln
  34. 37 0
      evhttp-sharp/src/Program.cs
  35. 36 0
      evhttp-sharp/src/Properties/AssemblyInfo.cs
  36. BIN
      evhttp-sharp/src/lib/EvHttpSharp.dll
  37. BIN
      evhttp-sharp/src/lib/Newtonsoft.Json.dll
  38. BIN
      evhttp-sharp/src/lib/libevent_core-2-0-5.dll
  39. BIN
      evhttp-sharp/src/lib/libevent_extra-2-0-5.dll
  40. BIN
      evhttp-sharp/src/libevent_core-2-0-5.dll
  41. BIN
      evhttp-sharp/src/libevent_extra-2-0-5.dll
  42. 12 12
      express/setup.py
  43. 3 3
      falcon/setup.py
  44. 3 3
      falcon/setup_py3.py
  45. 3 3
      falcon/setup_pypy.py
  46. 9 9
      falcore/setup.py
  47. 1 3
      falcore/src/framework_benchmarks/falcore.go
  48. 7 7
      finagle/setup.py
  49. 65 35
      finagle/src/main/scala/com/falmarri/finagle/Finagle.scala
  50. 3 3
      flask/setup.py
  51. 6 6
      flask/setup_nginxuwsgi.py
  52. 3 3
      flask/setup_py3.py
  53. 3 3
      flask/setup_pypy.py
  54. 7 6
      gemini/setup.py
  55. 8 8
      go/setup.py
  56. 1 3
      go/src/hello/hello.go
  57. 9 9
      grails/setup.py
  58. 4 4
      grizzly-bm/setup.py
  59. 4 4
      grizzly-jersey/setup.py
  60. 12 12
      hapi/setup.py
  61. 6 6
      http-kit/setup.py
  62. 6 6
      jester/setup.py
  63. 5 5
      kelp/setup.py
  64. 4 4
      lapis/setup.py
  65. 7 7
      lift-stateless/setup.py
  66. 7 7
      luminus/setup.py
  67. 5 5
      mojolicious/setup.py
  68. 4 4
      nancy/setup_iis.py
  69. 10 10
      nancy/setup_libevent.py
  70. 9 9
      nancy/setup_nginx.py
  71. 5 5
      nancy/setup_xsp.py
  72. 5 5
      netty/setup.py
  73. 9 9
      nodejs/setup.py
  74. 3 3
      onion/setup.py
  75. 4 4
      openresty/setup.py
  76. 11 11
      php-codeigniter/setup.py
  77. 11 11
      php-fuel/setup.py
  78. 11 11
      php-kohana/setup.py
  79. 11 11
      php-laravel/setup.py
  80. 11 11
      php-lithium/setup.py
  81. 11 11
      php-micromvc/setup.py
  82. 8 8
      php-phalcon-micro/setup.py
  83. 8 8
      php-phalcon/setup.py
  84. 7 7
      php-phpixie/setup.py
  85. 8 8
      php-senthot/setup.py
  86. 7 7
      php-silex-orm/setup.py
  87. 7 7
      php-silex/setup.py
  88. 7 7
      php-silex/setup_raw.py
  89. 7 7
      php-silica/setup.py
  90. 11 11
      php-slim/setup.py
  91. 10 10
      php-symfony2-stripped/setup.py
  92. 10 10
      php-symfony2/setup.py
  93. 8 8
      php-yaf/setup.py
  94. 8 8
      php/setup.py
  95. 9 9
      phreeze/setup.py
  96. 6 6
      plack/setup.py
  97. 23 0
      plain/benchmark_config
  98. 2 2
      plain/build.sbt
  99. BIN
      plain/lib/plain-library_2.10-1.0.1-SNAPSHOT.jar
  100. BIN
      plain/sbt-launch.jar

+ 2 - 0
.gitignore

@@ -18,3 +18,5 @@ mods/
 azure.err
 azure.err
 php-kohana/application/logs/
 php-kohana/application/logs/
 php-fuel/fuel/app/logs/
 php-fuel/fuel/app/logs/
+results/
+benchmark.cfg

+ 4 - 4
HttpListener/setup.py

@@ -3,20 +3,20 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   if os.name != 'nt':
   if os.name != 'nt':
     return 1
     return 1
   
   
   try:
   try:
     setup_util.replace_text("HttpListener/HttpListener/App.config", "localhost", args.database_host)
     setup_util.replace_text("HttpListener/HttpListener/App.config", "localhost", args.database_host)
-    subprocess.check_call("powershell -Command .\\setup.ps1 start", cwd="HttpListener")
+    subprocess.check_call("powershell -Command .\\setup.ps1 start", cwd="HttpListener", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   if os.name != 'nt':
   if os.name != 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("powershell -Command .\\setup.ps1 stop", cwd="HttpListener")
+  subprocess.check_call("powershell -Command .\\setup.ps1 stop", cwd="HttpListener", stderr=errfile, stdout=logfile)
   return 0
   return 0

+ 9 - 9
README.md

@@ -164,12 +164,12 @@ Here is an example of Wicket's setup file.
 	import setup_util
 	import setup_util
 
 
 	##################################################
 	##################################################
-	# start(args)
+	# start(args, logfile, errfile)
 	#
 	#
 	# Starts the server for Wicket
 	# Starts the server for Wicket
 	# returns 0 if everything completes, 1 otherwise
 	# returns 0 if everything completes, 1 otherwise
 	##################################################
 	##################################################
-	def start(args):
+	def start(args, logfile, errfile):
 
 
     # setting the database url
     # setting the database url
     setup_util.replace_text("wicket/src/main/webapp/WEB-INF/resin-web.xml", "mysql:\/\/.*:3306", "mysql://" + args.database_host + ":3306")
     setup_util.replace_text("wicket/src/main/webapp/WEB-INF/resin-web.xml", "mysql:\/\/.*:3306", "mysql://" + args.database_host + ":3306")
@@ -179,23 +179,23 @@ Here is an example of Wicket's setup file.
     # 3. Copy package to Resin's webapp directory
     # 3. Copy package to Resin's webapp directory
     # 4. Start resin
     # 4. Start resin
     try:
     try:
-      subprocess.check_call("mvn clean compile war:war", shell=True, cwd="wicket")
-      subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
-      subprocess.check_call("cp wicket/target/hellowicket-1.0-SNAPSHOT.war $RESIN_HOME/webapps/wicket.war", shell=True)
-      subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
+      subprocess.check_call("mvn clean compile war:war", shell=True, cwd="wicket", stderr=errfile, stdout=logfile)
+      subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=errfile, stdout=logfile)
+      subprocess.check_call("cp wicket/target/hellowicket-1.0-SNAPSHOT.war $RESIN_HOME/webapps/wicket.war", shell=True, stderr=errfile, stdout=logfile)
+      subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
     except subprocess.CalledProcessError:
     except subprocess.CalledProcessError:
       return 1
       return 1
 
 
 	##################################################
 	##################################################
-	# stop()
+	# stop(logfile, errfile)
 	#
 	#
 	# Stops the server for Wicket
 	# Stops the server for Wicket
 	# returns 0 if everything completes, 1 otherwise
 	# returns 0 if everything completes, 1 otherwise
 	##################################################
 	##################################################
-	def stop():
+	def stop(logfile):
     try:
     try:
-      subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
+      subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
     except subprocess.CalledProcessError:
     except subprocess.CalledProcessError:
       return 1
       return 1

+ 4 - 4
aspnet-stripped/setup_iis.py

@@ -3,20 +3,20 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   if os.name != 'nt':
   if os.name != 'nt':
     return 1
     return 1
   
   
   try:
   try:
     setup_util.replace_text("aspnet-stripped/src/Web.config", "localhost", args.database_host)
     setup_util.replace_text("aspnet-stripped/src/Web.config", "localhost", args.database_host)
-    subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="aspnet-stripped")
+    subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="aspnet-stripped", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   if os.name != 'nt':
   if os.name != 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="aspnet-stripped")
+  subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="aspnet-stripped", stderr=errfile, stdout=logfile)
   return 0
   return 0

+ 4 - 4
aspnet/setup_iis.py

@@ -3,20 +3,20 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   if os.name != 'nt':
   if os.name != 'nt':
     return 1
     return 1
   
   
   try:
   try:
     setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host)
     setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host)
-    subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="aspnet")
+    subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="aspnet", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   if os.name != 'nt':
   if os.name != 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="aspnet")
+  subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="aspnet", stderr=errfile, stdout=logfile)
   return 0
   return 0

+ 10 - 10
aspnet/setup_nginx.py

@@ -6,7 +6,7 @@ import os
 root = os.getcwd() + "/aspnet"
 root = os.getcwd() + "/aspnet"
 app = root + "/src"
 app = root + "/src"
 
 
-def start(args):
+def start(args, logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 1
     return 1
   
   
@@ -14,28 +14,28 @@ def start(args):
 
 
   try:
   try:
     # build
     # build
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app)
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app)
-    subprocess.check_call("sudo chown -R $USER:$USER /usr/local/etc/mono", shell=True)
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stderr=errfile, stdout=logfile)
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER /usr/local/etc/mono", shell=True, stderr=errfile, stdout=logfile)
     
     
     # nginx
     # nginx
     workers = 'worker_processes ' + str(args.max_threads) + ';'
     workers = 'worker_processes ' + str(args.max_threads) + ';'
-    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True);
-    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf -g "' + workers + '"', shell=True)
+    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True, stderr=errfile, stdout=logfile);
+    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf -g "' + workers + '"', shell=True, stderr=errfile, stdout=logfile)
     
     
     # fastcgi
     # fastcgi
     for port in range(9001, 9001 + args.max_threads):
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app)
+      subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True)
-  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True)
+  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True, stderr=errfile, stdout=logfile)
+  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True, stderr=errfile, stdout=logfile)
   #
   #
   # stop mono
   # stop mono
   #
   #

+ 6 - 6
aspnet/setup_xsp.py

@@ -3,22 +3,22 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 1
     return 1
   
   
   setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host)
   setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host)
 
 
   try:
   try:
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd="aspnet/src")
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="aspnet/src")
-    subprocess.check_call("sudo chown -R ubuntu:ubuntu /usr/local/etc/mono", shell=True)
-    subprocess.Popen("MONO_OPTIONS=--gc=sgen xsp4 --nonstop", shell=True, cwd="aspnet/src")
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd="aspnet/src", stderr=errfile, stdout=logfile)
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="aspnet/src", stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R ubuntu:ubuntu /usr/local/etc/mono", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.Popen("MONO_OPTIONS=--gc=sgen xsp4 --nonstop", shell=True, cwd="aspnet/src", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 0
     return 0
   
   

+ 8 - 8
beego/setup.py

@@ -3,18 +3,18 @@ import subprocess
 import sys
 import sys
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\beego&&go get ./...", shell=True, cwd="beego")
-    subprocess.Popen("setup.bat", shell=True, cwd="beego")
+    subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\beego&&go get ./...", shell=True, cwd="beego", stderr=errfile, stdout=logfile)
+    subprocess.Popen("setup.bat", shell=True, cwd="beego", stderr=errfile, stdout=logfile)
     return 0
     return 0
-  subprocess.call("go get ./...", shell=True, cwd="beego")
-  subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="beego")
+  subprocess.call("go get ./...", shell=True, cwd="beego", stderr=errfile, stdout=logfile)
+  subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="beego", stderr=errfile, stdout=logfile)
   return 0
   return 0
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.call("taskkill /f /im go.exe > NUL", shell=True)
-    subprocess.call("taskkill /f /im hello.exe > NUL", shell=True)
+    subprocess.call("taskkill /f /im go.exe > NUL", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("taskkill /f /im hello.exe > NUL", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()

+ 1 - 1
beego/src/hello/hello.go

@@ -2,7 +2,7 @@ package main
 
 
 import (
 import (
 	"github.com/astaxie/beego"
 	"github.com/astaxie/beego"
-	"runtime"
+	//"runtime"
 )
 )
 
 
 type MessageStruct struct {
 type MessageStruct struct {

+ 31 - 0
benchmark.cfg.example

@@ -0,0 +1,31 @@
+[Defaults]
+# Available Keys: 
+# client_host='localhost'
+# client_identity_file=None
+# client_user=None
+# database_host=None
+# database_identity_file=None
+# database_os='linux'
+# database_user=None
+# duration=60
+# exclude=None
+# install='all'
+# install_error_action='continue'
+# install_software=False
+# list_test_metadata=False
+# list_tests=False
+# max_concurrency=256
+# max_queries=20
+# max_threads=8
+# mode='benchmark'
+# name='ec2'
+# os='linux'
+# parse=None
+# password_prompt=False
+# query_interval=5
+# server_host='localhost'
+# sleep=60
+# starting_concurrency=8
+# test=None
+# type='all'
+# verbose=True

+ 3 - 3
bottle/setup.py

@@ -9,7 +9,7 @@ NCPU = multiprocessing.cpu_count()
 proc = None
 proc = None
 
 
 
 
-def start(args):
+def start(args, logfile, errfile):
     global proc
     global proc
     setup_util.replace_text("bottle/app.py", "DBHOSTNAME", args.database_host)
     setup_util.replace_text("bottle/app.py", "DBHOSTNAME", args.database_host)
     proc = subprocess.Popen([
     proc = subprocess.Popen([
@@ -19,10 +19,10 @@ def start(args):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="bottle")
+        cwd="bottle", stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
-def stop():
+def stop(logfile, errfile):
     global proc
     global proc
     if proc is None:
     if proc is None:
         return 0
         return 0

+ 6 - 6
bottle/setup_nginxuwsgi.py

@@ -7,21 +7,21 @@ bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py2/bin')
 config_dir = os.path.expanduser('~/FrameworkBenchmarks/config')
 config_dir = os.path.expanduser('~/FrameworkBenchmarks/config')
 NCPU = multiprocessing.cpu_count()
 NCPU = multiprocessing.cpu_count()
 
 
-def start(args):
+def start(args, logfile, errfile):
     setup_util.replace_text("bottle/app.py", "DBHOSTNAME", args.database_host)
     setup_util.replace_text("bottle/app.py", "DBHOSTNAME", args.database_host)
     try:
     try:
         subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' +
         subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' +
-            config_dir + '/nginx_uwsgi.conf', shell=True)
+            config_dir + '/nginx_uwsgi.conf', shell=True, stderr=errfile, stdout=logfile)
         # Run in the background, but keep stdout/stderr for easy debugging
         # Run in the background, but keep stdout/stderr for easy debugging
         subprocess.Popen(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi.ini' +
         subprocess.Popen(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi.ini' +
             ' --processes ' + str(NCPU * 3) +
             ' --processes ' + str(NCPU * 3) +
             ' --wsgi app:app',
             ' --wsgi app:app',
-            shell=True, cwd='bottle')
+            shell=True, cwd='bottle', stderr=errfile, stdout=logfile)
         return 0
         return 0
     except subprocess.CalledProcessError:
     except subprocess.CalledProcessError:
         return 1
         return 1
 
 
-def stop():
-    subprocess.call('sudo /usr/local/nginx/sbin/nginx -s stop', shell=True)
-    subprocess.call(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi_stop.ini', shell=True)
+def stop(logfile, errfile):
+    subprocess.call('sudo /usr/local/nginx/sbin/nginx -s stop', shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi_stop.ini', shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0

+ 3 - 3
bottle/setup_py3.py

@@ -9,7 +9,7 @@ NCPU = multiprocessing.cpu_count()
 proc = None
 proc = None
 
 
 
 
-def start(args):
+def start(args, logfile, errfile):
     global proc
     global proc
     setup_util.replace_text("bottle/app.py", "DBHOSTNAME", args.database_host)
     setup_util.replace_text("bottle/app.py", "DBHOSTNAME", args.database_host)
     proc = subprocess.Popen([
     proc = subprocess.Popen([
@@ -19,10 +19,10 @@ def start(args):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="bottle")
+        cwd="bottle", stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
-def stop():
+def stop(logfile, errfile):
     global proc
     global proc
     if proc is None:
     if proc is None:
         return 0
         return 0

+ 3 - 3
bottle/setup_pypy.py

@@ -9,7 +9,7 @@ NCPU = multiprocessing.cpu_count()
 proc = None
 proc = None
 
 
 
 
-def start(args):
+def start(args, logfile, errfile):
     global proc
     global proc
     setup_util.replace_text("bottle/app.py", "DBHOSTNAME", args.database_host)
     setup_util.replace_text("bottle/app.py", "DBHOSTNAME", args.database_host)
     proc = subprocess.Popen([
     proc = subprocess.Popen([
@@ -19,10 +19,10 @@ def start(args):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="bottle")
+        cwd="bottle", stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
-def stop():
+def stop(logfile, errfile):
     global proc
     global proc
     if proc is None:
     if proc is None:
         return 0
         return 0

+ 11 - 11
cake/setup.py

@@ -7,7 +7,7 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("cake/app/Config/database.php", "'host' => '.*',", "'host' => '" + args.database_host + "',")
   setup_util.replace_text("cake/app/Config/database.php", "'host' => '.*',", "'host' => '" + args.database_host + "',")
   setup_util.replace_text("cake/deploy/cake", "\".*\/FrameworkBenchmarks", "\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("cake/deploy/cake", "\".*\/FrameworkBenchmarks", "\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("cake/deploy/cake", "Directory .*\/FrameworkBenchmarks", "Directory " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("cake/deploy/cake", "Directory .*\/FrameworkBenchmarks", "Directory " + home + "/FrameworkBenchmarks")
@@ -16,28 +16,28 @@ def start(args):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
       setup_util.replace_text("cake/app/Config/core.php", "'Apc'", "'Wincache'")
       setup_util.replace_text("cake/app/Config/core.php", "'Apc'", "'Wincache'")
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\cake" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\cake\\app\\webroot"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\cake" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\cake\\app\\webroot"', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
     #subprocess.check_call("sudo cp cake/deploy/cake /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo cp cake/deploy/cake /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo a2ensite cake", shell=True)
-    subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True, stderr=errfile, stdout=logfile)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/cake/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/cake/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/cake/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/cake/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat cake/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat cake/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)
+    subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 7 - 7
compojure/setup.py

@@ -3,20 +3,20 @@ import subprocess
 import sys
 import sys
 import setup_util
 import setup_util
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("compojure/hello/src/hello/handler.clj", ":subname \"//.*:3306", ":subname \"//" + args.database_host + ":3306")
   setup_util.replace_text("compojure/hello/src/hello/handler.clj", ":subname \"//.*:3306", ":subname \"//" + args.database_host + ":3306")
 
 
   try:
   try:
-    subprocess.check_call("lein ring uberwar", shell=True, cwd="compojure/hello")
-    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
-    subprocess.check_call("cp compojure/hello/target/hello-compojure-standalone.war $RESIN_HOME/webapps/compojure.war", shell=True)
-    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
+    subprocess.check_call("lein ring uberwar", shell=True, cwd="compojure/hello", stderr=errfile, stdout=logfile)
+    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("cp compojure/hello/target/hello-compojure-standalone.war $RESIN_HOME/webapps/compojure.war", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 5 - 5
cowboy/setup_erlang.py

@@ -2,17 +2,17 @@ import subprocess
 import sys
 import sys
 import setup_util
 import setup_util
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("cowboy/src/hello_world_app.erl", "\"benchmarkdbpass\", \".*\", 3306", "\"benchmarkdbpass\", \"" + args.database_host + "\", 3306")
   setup_util.replace_text("cowboy/src/hello_world_app.erl", "\"benchmarkdbpass\", \".*\", 3306", "\"benchmarkdbpass\", \"" + args.database_host + "\", 3306")
 
 
   try:
   try:
-    subprocess.check_call("./rebar get-deps", shell=True, cwd="cowboy")
-    subprocess.check_call("./rebar compile", shell=True, cwd="cowboy")
-    subprocess.check_call("erl -pa ebin deps/*/ebin +sbwt very_long +swt very_low -s hello_world -noshell -detached", shell=True, cwd="cowboy")
+    subprocess.check_call("./rebar get-deps", shell=True, cwd="cowboy", stderr=errfile, stdout=logfile)
+    subprocess.check_call("./rebar compile", shell=True, cwd="cowboy", stderr=errfile, stdout=logfile)
+    subprocess.check_call("erl -pa ebin deps/*/ebin +sbwt very_long +swt very_low -s hello_world -noshell -detached", shell=True, cwd="cowboy", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
     subprocess.check_call("killall beam.smp", shell=True, cwd="/usr/bin")
     subprocess.check_call("killall beam.smp", shell=True, cwd="/usr/bin")
     return 0
     return 0

+ 4 - 4
cpoll_cppsp/setup.py

@@ -3,13 +3,13 @@ import sys
 import os
 import os
 import setup_util 
 import setup_util 
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("cpoll_cppsp/www/connectioninfo.H", "\\#define BENCHMARK_DB_HOST \".*\"", "#define BENCHMARK_DB_HOST \"" + args.database_host + "\"")
   setup_util.replace_text("cpoll_cppsp/www/connectioninfo.H", "\\#define BENCHMARK_DB_HOST \".*\"", "#define BENCHMARK_DB_HOST \"" + args.database_host + "\"")
-  subprocess.check_call("make", shell=True, cwd="cpoll_cppsp")
-  subprocess.Popen("./run_application \"$(pwd)\"/www -g g++-4.8 -m /forcedynamic.cppsm", shell=True, cwd="cpoll_cppsp");
+  subprocess.check_call("make", shell=True, cwd="cpoll_cppsp", stderr=errfile, stdout=logfile)
+  subprocess.Popen("./run_application \"$(pwd)\"/www -g g++-4.8 -m /forcedynamic.cppsm", shell=True, cwd="cpoll_cppsp", stderr=errfile, stdout=logfile);
   return 0
   return 0
 
 
-def stop():
+def stop(logfile, errfile):
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()
   for line in out.splitlines():
   for line in out.splitlines():

+ 4 - 4
dancer/setup.py

@@ -7,18 +7,18 @@ import getpass
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("dancer/app.pl", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("dancer/app.pl", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("dancer/nginx.conf", "USR", getpass.getuser())
   setup_util.replace_text("dancer/nginx.conf", "USR", getpass.getuser())
   setup_util.replace_text("dancer/nginx.conf", "server unix:.*\/FrameworkBenchmarks", "server unix:" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("dancer/nginx.conf", "server unix:.*\/FrameworkBenchmarks", "server unix:" + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.Popen("plackup -E production -s Starman --workers=" + str(args.max_threads) + " -l " + home + "/FrameworkBenchmarks/dancer/frameworks-benchmark.sock -a ./app.pl", shell=True, cwd="dancer")
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/dancer/nginx.conf", shell=True)
+    subprocess.Popen("plackup -E production -s Starman --workers=" + str(args.max_threads) + " -l " + home + "/FrameworkBenchmarks/dancer/frameworks-benchmark.sock -a ./app.pl", shell=True, cwd="dancer", stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/dancer/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)

+ 6 - 6
dart-start/setup.py

@@ -3,19 +3,19 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text('dart-start/postgresql.yaml', 'host: .*', 'host: ' + args.database_host)
   setup_util.replace_text('dart-start/postgresql.yaml', 'host: .*', 'host: ' + args.database_host)
   setup_util.replace_text('dart-start/mongodb.yaml', 'host: .*', 'host: ' + args.database_host)
   setup_util.replace_text('dart-start/mongodb.yaml', 'host: .*', 'host: ' + args.database_host)
   try:
   try:
     #
     #
     # install dart dependencies
     # install dart dependencies
     #
     #
-    subprocess.check_call('pub install', shell=True, cwd='dart-start')
+    subprocess.check_call('pub install', shell=True, cwd='dart-start', stderr=errfile, stdout=logfile)
     #
     #
     # start dart servers
     # start dart servers
     #
     #
     for port in range(9001, 9001 + args.max_threads):
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen('dart server.dart -a 127.0.0.1 -p ' + str(port) + ' -d ' + str(args.max_concurrency / args.max_threads), shell=True, cwd='dart-start')
+      subprocess.Popen('dart server.dart -a 127.0.0.1 -p ' + str(port) + ' -d ' + str(args.max_concurrency / args.max_threads), shell=True, cwd='dart-start', stderr=errfile, stdout=logfile)
     #
     #
     # create nginx configuration
     # create nginx configuration
     #
     #
@@ -52,16 +52,16 @@ def start(args):
     #
     #
     # start nginx
     # start nginx
     #
     #
-    subprocess.Popen('sudo /usr/sbin/nginx -c `pwd`/nginx.conf', shell=True, cwd='dart-start');
+    subprocess.Popen('sudo /usr/sbin/nginx -c `pwd`/nginx.conf', shell=True, cwd='dart-start', stderr=errfile, stdout=logfile);
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   #
   #
   # stop nginx
   # stop nginx
   #
   #
-  subprocess.check_call('sudo /usr/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd='dart-start')
+  subprocess.check_call('sudo /usr/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd='dart-start', stderr=errfile, stdout=logfile)
   os.remove('dart-start/nginx.conf')
   os.remove('dart-start/nginx.conf')
   #
   #
   # stop dart servers
   # stop dart servers

+ 10 - 10
dart-stream/server.dart

@@ -81,7 +81,7 @@ class World {
 
 
   World(this.id, this.randomnumber);
   World(this.id, this.randomnumber);
 
 
-  toJson() => { "id": id, "randomnumber": randomnumber };
+  toJson() => { "id": id, "randomNumber": randomnumber };
 }
 }
 
 
 main() {
 main() {
@@ -188,8 +188,8 @@ _dbMongoTest(HttpConnect connect) {
   
   
   return _mongoQuery().then((data) {
   return _mongoQuery().then((data) {
     connect.response.write(json.stringify({
     connect.response.write(json.stringify({
-      "id": data["id"],
-      "randomnumber": data["randomnumber"]
+      "id": data["_id"],
+      "randomNumber": data["randomNumber"]
     }));
     }));
   });
   });
 }
 }
@@ -207,8 +207,8 @@ _queriesMongoTest(HttpConnect connect) {
     .then((response) {
     .then((response) {
       var results = response.map((world) {
       var results = response.map((world) {
         return {
         return {
-          "id": world["id"],
-          "randomnumber": world["randomnumber"]
+          "id": world["_id"],
+          "randomNumber": world["randomNumber"]
         };
         };
       });
       });
       connect.response.write(json.stringify(results.toList()));
       connect.response.write(json.stringify(results.toList()));
@@ -221,7 +221,7 @@ _updatesMongoTest(HttpConnect connect) {
   return Future.wait(new List.generate(queries, (index) {
   return Future.wait(new List.generate(queries, (index) {
       return _mongoQuery()
       return _mongoQuery()
           .then((world) {
           .then((world) {
-            world["randomnumber"] = _RANDOM.nextInt(_WORLD_TABLE_SIZE);
+            world["randomNumber"] = _RANDOM.nextInt(_WORLD_TABLE_SIZE);
             return _worldCollection.update( { "_id": world["_id"] }, world)
             return _worldCollection.update( { "_id": world["_id"] }, world)
                 .then((_) => world);
                 .then((_) => world);
           });
           });
@@ -229,8 +229,8 @@ _updatesMongoTest(HttpConnect connect) {
     .then((worlds) {
     .then((worlds) {
       var result = worlds.map((world) {
       var result = worlds.map((world) {
         return {
         return {
-          "id": world["id"],
-          "randomnumber": world["randomnumber"]
+          "id": world["_id"],
+          "randomNumber": world["randomNumber"]
         };
         };
       });
       });
       connect.response.write(json.stringify(result.toList()));
       connect.response.write(json.stringify(result.toList()));
@@ -241,7 +241,7 @@ _fortunesMongoTest(HttpConnect connect) {
   
   
   return _fortuneCollection.find().toList().then((fortunes) {
   return _fortuneCollection.find().toList().then((fortunes) {
     fortunes = fortunes.map((fortune) {
     fortunes = fortunes.map((fortune) {
-      return new Fortune(fortune["id"], fortune["message"]);
+      return new Fortune(fortune["_id"], fortune["message"]);
     }).toList();
     }).toList();
     fortunes.add(new Fortune(0, 'Additional fortune added at request time.'));
     fortunes.add(new Fortune(0, 'Additional fortune added at request time.'));
     fortunes.sort();
     fortunes.sort();
@@ -301,6 +301,6 @@ _query() {
 // runs a mongo query and returns a promise
 // runs a mongo query and returns a promise
 _mongoQuery() {
 _mongoQuery() {
   return _worldCollection.findOne({
   return _worldCollection.findOne({
-    "id": _RANDOM.nextInt(_WORLD_TABLE_SIZE) + 1
+    "_id": _RANDOM.nextInt(_WORLD_TABLE_SIZE) + 1
   });
   });
 }
 }

+ 6 - 6
dart-stream/setup.py

@@ -3,19 +3,19 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text('dart-stream/postgresql.yaml', 'host: .*', 'host: ' + args.database_host)
   setup_util.replace_text('dart-stream/postgresql.yaml', 'host: .*', 'host: ' + args.database_host)
   setup_util.replace_text('dart-stream/mongodb.yaml', 'host: .*', 'host: ' + args.database_host)
   setup_util.replace_text('dart-stream/mongodb.yaml', 'host: .*', 'host: ' + args.database_host)
   try:
   try:
     #
     #
     # install dart dependencies
     # install dart dependencies
     #
     #
-    subprocess.check_call('pub install', shell=True, cwd='dart-stream')
+    subprocess.check_call('pub install', shell=True, cwd='dart-stream', stderr=errfile, stdout=logfile)
     #
     #
     # start dart servers
     # start dart servers
     #
     #
     for port in range(9001, 9001 + args.max_threads):
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen('dart server.dart -a 127.0.0.1 -p ' + str(port) + ' -d ' + str(args.max_concurrency / args.max_threads), shell=True, cwd='dart-stream')
+      subprocess.Popen('dart server.dart -a 127.0.0.1 -p ' + str(port) + ' -d ' + str(args.max_concurrency / args.max_threads), shell=True, cwd='dart-stream', stderr=errfile, stdout=logfile)
     #
     #
     # create nginx configuration
     # create nginx configuration
     #
     #
@@ -52,16 +52,16 @@ def start(args):
     #
     #
     # start nginx
     # start nginx
     #
     #
-    subprocess.Popen('sudo /usr/sbin/nginx -c `pwd`/nginx.conf', shell=True, cwd='dart-stream');
+    subprocess.Popen('sudo /usr/sbin/nginx -c `pwd`/nginx.conf', shell=True, cwd='dart-stream', stderr=errfile, stdout=logfile);
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   #
   #
   # stop nginx
   # stop nginx
   #
   #
-  subprocess.check_call('sudo /usr/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd='dart-stream')
+  subprocess.check_call('sudo /usr/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd='dart-stream', stderr=errfile, stdout=logfile)
   os.remove('dart-stream/nginx.conf')
   os.remove('dart-stream/nginx.conf')
   #
   #
   # stop dart servers
   # stop dart servers

+ 6 - 6
dart/setup.py

@@ -3,18 +3,18 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text('dart/postgresql.yaml', 'host: .*', 'host: ' + args.database_host)
   setup_util.replace_text('dart/postgresql.yaml', 'host: .*', 'host: ' + args.database_host)
   try:
   try:
     #
     #
     # install dart dependencies
     # install dart dependencies
     #
     #
-    subprocess.check_call('pub install', shell=True, cwd='dart')
+    subprocess.check_call('pub install', shell=True, cwd='dart', stderr=errfile, stdout=logfile)
     #
     #
     # start dart servers
     # start dart servers
     #
     #
     for port in range(9001, 9001 + args.max_threads):
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen('dart server.dart -a 127.0.0.1 -p ' + str(port) + ' -d ' + str(args.max_concurrency / args.max_threads), shell=True, cwd='dart')
+      subprocess.Popen('dart server.dart -a 127.0.0.1 -p ' + str(port) + ' -d ' + str(args.max_concurrency / args.max_threads), shell=True, cwd='dart', stderr=errfile, stdout=logfile)
     #
     #
     # create nginx configuration
     # create nginx configuration
     #
     #
@@ -51,16 +51,16 @@ def start(args):
     #
     #
     # start nginx
     # start nginx
     #
     #
-    subprocess.Popen('sudo /usr/local/nginx/sbin/nginx -c `pwd`/nginx.conf', shell=True, cwd='dart');
+    subprocess.Popen('sudo /usr/local/nginx/sbin/nginx -c `pwd`/nginx.conf', shell=True, cwd='dart', stderr=errfile, stdout=logfile);
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   #
   #
   # stop nginx
   # stop nginx
   #
   #
-  subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd='dart')
+  subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd='dart', stderr=errfile, stdout=logfile)
   os.remove('dart/nginx.conf')
   os.remove('dart/nginx.conf')
   #
   #
   # stop dart servers
   # stop dart servers

+ 3 - 3
django/setup.py

@@ -10,7 +10,7 @@ NCPU = multiprocessing.cpu_count()
 proc = None
 proc = None
 
 
 
 
-def start(args):
+def start(args, logfile, errfile):
     global proc
     global proc
     setup_util.replace_text("django/hello/hello/settings.py", "HOST': '.*'", "HOST': '" + args.database_host + "'")
     setup_util.replace_text("django/hello/hello/settings.py", "HOST': '.*'", "HOST': '" + args.database_host + "'")
     setup_util.replace_text("django/hello/hello/settings.py", "\/home\/ubuntu",  home)
     setup_util.replace_text("django/hello/hello/settings.py", "\/home\/ubuntu",  home)
@@ -24,10 +24,10 @@ def start(args):
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
         cwd="django/hello",
         cwd="django/hello",
-        env=env)
+        env=env, stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
-def stop():
+def stop(logfile, errfile):
     global proc
     global proc
     if proc is None:
     if proc is None:
         return 0
         return 0

+ 3 - 3
django/setup_pg.py

@@ -10,7 +10,7 @@ NCPU = multiprocessing.cpu_count()
 proc = None
 proc = None
 
 
 
 
-def start(args):
+def start(args, logfile, errfile):
     global proc
     global proc
     setup_util.replace_text("django/hello/hello/settings.py", "HOST': '.*'", "HOST': '" + args.database_host + "'")
     setup_util.replace_text("django/hello/hello/settings.py", "HOST': '.*'", "HOST': '" + args.database_host + "'")
     setup_util.replace_text("django/hello/hello/settings.py", "\/home\/ubuntu",  home)
     setup_util.replace_text("django/hello/hello/settings.py", "\/home\/ubuntu",  home)
@@ -24,10 +24,10 @@ def start(args):
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
         cwd="django/hello",
         cwd="django/hello",
-        env=env)
+        env=env, stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
-def stop():
+def stop(logfile, errfile):
     global proc
     global proc
     if proc is None:
     if proc is None:
         return 0
         return 0

+ 3 - 3
django/setup_py3.py

@@ -10,7 +10,7 @@ NCPU = multiprocessing.cpu_count()
 proc = None
 proc = None
 
 
 
 
-def start(args):
+def start(args, logfile, errfile):
     global proc
     global proc
     setup_util.replace_text("django/hello/hello/settings.py", "HOST': '.*'", "HOST': '" + args.database_host + "'")
     setup_util.replace_text("django/hello/hello/settings.py", "HOST': '.*'", "HOST': '" + args.database_host + "'")
     setup_util.replace_text("django/hello/hello/settings.py", "\/home\/ubuntu",  home)
     setup_util.replace_text("django/hello/hello/settings.py", "\/home\/ubuntu",  home)
@@ -21,10 +21,10 @@ def start(args):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="django/hello")
+        cwd="django/hello", stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
-def stop():
+def stop(logfile, errfile):
     global proc
     global proc
     if proc is None:
     if proc is None:
         return 0
         return 0

+ 4 - 4
dropwizard/setup.py

@@ -6,16 +6,16 @@ import os
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
     setup_util.replace_text("dropwizard/hello-world.yml", "url: jdbc:mysql://.*/hello_world", "url: jdbc:mysql://" + args.database_host + ":3306/hello_world")
     setup_util.replace_text("dropwizard/hello-world.yml", "url: jdbc:mysql://.*/hello_world", "url: jdbc:mysql://" + args.database_host + ":3306/hello_world")
 
 
     try:
     try:
-        subprocess.check_call("mvn clean package;", shell=True, cwd="dropwizard")
-        subprocess.Popen("java -jar target/hello-world-0.0.1-SNAPSHOT.jar server hello-world.yml", shell=True, cwd="dropwizard")
+        subprocess.check_call("mvn clean package;", shell=True, cwd="dropwizard", stderr=errfile, stdout=logfile)
+        subprocess.Popen("java -jar target/hello-world-0.0.1-SNAPSHOT.jar server hello-world.yml", shell=True, cwd="dropwizard", stderr=errfile, stdout=logfile)
         return 0
         return 0
     except subprocess.CalledProcessError:
     except subprocess.CalledProcessError:
         return 1
         return 1
-def stop():
+def stop(logfile, errfile):
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()
   for line in out.splitlines():
   for line in out.splitlines():

+ 6 - 6
elli/setup_erlang.py

@@ -2,20 +2,20 @@ import subprocess
 import sys
 import sys
 import setup_util
 import setup_util
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("elli/src/elli_bench_sup.erl", "\"benchmarkdbpass\", \".*\", 3306", "\"benchmarkdbpass\", \"" + args.database_host + "\", 3306")
   setup_util.replace_text("elli/src/elli_bench_sup.erl", "\"benchmarkdbpass\", \".*\", 3306", "\"benchmarkdbpass\", \"" + args.database_host + "\", 3306")
   
   
   try:
   try:
-    subprocess.check_call("./rebar get-deps", shell=True, cwd="elli")
-    subprocess.check_call("./rebar compile", shell=True, cwd="elli")
+    subprocess.check_call("./rebar get-deps", shell=True, cwd="elli", stderr=errfile, stdout=logfile)
+    subprocess.check_call("./rebar compile", shell=True, cwd="elli", stderr=errfile, stdout=logfile)
     # adding +K true seemed to actually slow performance
     # adding +K true seemed to actually slow performance
-    subprocess.check_call("erl -pa ebin deps/*/ebin +sbwt very_long +swt very_low -s elli_bench -noshell -detached", shell=True, cwd="elli")
+    subprocess.check_call("erl -pa ebin deps/*/ebin +sbwt very_long +swt very_low -s elli_bench -noshell -detached", shell=True, cwd="elli", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.check_call("killall beam.smp", shell=True, cwd="/usr/bin")
+    subprocess.check_call("killall beam.smp", shell=True, cwd="/usr/bin", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 8 - 0
evhttp-sharp/.gitignore

@@ -0,0 +1,8 @@
+*.user
+*.suo
+*/bin/*
+*/obj/*
+obj/
+[Bb]in
+[Dd]ebug*/
+[Rr]elease*/

+ 24 - 0
evhttp-sharp/benchmark_config

@@ -0,0 +1,24 @@
+{
+  "framework": "evhttp-sharp",
+  "tests": [{
+    "default": {
+      "setup_file": "setup",
+      "json_url": "/",
+      "plaintext_url": "/plaintext",
+      "port": 8085,
+      "approach": "Realistic",
+      "classification": "Micro",
+      "database": "None",
+      "framework": "evhttp-sharp",
+      "language": "C#",
+      "orm": "Raw",
+      "platform": "Mono",
+      "webserver": "none",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "evhttp-sharp",
+      "notes": "",
+      "versus": ""
+    }
+  }]
+}

+ 28 - 0
evhttp-sharp/setup.py

@@ -0,0 +1,28 @@
+import subprocess
+import sys
+import setup_util
+import os
+
+root = os.getcwd() + "/evhttp-sharp"
+app = root + "/src"
+
+def start(args, logfile, errfile):
+  if os.name == 'nt':
+    return 1
+
+  try:
+    # build
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stdout=logfile, stderr=errfile)
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stdout=logfile, stderr=errfile)
+    
+    subprocess.Popen("mono -O=all bin/Release/EvHttpSharpBenchmark.exe 127.0.0.1 8085 " + str(args.max_threads) + " &", shell=True, cwd=app, stdout=logfile, stderr=errfile)
+    return 0
+  except subprocess.CalledProcessError:
+    return 1
+
+def stop(logfile, errfile):
+  if os.name == 'nt':
+    return 0
+  
+  subprocess.check_call("pkill -9 mono", shell=True)
+  return 0

+ 69 - 0
evhttp-sharp/src/EvHttpSharpBenchmark.csproj

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{94B0D092-4377-4A5C-B222-4F005D316DB0}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>EvHttpSharpBenchmark</RootNamespace>
+    <AssemblyName>EvHttpSharpBenchmark</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="EvHttpSharp">
+      <HintPath>lib\EvHttpSharp.dll</HintPath>
+    </Reference>
+    <Reference Include="Newtonsoft.Json">
+      <HintPath>lib\Newtonsoft.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="libevent_core-2-0-5.dll">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+    <Content Include="libevent_extra-2-0-5.dll">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 20 - 0
evhttp-sharp/src/EvHttpSharpBenchmark.sln

@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EvHttpSharpBenchmark", "EvHttpSharpBenchmark.csproj", "{94B0D092-4377-4A5C-B222-4F005D316DB0}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{94B0D092-4377-4A5C-B222-4F005D316DB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{94B0D092-4377-4A5C-B222-4F005D316DB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{94B0D092-4377-4A5C-B222-4F005D316DB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{94B0D092-4377-4A5C-B222-4F005D316DB0}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 37 - 0
evhttp-sharp/src/Program.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Text;
+using EvHttpSharp;
+using Newtonsoft.Json;
+
+namespace EvHttpSharpBenchmark
+{
+	class Program
+	{
+		public static readonly JsonSerializer Serializer = new JsonSerializer();
+
+		static void Main (string[] args)
+		{
+			var host = new EventHttpListener(Handler);
+			host.Start(args[0], ushort.Parse(args[1]), int.Parse(args[2]));
+		}
+
+		private static void Handler(EventHttpRequest req)
+		{
+			var headers = new Dictionary<string, string>();
+			var resp = "Hello, World!";
+
+			if (!req.Uri.Contains("plaintext"))
+			{
+				var sw = new StringWriter();
+				Serializer.Serialize(sw, new {message = "Hello, world"});
+				resp = sw.ToString();
+				headers["Content-Type"] = "application/json";
+			}
+			req.Respond (HttpStatusCode.OK, headers, Encoding.UTF8.GetBytes (resp));
+		}
+	}
+}

+ 36 - 0
evhttp-sharp/src/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle ("EvHttpSharpBenchmark")]
+[assembly: AssemblyDescription ("")]
+[assembly: AssemblyConfiguration ("")]
+[assembly: AssemblyCompany ("")]
+[assembly: AssemblyProduct ("EvHttpSharpBenchmark")]
+[assembly: AssemblyCopyright ("Copyright ©  2013")]
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible (false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid ("8c379b35-c45f-4d4b-b54a-2a38ec7112d4")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion ("1.0.0.0")]
+[assembly: AssemblyFileVersion ("1.0.0.0")]

BIN
evhttp-sharp/src/lib/EvHttpSharp.dll


BIN
evhttp-sharp/src/lib/Newtonsoft.Json.dll


BIN
evhttp-sharp/src/lib/libevent_core-2-0-5.dll


BIN
evhttp-sharp/src/lib/libevent_extra-2-0-5.dll


BIN
evhttp-sharp/src/libevent_core-2-0-5.dll


BIN
evhttp-sharp/src/libevent_extra-2-0-5.dll


+ 12 - 12
express/setup.py

@@ -4,37 +4,37 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("express/app.js", "mongodb:\/\/.*\/hello_world", "mongodb://" + args.database_host + "/hello_world")
   setup_util.replace_text("express/app.js", "mongodb:\/\/.*\/hello_world", "mongodb://" + args.database_host + "/hello_world")
   setup_util.replace_text("express/app.js", "localhost", args.database_host)
   setup_util.replace_text("express/app.js", "localhost", args.database_host)
 
 
   try:
   try:
-    npm()
+    npm(logfile,errfile)
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.Popen("set NODE_ENV=production", shell=True)
-      subprocess.Popen("node app", shell=True, cwd="express")
+      subprocess.Popen("set NODE_ENV=production", shell=True, stderr=errfile, stdout=logfile)
+      subprocess.Popen("node app", shell=True, cwd="express", stderr=errfile, stdout=logfile)
     else:
     else:
-      subprocess.Popen("NODE_ENV=production node app", shell=True, cwd="express")
+      subprocess.Popen("NODE_ENV=production node app", shell=True, cwd="express", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def npm():
+def npm(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call("copy package.json package.json.dist /y > NUL", shell=True, cwd="express")
+    subprocess.check_call("copy package.json package.json.dist /y > NUL", shell=True, cwd="express", stderr=errfile, stdout=logfile)
     setup_util.replace_text("express/package.json", ".*mysql.*", "")
     setup_util.replace_text("express/package.json", ".*mysql.*", "")
     setup_util.replace_text("express/package.json", ".*mapper.*", "")
     setup_util.replace_text("express/package.json", ".*mapper.*", "")
   
   
   try:
   try:
-    subprocess.check_call("npm install", shell=True, cwd="express")
+    subprocess.check_call("npm install", shell=True, cwd="express", stderr=errfile, stdout=logfile)
   finally:
   finally:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call("del package.json", shell=True, cwd="express")
-      subprocess.check_call("ren package.json.dist package.json", shell=True, cwd="express")
+      subprocess.check_call("del package.json", shell=True, cwd="express", stderr=errfile, stdout=logfile)
+      subprocess.check_call("ren package.json.dist package.json", shell=True, cwd="express", stderr=errfile, stdout=logfile)
 
 
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.Popen("taskkill /f /im node.exe > NUL", shell=True)
+    subprocess.Popen("taskkill /f /im node.exe > NUL", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   
   
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)

+ 3 - 3
falcon/setup.py

@@ -8,7 +8,7 @@ NCPU = multiprocessing.cpu_count()
 proc = None
 proc = None
 
 
 
 
-def start(args):
+def start(args, logfile, errfile):
     global proc
     global proc
     proc = subprocess.Popen([
     proc = subprocess.Popen([
         bin_dir + "/gunicorn",
         bin_dir + "/gunicorn",
@@ -17,11 +17,11 @@ def start(args):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="falcon")
+        cwd="falcon", stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
 
 
-def stop():
+def stop(logfile, errfile):
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()
     for line in out.splitlines():
     for line in out.splitlines():

+ 3 - 3
falcon/setup_py3.py

@@ -8,7 +8,7 @@ NCPU = multiprocessing.cpu_count()
 proc = None
 proc = None
 
 
 
 
-def start(args):
+def start(args, logfile, errfile):
     global proc
     global proc
     proc = subprocess.Popen([
     proc = subprocess.Popen([
         bin_dir + "/gunicorn",
         bin_dir + "/gunicorn",
@@ -17,10 +17,10 @@ def start(args):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="falcon")
+        cwd="falcon", stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
-def stop():
+def stop(logfile, errfile):
     global proc
     global proc
     if proc is None:
     if proc is None:
         return 0
         return 0

+ 3 - 3
falcon/setup_pypy.py

@@ -8,7 +8,7 @@ NCPU = multiprocessing.cpu_count()
 proc = None
 proc = None
 
 
 
 
-def start(args):
+def start(args, logfile, errfile):
     global proc
     global proc
     proc = subprocess.Popen([
     proc = subprocess.Popen([
         bin_dir + "/gunicorn",
         bin_dir + "/gunicorn",
@@ -17,10 +17,10 @@ def start(args):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="falcon")
+        cwd="falcon", stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
-def stop():
+def stop(logfile, errfile):
     global proc
     global proc
     if proc is None:
     if proc is None:
         return 0
         return 0

+ 9 - 9
falcore/setup.py

@@ -3,27 +3,27 @@ import sys
 import os
 import os
 import setup_util
 import setup_util
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("falcore/src/framework_benchmarks/falcore.go", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)")
   setup_util.replace_text("falcore/src/framework_benchmarks/falcore.go", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)")
   if os.name == 'nt':
   if os.name == 'nt':
     #subprocess.call("rmdir /s /q pkg\\windows_amd64", shell=True, cwd="go")
     #subprocess.call("rmdir /s /q pkg\\windows_amd64", shell=True, cwd="go")
     #subprocess.call("rmdir /s /q src\\github.com", shell=True, cwd="go")
     #subprocess.call("rmdir /s /q src\\github.com", shell=True, cwd="go")
     #subprocess.call("del /s /q /f bin\\hello.exe", shell=True, cwd="go")
     #subprocess.call("del /s /q /f bin\\hello.exe", shell=True, cwd="go")
-    subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\falcore&& go get ./...", shell=True, cwd="falcore")
-    subprocess.Popen("setup.bat", shell=True, cwd="falcore") 
+    subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\falcore&& go get ./...", shell=True, cwd="falcore", stderr=errfile, stdout=logfile)
+    subprocess.Popen("setup.bat", shell=True, cwd="falcore", stderr=errfile, stdout=logfile) 
     return 0
     return 0
-  subprocess.call("go get ./...", shell=True, cwd="falcore") 
-  subprocess.Popen("go run src/framework_benchmarks/falcore.go".rsplit(" "), cwd="falcore")
+  subprocess.call("go get ./...", shell=True, cwd="falcore", stderr=errfile, stdout=logfile) 
+  subprocess.Popen("go run src/framework_benchmarks/falcore.go".rsplit(" "), cwd="falcore", stderr=errfile, stdout=logfile)
   return 0
   return 0
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.call("taskkill /f /im go.exe > NUL", shell=True)
-    subprocess.call("taskkill /f /im falcore.exe > NUL", shell=True)
+    subprocess.call("taskkill /f /im go.exe > NUL", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("taskkill /f /im falcore.exe > NUL", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()
   for line in out.splitlines():
   for line in out.splitlines():
-    if 'falcore' in line:
+    if 'falcore' in line and 'run-tests' not in line:
       pid = int(line.split(None, 2)[1])
       pid = int(line.split(None, 2)[1])
       os.kill(pid, 9)
       os.kill(pid, 9)
   return 0
   return 0

+ 1 - 3
falcore/src/framework_benchmarks/falcore.go

@@ -31,11 +31,9 @@ type Fortune struct {
 	Message string `json:"message"`
 	Message string `json:"message"`
 }
 }
 
 
-// TODO: remove ?charset=utf8 from DSN after the next Go-MySQL-Driver release
-// https://github.com/go-sql-driver/mysql#unicode-support
 const (
 const (
 	// Database
 	// Database
-	connectionString   = "benchmarkdbuser:benchmarkdbpass@tcp(localhost:3306)/hello_world?charset=utf8"
+	connectionString   = "benchmarkdbuser:benchmarkdbpass@tcp(localhost:3306)/hello_world"
 	worldSelect        = "SELECT id, randomNumber FROM World WHERE id = ?"
 	worldSelect        = "SELECT id, randomNumber FROM World WHERE id = ?"
 	worldUpdate        = "UPDATE World SET randomNumber = ? WHERE id = ?"
 	worldUpdate        = "UPDATE World SET randomNumber = ? WHERE id = ?"
 	fortuneSelect      = "SELECT id, message FROM Fortune;"
 	fortuneSelect      = "SELECT id, message FROM Fortune;"

+ 7 - 7
finagle/setup.py

@@ -4,24 +4,24 @@ import sys
 import time
 import time
 import os
 import os
 
 
-def start(args=None):
+def start(args, logfile, errfile):
 
 
 
 
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call("..\\sbt\\sbt.bat update compile", shell=True, cwd="finagle")
-      subprocess.Popen("..\\sbt\\sbt.bat -Ddb.host=" + args.database_host + " run", cwd="finagle", shell=True)
+      subprocess.check_call("..\\sbt\\sbt.bat update compile", shell=True, cwd="finagle", stderr=errfile, stdout=logfile)
+      subprocess.Popen("..\\sbt\\sbt.bat -Ddb.host=" + args.database_host + " run", cwd="finagle", shell=True, stderr=errfile, stdout=logfile)
     else:
     else:
-      subprocess.check_call("../sbt/sbt update compile", shell=True, cwd="finagle")
-      subprocess.Popen("../sbt/sbt -Ddb.host=" + args.database_host + " run", cwd="finagle", shell=True)
+      subprocess.check_call("../sbt/sbt update compile", shell=True, cwd="finagle", stderr=errfile, stdout=logfile)
+      subprocess.Popen("../sbt/sbt -Ddb.host=" + args.database_host + " run", cwd="finagle", shell=True, stderr=errfile, stdout=logfile)
 
 
     time.sleep(5)
     time.sleep(5)
     return 0
     return 0
 
 
 
 
 
 
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call("wmic process where \"CommandLine LIKE '%\\\\sbt\\\\sbt%'\" call terminate")
+    subprocess.check_call("wmic process where \"CommandLine LIKE '%\\\\sbt\\\\sbt%'\" call terminate", stderr=errfile, stdout=logfile)
   else:
   else:
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()

+ 65 - 35
finagle/src/main/scala/com/falmarri/finagle/Finagle.scala

@@ -1,25 +1,40 @@
 package com.falmarri.finagle
 package com.falmarri.finagle
 
 
+import scala.util.Random
+import scala.collection.immutable.StringOps
 import com.fasterxml.jackson.databind.ObjectMapper
 import com.fasterxml.jackson.databind.ObjectMapper
 import com.fasterxml.jackson.module.scala.DefaultScalaModule
 import com.fasterxml.jackson.module.scala.DefaultScalaModule
-import com.twitter.finagle.builder.ClientBuilder
-import com.twitter.finagle.exp.mysql.{Client, IntValue, MySQL, Row}
-import com.twitter.finagle.http.{HttpMuxer, Request, Response}
-import com.twitter.finagle.{Http, Service}
-import com.twitter.util.{Future, FuturePool}
-import java.net.InetSocketAddress
 import java.util.concurrent.Executors
 import java.util.concurrent.Executors
+import com.twitter.finagle.Service
+import com.twitter.finagle.exp.Mysql
+import com.twitter.finagle.exp.mysql._
+import org.jboss.netty.handler.codec.http._
+import org.jboss.netty.handler.codec.http.HttpResponseStatus._
+import org.jboss.netty.handler.codec.http.HttpVersion.HTTP_1_1
 import org.jboss.netty.buffer.ChannelBuffers.wrappedBuffer
 import org.jboss.netty.buffer.ChannelBuffers.wrappedBuffer
-import scala.util.Random
+import com.twitter.util.{Future, FuturePool}
+import java.net.InetSocketAddress
+import com.twitter.finagle.builder.{Server, ServerBuilder}
+import com.twitter.finagle.http.{Http,HttpMuxer}
 
 
 object FinagleBenchmark extends App {
 object FinagleBenchmark extends App {
   val maxConnections = 256
   val maxConnections = 256
 
 
-  val mysql = new Client(ClientBuilder()
-    .codec(new MySQL("benchmarkdbuser", "benchmarkdbpass", Some("hello_world")))
-    .hosts(new InetSocketAddress(System.getProperty("db.host", "localhost"), 3306))
-    .hostConnectionLimit(maxConnections)
-    .buildFactory())
+  //val mysql = new Client(ClientBuilder()
+  //  .codec(new MySQL("benchmarkdbuser", "benchmarkdbpass", Some("hello_world")))
+  //  .hosts(new InetSocketAddress(System.getProperty("db.host", "localhost"), 3306))
+  //  .hostConnectionLimit(maxConnections)
+  //  .buildFactory())
+
+  val username = "benchmarkdbuser"
+  val password = "benchmarkdbpass"
+  val db = "hello_world"
+  val host = System.getProperty("db.host", "localhost")
+
+  val mysql = Mysql
+      .withCredentials(username, password)
+      .withDatabase(db)
+      .newRichClient(host + ":3306")
 
 
   val pool = FuturePool(Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2))
   val pool = FuturePool(Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2))
 
 
@@ -41,37 +56,52 @@ object FinagleBenchmark extends App {
   def serialize(result: Any): Array[Byte] =
   def serialize(result: Any): Array[Byte] =
     mapper.writeValueAsBytes(result)
     mapper.writeValueAsBytes(result)
 
 
-  def createResponse(req: Request, bytes: Array[Byte]) = {
+  def createResponse(req: HttpRequest, bytes: Array[Byte]) = {
     val body = wrappedBuffer(bytes)
     val body = wrappedBuffer(bytes)
-    val resp = req.response
-    resp.setContentTypeJson
+    val resp = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK)
+    //resp.setContentTypeJson
     resp.setContent(body)
     resp.setContent(body)
-    resp.contentLength = body.readableBytes
+    //resp.contentLength = body.readableBytes
     resp
     resp
   }
   }
 
 
-  HttpMuxer.addRichHandler("/json", new Service[Request, Response] {
-    def apply(req: Request): Future[Response] = pool {
-      createResponse(req, serialize(Map("message" -> "Hello, World!")))
-    }
-  })
-
-  HttpMuxer.addRichHandler("/db", new Service[Request, Response] {
-    val rand = new Random()
-    val sql = "SELECT * FROM world WHERE id = "
+  val muxService = new HttpMuxer()
+    .withHandler("/json", new Service[HttpRequest, HttpResponse] {
+      def apply(req: HttpRequest): Future[HttpResponse] = pool {
+        createResponse(req, serialize(Map("message" -> "Hello, World!")))
+      }
+    })
+    .withHandler("/db", new Service[HttpRequest, HttpResponse] {
+      val rand = new Random()
+      val sql = "SELECT * FROM world WHERE id = "
 
 
-    def apply(req: Request): Future[Response] = {
-      val n = req.params.getIntOrElse("queries", 1)
+      def apply(req: HttpRequest): Future[HttpResponse] = {
+        //val n = req.params.getIntOrElse("queries", 1)
+        val decoder = new QueryStringDecoder(req.getUri())
+        val n = {
+          val queries = decoder.getParameters().get("queries")
+          if(queries == null) {
+            1
+          }
+          else {
+            queries.get(0).toInt
+          }
+        }
 
 
-      val qs = (0 until n) map { i =>
-        mysql.select(sql + rand.nextInt(10000))(rowToMap)
-      }
+        val qs = (0 until n) map { i =>
+          mysql.select(sql + rand.nextInt(10000))(rowToMap)
+        }
 
 
-      Future.collect(qs) map { results =>
-        createResponse(req, serialize(results.flatten))
+        Future.collect(qs) map { results =>
+          createResponse(req, serialize(results.flatten))
+        }
       }
       }
-    }
-  })
+    })
 
 
-  Http.serve(new InetSocketAddress(8080), HttpMuxer)
+  //Http.serve(new InetSocketAddress(8080), HttpMuxer)
+  val server: Server = ServerBuilder()
+    .codec(Http())
+    .bindTo(new InetSocketAddress(8080))
+    .name("HttpServer")
+    .build(muxService)
 }
 }

+ 3 - 3
flask/setup.py

@@ -7,7 +7,7 @@ bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py2/bin')
 NCPU = multiprocessing.cpu_count()
 NCPU = multiprocessing.cpu_count()
 
 
 
 
-def start(args):
+def start(args, logfile, errfile):
     setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
     setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
     subprocess.Popen([
     subprocess.Popen([
         bin_dir + "/gunicorn",
         bin_dir + "/gunicorn",
@@ -16,10 +16,10 @@ def start(args):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="flask")
+        cwd="flask", stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
-def stop():
+def stop(logfile, errfile):
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()
     for line in out.splitlines():
     for line in out.splitlines():

+ 6 - 6
flask/setup_nginxuwsgi.py

@@ -7,23 +7,23 @@ bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py2/bin')
 config_dir = os.path.expanduser('~/FrameworkBenchmarks/config')
 config_dir = os.path.expanduser('~/FrameworkBenchmarks/config')
 NCPU = multiprocessing.cpu_count()
 NCPU = multiprocessing.cpu_count()
 
 
-def start(args):
+def start(args, logfile, errfile):
     setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
     setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
     try:
     try:
         subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' +
         subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' +
-            config_dir + '/nginx_uwsgi.conf', shell=True)
+            config_dir + '/nginx_uwsgi.conf', shell=True, stderr=errfile, stdout=logfile)
         # Run in the background, but keep stdout/stderr for easy debugging
         # Run in the background, but keep stdout/stderr for easy debugging
         subprocess.Popen(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi.ini' +
         subprocess.Popen(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi.ini' +
             ' --processes ' + str(NCPU * 3) +
             ' --processes ' + str(NCPU * 3) +
             ' --wsgi app:app',
             ' --wsgi app:app',
-            shell=True, cwd='flask')
+            shell=True, cwd='flask', stderr=errfile, stdout=logfile)
         return 0
         return 0
     except subprocess.CalledProcessError:
     except subprocess.CalledProcessError:
         return 1
         return 1
 
 
-def stop():
-    subprocess.call('sudo /usr/local/nginx/sbin/nginx -s stop', shell=True)
-    subprocess.call(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi_stop.ini', shell=True)
+def stop(logfile, errfile):
+    subprocess.call('sudo /usr/local/nginx/sbin/nginx -s stop', shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi_stop.ini', shell=True, stderr=errfile, stdout=logfile)
 
 
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()

+ 3 - 3
flask/setup_py3.py

@@ -7,7 +7,7 @@ bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py3/bin')
 NCPU = multiprocessing.cpu_count()
 NCPU = multiprocessing.cpu_count()
 
 
 
 
-def start(args):
+def start(args, logfile, errfile):
     global proc
     global proc
     setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
     setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
     proc = subprocess.Popen([
     proc = subprocess.Popen([
@@ -17,10 +17,10 @@ def start(args):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="flask")
+        cwd="flask", stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
-def stop():
+def stop(logfile, errfile):
     global proc
     global proc
     if proc is None:
     if proc is None:
         return 0
         return 0

+ 3 - 3
flask/setup_pypy.py

@@ -9,7 +9,7 @@ NCPU = multiprocessing.cpu_count()
 proc = None
 proc = None
 
 
 
 
-def start(args):
+def start(args, logfile, errfile):
     global proc
     global proc
     setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
     setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
     proc = subprocess.Popen([
     proc = subprocess.Popen([
@@ -19,10 +19,10 @@ def start(args):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="flask")
+        cwd="flask", stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
-def stop():
+def stop(logfile, errfile):
     global proc
     global proc
     if proc is None:
     if proc is None:
         return 0
         return 0

+ 7 - 6
gemini/setup.py

@@ -6,20 +6,21 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("gemini/Docroot/WEB-INF/GeminiHello.conf", "db.ConnectString = .*:3306", "db.ConnectString = " + args.database_host + ":3306")
   setup_util.replace_text("gemini/Docroot/WEB-INF/GeminiHello.conf", "db.ConnectString = .*:3306", "db.ConnectString = " + args.database_host + ":3306")
   setup_util.replace_text("gemini/Docroot/WEB-INF/resin.xml", "root-directory=\".*\/FrameworkBenchmarks", "root-directory=\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("gemini/Docroot/WEB-INF/resin.xml", "root-directory=\".*\/FrameworkBenchmarks", "root-directory=\"" + home + "/FrameworkBenchmarks")
   
   
   try:
   try:
-    subprocess.call("mkdir classes", shell=True, cwd="gemini/Docroot/WEB-INF")
-    subprocess.check_call("ant compile", shell=True, cwd="gemini")
-    subprocess.check_call("$RESIN_HOME/bin/resinctl -conf $HOME/FrameworkBenchmarks/gemini/Docroot/WEB-INF/resin.xml start", shell=True)
+    # This was reporting an error because it already exists... not sure.
+    #subprocess.call("mkdir classes", shell=True, cwd="gemini/Docroot/WEB-INF", stderr=errfile, stdout=logfile)
+    subprocess.check_call("ant compile", shell=True, cwd="gemini", stderr=errfile, stdout=logfile)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl -conf $HOME/FrameworkBenchmarks/gemini/Docroot/WEB-INF/resin.xml start", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 8 - 8
go/setup.py

@@ -3,22 +3,22 @@ import sys
 import os
 import os
 import setup_util
 import setup_util
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("go/src/hello/hello.go", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)")
   setup_util.replace_text("go/src/hello/hello.go", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)")
   if os.name == 'nt':
   if os.name == 'nt':
     #subprocess.call("rmdir /s /q pkg\\windows_amd64", shell=True, cwd="go")
     #subprocess.call("rmdir /s /q pkg\\windows_amd64", shell=True, cwd="go")
     #subprocess.call("rmdir /s /q src\\github.com", shell=True, cwd="go")
     #subprocess.call("rmdir /s /q src\\github.com", shell=True, cwd="go")
     #subprocess.call("del /s /q /f bin\\hello.exe", shell=True, cwd="go")
     #subprocess.call("del /s /q /f bin\\hello.exe", shell=True, cwd="go")
-    subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\go&& go get ./...", shell=True, cwd="go")
-    subprocess.Popen("setup.bat", shell=True, cwd="go") 
+    subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\go&& go get ./...", shell=True, cwd="go", stderr=errfile, stdout=logfile)
+    subprocess.Popen("setup.bat", shell=True, cwd="go", stderr=errfile, stdout=logfile) 
     return 0
     return 0
-  subprocess.call("go get ./...", shell=True, cwd="go") 
-  subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="go")
+  subprocess.call("go get ./...", shell=True, cwd="go", stderr=errfile, stdout=logfile) 
+  subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="go", stderr=errfile, stdout=logfile)
   return 0
   return 0
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.call("taskkill /f /im go.exe > NUL", shell=True)
-    subprocess.call("taskkill /f /im hello.exe > NUL", shell=True)
+    subprocess.call("taskkill /f /im go.exe > NUL", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("taskkill /f /im hello.exe > NUL", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()

+ 1 - 3
go/src/hello/hello.go

@@ -28,11 +28,9 @@ type Fortune struct {
 	Message string `json:"message"`
 	Message string `json:"message"`
 }
 }
 
 
-// TODO: remove ?charset=utf8 from DSN after the next Go-MySQL-Driver release
-// https://github.com/go-sql-driver/mysql#unicode-support
 const (
 const (
 	// Database
 	// Database
-	connectionString   = "benchmarkdbuser:benchmarkdbpass@tcp(localhost:3306)/hello_world?charset=utf8"
+	connectionString   = "benchmarkdbuser:benchmarkdbpass@tcp(localhost:3306)/hello_world"
 	worldSelect        = "SELECT id, randomNumber FROM World WHERE id = ?"
 	worldSelect        = "SELECT id, randomNumber FROM World WHERE id = ?"
 	worldUpdate        = "UPDATE World SET randomNumber = ? WHERE id = ?"
 	worldUpdate        = "UPDATE World SET randomNumber = ? WHERE id = ?"
 	fortuneSelect      = "SELECT id, message FROM Fortune;"
 	fortuneSelect      = "SELECT id, message FROM Fortune;"

+ 9 - 9
grails/setup.py

@@ -3,22 +3,22 @@ import subprocess
 import sys
 import sys
 import setup_util
 import setup_util
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("grails/hello/grails-app/conf/DataSource.groovy", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
   setup_util.replace_text("grails/hello/grails-app/conf/DataSource.groovy", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
   
   
   try:
   try:
-    subprocess.check_call("grails install-dependency mysql:mysql-connector-java:5.1.22", shell=True, cwd="grails/hello")
-    subprocess.check_call("grails war", shell=True, cwd="grails/hello")
-    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
-    subprocess.check_call("cp grails/hello/target/hello-0.1.war $RESIN_HOME/webapps/grails.war", shell=True)
-    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
+    subprocess.check_call("grails install-dependency mysql:mysql-connector-java:5.1.22", shell=True, cwd="grails/hello", stderr=errfile, stdout=logfile)
+    subprocess.check_call("grails war", shell=True, cwd="grails/hello", stderr=errfile, stdout=logfile)
+    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("cp grails/hello/target/hello-0.1.war $RESIN_HOME/webapps/grails.war", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
-    subprocess.check_call("rm -rf $RESIN_HOME/resin-data/*", shell=True)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("rm -rf $RESIN_HOME/resin-data/*", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 4 - 4
grizzly-bm/setup.py

@@ -3,14 +3,14 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   try:
   try:
-    subprocess.check_call("mvn clean compile assembly:single", shell=True, cwd="grizzly-bm")
-    subprocess.Popen("java -jar grizzly-bm-0.1-jar-with-dependencies.jar".rsplit(" "), cwd="grizzly-bm/target")
+    subprocess.check_call("mvn clean compile assembly:single", shell=True, cwd="grizzly-bm", stderr=errfile, stdout=logfile)
+    subprocess.Popen("java -jar grizzly-bm-0.1-jar-with-dependencies.jar".rsplit(" "), cwd="grizzly-bm/target", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()
   for line in out.splitlines():
   for line in out.splitlines():

+ 4 - 4
grizzly-jersey/setup.py

@@ -3,15 +3,15 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   try:
   try:
-    subprocess.check_call("mvn clean package", shell=True, cwd="grizzly-jersey")
-    subprocess.Popen(("java -jar target/grizzly-jersey-example.jar -dbhost " + args.database_host).rsplit(" "), cwd="grizzly-jersey")
+    subprocess.check_call("mvn clean package", shell=True, cwd="grizzly-jersey", stderr=errfile, stdout=logfile)
+    subprocess.Popen(("java -jar target/grizzly-jersey-example.jar -dbhost " + args.database_host).rsplit(" "), cwd="grizzly-jersey", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()
   for line in out.splitlines():
   for line in out.splitlines():

+ 12 - 12
hapi/setup.py

@@ -3,35 +3,35 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("hapi/app.js", "localhost", args.database_host)
   setup_util.replace_text("hapi/app.js", "localhost", args.database_host)
 
 
   try:
   try:
-    npm()
+    npm(logfile, errfile)
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.Popen("set NODE_ENV=production", shell=True)
-      subprocess.Popen("node app", shell=True, cwd="hapi")
+      subprocess.Popen("set NODE_ENV=production", shell=True, stderr=errfile, stdout=logfile)
+      subprocess.Popen("node app", shell=True, cwd="hapi", stderr=errfile, stdout=logfile)
     else:
     else:
-      subprocess.Popen("NODE_ENV=production node app", shell=True, cwd="hapi")
+      subprocess.Popen("NODE_ENV=production node app", shell=True, cwd="hapi", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def npm():
+def npm(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call("copy package.json package.json.dist /y > NUL", shell=True, cwd="hapi")
+    subprocess.check_call("copy package.json package.json.dist /y > NUL", shell=True, cwd="hapi", stderr=errfile, stdout=logfile)
     setup_util.replace_text("hapi/package.json", ".*mapper.*", "")
     setup_util.replace_text("hapi/package.json", ".*mapper.*", "")
 
 
   try:
   try:
-    subprocess.check_call("npm install", shell=True, cwd="hapi")
+    subprocess.check_call("npm install", shell=True, cwd="hapi", stderr=errfile, stdout=logfile)
   finally:
   finally:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call("del package.json", shell=True, cwd="hapi")
-      subprocess.check_call("ren package.json.dist package.json", shell=True, cwd="hapi")
+      subprocess.check_call("del package.json", shell=True, cwd="hapi", stderr=errfile, stdout=logfile)
+      subprocess.check_call("ren package.json.dist package.json", shell=True, cwd="hapi", stderr=errfile, stdout=logfile)
 
 
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.Popen("taskkill /f /im node.exe > NUL", shell=True)
+    subprocess.Popen("taskkill /f /im node.exe > NUL", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)

+ 6 - 6
http-kit/setup.py

@@ -3,25 +3,25 @@ import subprocess
 import sys
 import sys
 import setup_util
 import setup_util
 
 
-def start(args):
+def start(args, logfile, errfile):
 
 
   try:
   try:
-    subprocess.check_call("lein deps", shell=True, cwd="http-kit/hello")
+    subprocess.check_call("lein deps", shell=True, cwd="http-kit/hello", stderr=errfile, stdout=logfile)
     subprocess.check_call("rm -rf target", shell=True, cwd="http-kit/hello")
     subprocess.check_call("rm -rf target", shell=True, cwd="http-kit/hello")
     # pack all dependencies into a single jar: target/http-kit-standalone.jar
     # pack all dependencies into a single jar: target/http-kit-standalone.jar
-    subprocess.check_call("lein uberjar", shell=True, cwd="http-kit/hello")
+    subprocess.check_call("lein uberjar", shell=True, cwd="http-kit/hello", stderr=errfile, stdout=logfile)
     # -server is much faster
     # -server is much faster
     # 'lein run' passes '-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1' which make it starts fast, but runs slow
     # 'lein run' passes '-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1' which make it starts fast, but runs slow
     command = "java -server -jar target/http-kit-standalone.jar --db-host " + args.database_host
     command = "java -server -jar target/http-kit-standalone.jar --db-host " + args.database_host
-    subprocess.Popen(command, shell=True, cwd="http-kit/hello")
+    subprocess.Popen(command, shell=True, cwd="http-kit/hello", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   try:
   try:
     # listen on 8080
     # listen on 8080
-    subprocess.check_call("lsof -t -sTCP:LISTEN -i:8080 | xargs kill", shell=True)
+    subprocess.check_call("lsof -t -sTCP:LISTEN -i:8080 | xargs kill", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 6 - 6
jester/setup.py

@@ -6,16 +6,16 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
-  subprocess.check_call("nimrod c -d:release --path:../installs/jester/jester hello.nim", shell=True, cwd="jester")
-  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/jester/config/nginx.conf", shell=True)
+def start(args, logfile, errfile):
+  subprocess.check_call("nimrod c -d:release --path:../installs/jester/jester hello.nim", shell=True, cwd="jester", stderr=errfile, stdout=logfile)
+  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/jester/config/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
   
   
   for i in range(0, 8):
   for i in range(0, 8):
-    subprocess.Popen("./hello 900" + str(i) + " > /dev/null", shell=True, cwd="jester")
+    subprocess.Popen("./hello 900" + str(i), shell=True, cwd="jester", stderr=errfile, stdout=logfile)
   return 0
   return 0
 
 
-def stop():
-  subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
+def stop(logfile, errfile):
+  subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
 
 
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()

+ 5 - 5
kelp/setup.py

@@ -7,20 +7,20 @@ import getpass
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("kelp/app.pl", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("kelp/app.pl", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("kelp/nginx.conf", "USR", getpass.getuser())
   setup_util.replace_text("kelp/nginx.conf", "USR", getpass.getuser())
   setup_util.replace_text("kelp/nginx.conf", "server unix:.*\/FrameworkBenchmarks", "server unix:" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("kelp/nginx.conf", "server unix:.*\/FrameworkBenchmarks", "server unix:" + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.Popen("plackup -E production -s Starman --workers=" + str(args.max_threads) + " -l " + home + "/FrameworkBenchmarks/kelp/frameworks-benchmark.sock -a ./app.pl", shell=True, cwd="kelp")
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/kelp/nginx.conf", shell=True)
+    subprocess.Popen("plackup -E production -s Starman --workers=" + str(args.max_threads) + " -l " + home + "/FrameworkBenchmarks/kelp/frameworks-benchmark.sock -a ./app.pl", shell=True, cwd="kelp", stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/kelp/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()
     for line in out.splitlines():
     for line in out.splitlines():

+ 4 - 4
lapis/setup.py

@@ -3,14 +3,14 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("lapis/nginx.conf", "CWD", os.getcwd())
   setup_util.replace_text("lapis/nginx.conf", "CWD", os.getcwd())
   setup_util.replace_text("lapis/nginx.conf", "DBHOSTNAME", args.database_host)
   setup_util.replace_text("lapis/nginx.conf", "DBHOSTNAME", args.database_host)
-  subprocess.Popen('/usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -g "worker_processes ' + str((args.max_threads)) + ';"', shell=True, cwd="lapis")
+  subprocess.Popen('/usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -g "worker_processes ' + str((args.max_threads)) + ';"', shell=True, cwd="lapis", stderr=errfile, stdout=logfile)
 
 
   return 0
   return 0
 
 
-def stop():
-  subprocess.Popen('/usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd="lapis")
+def stop(logfile, errfile):
+  subprocess.Popen('/usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd="lapis", stderr=errfile, stdout=logfile)
 
 
   return 0
   return 0

+ 7 - 7
lift-stateless/setup.py

@@ -5,21 +5,21 @@ import setup_util
 import os
 import os
 import time
 import time
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("lift-stateless/src/main/scala/Main.scala", "> \".*:3306", "> \"" + args.database_host + ":3306")
   setup_util.replace_text("lift-stateless/src/main/scala/Main.scala", "> \".*:3306", "> \"" + args.database_host + ":3306")
 
 
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call('"..\\sbt\\sbt.bat" update assembly', shell=True, cwd="lift-stateless")
-    subprocess.Popen(".\\run.bat", shell=True, cwd="lift-stateless")  
+    subprocess.check_call('"..\\sbt\\sbt.bat" update assembly', shell=True, cwd="lift-stateless", stderr=errfile, stdout=logfile)
+    subprocess.Popen(".\\run.bat", shell=True, cwd="lift-stateless", stderr=errfile, stdout=logfile)  
   else:
   else:
-    subprocess.check_call("../sbt/sbt update assembly", shell=True, cwd="lift-stateless")
-    subprocess.Popen("./run", shell=True, cwd="lift-stateless")
+    subprocess.check_call("../sbt/sbt update assembly", shell=True, cwd="lift-stateless", stderr=errfile, stdout=logfile)
+    subprocess.Popen("./run", shell=True, cwd="lift-stateless", stderr=errfile, stdout=logfile)
 
 
   time.sleep(5)
   time.sleep(5)
   return 0
   return 0
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call("wmic process where \"CommandLine LIKE '%lift-stateless-assembly%'\" call terminate")
+    subprocess.check_call("wmic process where \"CommandLine LIKE '%lift-stateless-assembly%'\" call terminate", stderr=errfile, stdout=logfile)
   else:
   else:
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()

+ 7 - 7
luminus/setup.py

@@ -3,20 +3,20 @@ import subprocess
 import sys
 import sys
 import setup_util
 import setup_util
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("luminus/hello/src/hello/models/schema.clj", ":subname \"//.*:3306", ":subname \"//" + args.database_host + ":3306")
   setup_util.replace_text("luminus/hello/src/hello/models/schema.clj", ":subname \"//.*:3306", ":subname \"//" + args.database_host + ":3306")
 
 
   try:
   try:
-    subprocess.check_call("lein ring uberwar", shell=True, cwd="luminus/hello")
-    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
-    subprocess.check_call("cp luminus/hello/target/hello-luminus-standalone.war $RESIN_HOME/webapps/luminus.war", shell=True)
-    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
+    subprocess.check_call("lein ring uberwar", shell=True, cwd="luminus/hello", stderr=errfile, stdout=logfile)
+    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("cp luminus/hello/target/hello-luminus-standalone.war $RESIN_HOME/webapps/luminus.war", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 5 - 5
mojolicious/setup.py

@@ -7,20 +7,20 @@ import getpass
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("mojolicious/app.pl", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("mojolicious/app.pl", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("mojolicious/nginx.conf", "USR", getpass.getuser())
   setup_util.replace_text("mojolicious/nginx.conf", "USR", getpass.getuser())
   setup_util.replace_text("mojolicious/nginx.conf", "server unix:.*\/FrameworkBenchmarks", "server unix:" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("mojolicious/nginx.conf", "server unix:.*\/FrameworkBenchmarks", "server unix:" + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.Popen("plackup -E production -s Starman --workers=" + str(args.max_threads) + " -l " + home + "/FrameworkBenchmarks/mojolicious/frameworks-benchmark.sock -a ./app.pl", shell=True, cwd="mojolicious")
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/mojolicious/nginx.conf", shell=True)
+    subprocess.Popen("plackup -E production -s Starman --workers=" + str(args.max_threads) + " -l " + home + "/FrameworkBenchmarks/mojolicious/frameworks-benchmark.sock -a ./app.pl", shell=True, cwd="mojolicious", stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/mojolicious/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()
     for line in out.splitlines():
     for line in out.splitlines():

+ 4 - 4
nancy/setup_iis.py

@@ -3,20 +3,20 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   if os.name != 'nt':
   if os.name != 'nt':
     return 1
     return 1
   
   
   try:
   try:
     setup_util.replace_text("nancy/src/Web.config", "localhost", args.database_host)
     setup_util.replace_text("nancy/src/Web.config", "localhost", args.database_host)
-    subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="nancy")
+    subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="nancy", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   if os.name != 'nt':
   if os.name != 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="nancy")
+  subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="nancy", stderr=errfile, stdout=logfile)
   return 0
   return 0

+ 10 - 10
nancy/setup_libevent.py

@@ -6,7 +6,7 @@ import os
 root = os.getcwd() + "/nancy"
 root = os.getcwd() + "/nancy"
 app = root + "/src"
 app = root + "/src"
 
 
-def start(args):
+def start(args, logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 1
     return 1
   
   
@@ -14,27 +14,27 @@ def start(args):
 
 
   try:
   try:
     # build
     # build
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app)
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app)
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stderr=errfile, stdout=logfile)
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stderr=errfile, stdout=logfile)
     
     
     # nginx
     # nginx
     workers = 'worker_processes ' + str(args.max_threads) + ';'
     workers = 'worker_processes ' + str(args.max_threads) + ';'
-    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True);
-    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf.libevent -g "' + workers + '"', shell=True)
+    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True, stderr=errfile, stdout=logfile);
+    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf.libevent -g "' + workers + '"', shell=True, stderr=errfile, stdout=logfile)
     
     
     # fastcgi
     # fastcgi
     os.environ['MONO_GC_PARAMS']="nursery-size=16m"
     os.environ['MONO_GC_PARAMS']="nursery-size=16m"
     for port in range(9001, 9001 + args.max_threads):
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen("mono-sgen -O=all LibeventHost/bin/Release/LibeventHost.exe 127.0.0.1 " + str(port) + " " + args.database_host + " &", shell=True, cwd=app)
+      subprocess.Popen("mono-sgen -O=all LibeventHost/bin/Release/LibeventHost.exe 127.0.0.1 " + str(port) + " " + args.database_host + " &", shell=True, cwd=app, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True)
-  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True)
-  subprocess.check_call("pkill -9 mono-sgen", shell=True)
+  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True, stderr=errfile, stdout=logfile)
+  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True, stderr=errfile, stdout=logfile)
+  subprocess.check_call("pkill -9 mono-sgen", shell=True, stderr=errfile, stdout=logfile)
   return 0
   return 0

+ 9 - 9
nancy/setup_nginx.py

@@ -6,7 +6,7 @@ import os
 root = os.getcwd() + "/nancy"
 root = os.getcwd() + "/nancy"
 app = root + "/src"
 app = root + "/src"
 
 
-def start(args):
+def start(args, logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 1
     return 1
   
   
@@ -14,27 +14,27 @@ def start(args):
 
 
   try:
   try:
     # build
     # build
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app)
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app)
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stderr=errfile, stdout=logfile)
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stderr=errfile, stdout=logfile)
     
     
     # nginx
     # nginx
     workers = 'worker_processes ' + str(args.max_threads) + ';'
     workers = 'worker_processes ' + str(args.max_threads) + ';'
-    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True);
-    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf -g "' + workers + '"', shell=True)
+    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True, stderr=errfile, stdout=logfile);
+    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf -g "' + workers + '"', shell=True, stderr=errfile, stdout=logfile)
     
     
     # fastcgi
     # fastcgi
     for port in range(9001, 9001 + args.max_threads):
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app)
+      subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True)
-  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True)
+  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True, stderr=errfile, stdout=logfile)
+  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True, stderr=errfile, stdout=logfile)
   #
   #
   # stop mono
   # stop mono
   #
   #

+ 5 - 5
nancy/setup_xsp.py

@@ -3,21 +3,21 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 1
     return 1
   
   
   setup_util.replace_text("nancy/src/Web.config", "localhost", args.database_host)
   setup_util.replace_text("nancy/src/Web.config", "localhost", args.database_host)
 
 
   try:
   try:
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd="nancy/src")
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="nancy/src")
-    subprocess.Popen("MONO_OPTIONS=--gc=sgen xsp4 --nonstop", shell=True, cwd="nancy/src")
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd="nancy/src", stderr=errfile, stdout=logfile)
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="nancy/src", stderr=errfile, stdout=logfile)
+    subprocess.Popen("MONO_OPTIONS=--gc=sgen xsp4 --nonstop", shell=True, cwd="nancy/src", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 0
     return 0
   
   

+ 5 - 5
netty/setup.py

@@ -3,16 +3,16 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   try:
   try:
-    subprocess.check_call("mvn clean compile assembly:single", shell=True, cwd="netty")
-    subprocess.Popen("java -Dio.netty.noResourceLeakDetection=true -jar netty-example-0.1-jar-with-dependencies.jar".rsplit(" "), cwd="netty/target")
+    subprocess.check_call("mvn clean compile assembly:single", shell=True, cwd="netty", stderr=errfile, stdout=logfile)
+    subprocess.Popen("java -Dio.netty.noResourceLeakDetection=true -jar netty-example-0.1-jar-with-dependencies.jar".rsplit(" "), cwd="netty/target", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call("wmic process where \"CommandLine LIKE '%netty-example%'\" call terminate")
+    subprocess.check_call("wmic process where \"CommandLine LIKE '%netty-example%'\" call terminate", stderr=errfile, stdout=logfile)
   else:
   else:
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()

+ 9 - 9
nodejs/setup.py

@@ -4,33 +4,33 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("nodejs/hello.js", "mongodb:\/\/.*\/hello_world", "mongodb://" + args.database_host + "/hello_world")
   setup_util.replace_text("nodejs/hello.js", "mongodb:\/\/.*\/hello_world", "mongodb://" + args.database_host + "/hello_world")
   setup_util.replace_text("nodejs/hello.js", "localhost", args.database_host)
   setup_util.replace_text("nodejs/hello.js", "localhost", args.database_host)
 
 
   try:
   try:
-    npm()
-    subprocess.Popen("node hello.js", shell=True, cwd="nodejs")
+    npm(logfile, errfile)
+    subprocess.Popen("node hello.js", shell=True, cwd="nodejs", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def npm():
+def npm(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call("copy package.json package.json.dist /y > NUL", shell=True, cwd="nodejs")
+    subprocess.check_call("copy package.json package.json.dist /y > NUL", shell=True, cwd="nodejs", stderr=errfile, stdout=logfile)
     setup_util.replace_text("nodejs/package.json", ".*mysql.*", "")
     setup_util.replace_text("nodejs/package.json", ".*mysql.*", "")
     setup_util.replace_text("nodejs/package.json", ".*mapper.*", "")
     setup_util.replace_text("nodejs/package.json", ".*mapper.*", "")
   
   
   try:
   try:
-    subprocess.check_call("npm install", shell=True, cwd="nodejs")
+    subprocess.check_call("npm install", shell=True, cwd="nodejs", stderr=errfile, stdout=logfile)
   finally:
   finally:
     if os.name == 'nt':
     if os.name == 'nt':
       subprocess.check_call("del package.json", shell=True, cwd="nodejs")
       subprocess.check_call("del package.json", shell=True, cwd="nodejs")
-      subprocess.check_call("ren package.json.dist package.json", shell=True, cwd="nodejs")
+      subprocess.check_call("ren package.json.dist package.json", shell=True, cwd="nodejs", stderr=errfile, stdout=logfile)
 
 
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.Popen("taskkill /f /im node.exe > NUL", shell=True)
+    subprocess.Popen("taskkill /f /im node.exe > NUL", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   
   
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)

+ 3 - 3
onion/setup.py

@@ -3,13 +3,13 @@ import sys
 import os
 import os
 import setup_util 
 import setup_util 
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("onion/hello.c", "mysql_real_connect\(data.db\[i\], \".*\",", "mysql_real_connect(data.db[i], \"" + args.database_host + "\",")
   setup_util.replace_text("onion/hello.c", "mysql_real_connect\(data.db\[i\], \".*\",", "mysql_real_connect(data.db[i], \"" + args.database_host + "\",")
   os.putenv("ONION_LOG","noinfo")
   os.putenv("ONION_LOG","noinfo")
-  subprocess.Popen("make && ./hello", shell=True, cwd="onion")
+  subprocess.Popen("make && ./hello", shell=True, cwd="onion", stderr=errfile, stdout=logfile)
   return 0
   return 0
 
 
-def stop():
+def stop(logfile, errfile):
   
   
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()

+ 4 - 4
openresty/setup.py

@@ -3,14 +3,14 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("openresty/nginx.conf", "CWD", os.getcwd())
   setup_util.replace_text("openresty/nginx.conf", "CWD", os.getcwd())
   setup_util.replace_text("openresty/app.lua", "DBHOSTNAME", args.database_host)
   setup_util.replace_text("openresty/app.lua", "DBHOSTNAME", args.database_host)
-  subprocess.Popen('sudo /usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -g "worker_processes ' + str((args.max_threads)) + ';"', shell=True, cwd="openresty")
+  subprocess.Popen('sudo /usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -g "worker_processes ' + str((args.max_threads)) + ';"', shell=True, cwd="openresty", stderr=errfile, stdout=logfile)
 
 
   return 0
   return 0
 
 
-def stop():
-  subprocess.Popen('sudo /usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd="openresty")
+def stop(logfile, errfile):
+  subprocess.Popen('sudo /usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd="openresty", stderr=errfile, stdout=logfile)
 
 
   return 0
   return 0

+ 11 - 11
php-codeigniter/setup.py

@@ -6,29 +6,29 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-codeigniter/application/config/database.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-codeigniter/application/config/database.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-codeigniter/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-codeigniter/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-codeigniter" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-codeigniter"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-codeigniter" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-codeigniter"', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-codeigniter", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-codeigniter/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-codeigniter/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-codeigniter", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-codeigniter/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-codeigniter/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-codeigniter/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-codeigniter", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-codeigniter/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-codeigniter", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 11 - 11
php-fuel/setup.py

@@ -6,29 +6,29 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-fuel/fuel/app/config/production/db.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-fuel/fuel/app/config/production/db.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-fuel/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-fuel/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-fuel" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-fuel"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-fuel" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-fuel"', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-fuel", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-fuel/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-fuel/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-fuel", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-fuel/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-fuel/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-fuel/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-fuel", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-fuel/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-fuel", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 11 - 11
php-kohana/setup.py

@@ -6,29 +6,29 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-kohana/application/config/database.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-kohana/application/config/database.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-kohana/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-kohana/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-kohana" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-kohana"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-kohana" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-kohana"', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-kohana", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-kohana/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-kohana/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-kohana", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-kohana/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-kohana/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('appcmd delete site PHP', shell=True)
+      subprocess.check_call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-kohana/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-kohana", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-kohana/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-kohana", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 11 - 11
php-laravel/setup.py

@@ -6,29 +6,29 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-laravel/application/config/database.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-laravel/application/config/database.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-laravel/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-laravel/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-laravel" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-laravel\\public"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-laravel" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-laravel\\public"', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-laravel", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-laravel/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-laravel/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-laravel", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-laravel/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-laravel/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-laravel/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-laravel", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-laravel/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-laravel", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 11 - 11
php-lithium/setup.py

@@ -6,29 +6,29 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-lithium/app/config/bootstrap/connections.php", "192.168.100.102", ""+ args.database_host +"")
   setup_util.replace_text("php-lithium/app/config/bootstrap/connections.php", "192.168.100.102", ""+ args.database_host +"")
   setup_util.replace_text("php-lithium/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-lithium/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-lithium" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-lithium"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-lithium" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-lithium"', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-lithium", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-lithium/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-lithium/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-lithium", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-lithium/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-lithium/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-lithium/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-lithium", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-lithium/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-lithium", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 11 - 11
php-micromvc/setup.py

@@ -6,29 +6,29 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-micromvc/Config/Config.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-micromvc/Config/Config.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-micromvc/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-micromvc/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-micromvc" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-micromvc\Public"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-micromvc" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-micromvc\Public"', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-micromvc", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-micromvc/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-micromvc/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-micromvc", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-micromvc/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-micromvc/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-micromvc/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-micromvc", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-micromvc/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-micromvc", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 8 - 8
php-phalcon-micro/setup.py

@@ -5,22 +5,22 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-phalcon-micro/public/index.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-phalcon-micro/public/index.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-phalcon-micro/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-phalcon-micro/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("sudo chown -R www-data:www-data php-phalcon-micro", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-phalcon-micro/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-phalcon-micro/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-phalcon-micro", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-phalcon-micro/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-phalcon-micro/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-phalcon-micro/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-phalcon-micro", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-phalcon-micro/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-phalcon-micro", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 8 - 8
php-phalcon/setup.py

@@ -5,22 +5,22 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-phalcon/app/config/config.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-phalcon/app/config/config.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-phalcon/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-phalcon/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("sudo chown -R www-data:www-data php-phalcon", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-phalcon/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-phalcon/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-phalcon", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-phalcon/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-phalcon/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-phalcon/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-phalcon", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-phalcon/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-phalcon", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 7 - 7
php-phpixie/setup.py

@@ -5,23 +5,23 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-phpixie/assets/config/db.php", "localhost", "" + args.database_host + "")
   setup_util.replace_text("php-phpixie/assets/config/db.php", "localhost", "" + args.database_host + "")
   setup_util.replace_text("php-phpixie/deploy/php-phpixie", "\".*\/FrameworkBenchmarks", "\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-phpixie/deploy/php-phpixie", "\".*\/FrameworkBenchmarks", "\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-phpixie/deploy/php-phpixie", "Directory .*\/FrameworkBenchmarks", "Directory " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-phpixie/deploy/php-phpixie", "Directory .*\/FrameworkBenchmarks", "Directory " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-phpixie/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-phpixie/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-phpixie")        
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-phpixie/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-phpixie/deploy/nginx.conf", shell=True)
+    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-phpixie", stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-phpixie/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-phpixie/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-phpixie/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-phpixie/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 8 - 8
php-senthot/setup.py

@@ -5,23 +5,23 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-senthot/app/Conf/config.php", "'DB_HOST' => 'localhost'", "'DB_HOST' => '" + args.database_host +"'")
   setup_util.replace_text("php-senthot/app/Conf/config.php", "'DB_HOST' => 'localhost'", "'DB_HOST' => '" + args.database_host +"'")
   setup_util.replace_text("php-senthot/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-senthot/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("sudo chown -R www-data:www-data php-senthot", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-senthot/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-senthot/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-senthot", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-senthot/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-senthot/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-senthot/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-senthot", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-senthot/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-senthot", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 7 - 7
php-silex-orm/setup.py

@@ -6,7 +6,7 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-silex-orm/web/index.php", "192.168.100.102", "" + args.database_host + "")
   setup_util.replace_text("php-silex-orm/web/index.php", "192.168.100.102", "" + args.database_host + "")
   setup_util.replace_text("php-silex-orm/deploy/php-silex-orm", "\".*\/FrameworkBenchmarks", "\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-silex-orm/deploy/php-silex-orm", "\".*\/FrameworkBenchmarks", "\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-silex-orm/deploy/php-silex-orm", "Directory .*\/FrameworkBenchmarks", "Directory " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-silex-orm/deploy/php-silex-orm", "Directory .*\/FrameworkBenchmarks", "Directory " + home + "/FrameworkBenchmarks")
@@ -17,16 +17,16 @@ def start(args):
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("composer.phar install", shell=True, cwd="php-silex-orm")
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-silex-orm/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-silex-orm/deploy/nginx.conf", shell=True)
+    subprocess.check_call("composer.phar install", shell=True, cwd="php-silex-orm", stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-silex-orm/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-silex-orm/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-silex-orm/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-silex-orm/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
     #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)
     #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)

+ 7 - 7
php-silex/setup.py

@@ -5,7 +5,7 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-silex/web/index.php", "192.168.100.102", "" + args.database_host + "")
   setup_util.replace_text("php-silex/web/index.php", "192.168.100.102", "" + args.database_host + "")
   setup_util.replace_text("php-silex/deploy/php-silex", "\".*\/FrameworkBenchmarks", "\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-silex/deploy/php-silex", "\".*\/FrameworkBenchmarks", "\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-silex/deploy/php-silex", "Directory .*\/FrameworkBenchmarks", "Directory " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-silex/deploy/php-silex", "Directory .*\/FrameworkBenchmarks", "Directory " + home + "/FrameworkBenchmarks")
@@ -16,16 +16,16 @@ def start(args):
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-silex")        
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-silex/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-silex/deploy/nginx.conf", shell=True)
+    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-silex", stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-silex/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-silex/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-silex/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-silex/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
     #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)    
     #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)    

+ 7 - 7
php-silex/setup_raw.py

@@ -5,24 +5,24 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-silex/web/index_raw.php", "192.168.100.102", "" + args.database_host + "")
   setup_util.replace_text("php-silex/web/index_raw.php", "192.168.100.102", "" + args.database_host + "")
   setup_util.replace_text("php-silex/deploy/php-silex", "\".*\/FrameworkBenchmarks", "\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-silex/deploy/php-silex", "\".*\/FrameworkBenchmarks", "\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-silex/deploy/php-silex", "Directory .*\/FrameworkBenchmarks", "Directory " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-silex/deploy/php-silex", "Directory .*\/FrameworkBenchmarks", "Directory " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-silex/deploy/nginx_raw.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-silex/deploy/nginx_raw.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-silex")
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-silex/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-silex/deploy/nginx_raw.conf", shell=True)
+    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-silex", stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-silex/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-silex/deploy/nginx_raw.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-silex/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-silex/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 7 - 7
php-silica/setup.py

@@ -6,7 +6,7 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-silica/web/app.php", "192.168.100.102", "" + args.database_host + "")
   setup_util.replace_text("php-silica/web/app.php", "192.168.100.102", "" + args.database_host + "")
   setup_util.replace_text("php-silica/deploy/php-silica", "\".*\/FrameworkBenchmarks", "\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-silica/deploy/php-silica", "\".*\/FrameworkBenchmarks", "\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-silica/deploy/php-silica", "Directory .*\/FrameworkBenchmarks", "Directory " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-silica/deploy/php-silica", "Directory .*\/FrameworkBenchmarks", "Directory " + home + "/FrameworkBenchmarks")
@@ -17,16 +17,16 @@ def start(args):
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("composer.phar install", shell=True, cwd="php-silica")        
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-silica/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-silica/deploy/nginx.conf", shell=True)
+    subprocess.check_call("composer.phar install", shell=True, cwd="php-silica", stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-silica/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-silica/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-silica/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-silica/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
     #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)    
     #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)    

+ 11 - 11
php-slim/setup.py

@@ -6,29 +6,29 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-slim/index.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-slim/index.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-slim/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-slim/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-slim" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-slim"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-slim" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-slim"', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-slim", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-slim/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-slim/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-slim", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-slim/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-slim/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-slim/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-slim", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-slim/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-slim", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 10 - 10
php-symfony2-stripped/setup.py

@@ -5,24 +5,24 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-symfony2/app/config/parameters.yml", "database_host: .*", "database_host: " + args.database_host)
   setup_util.replace_text("php-symfony2/app/config/parameters.yml", "database_host: .*", "database_host: " + args.database_host)
   setup_util.replace_text("php-symfony2/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-symfony2/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-symfony2")
-    subprocess.check_call("php app/console cache:clear --env=prod --no-debug", shell=True, cwd="php-symfony2")
-    subprocess.check_call("sudo chown -R www-data:www-data php-symfony2", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-symfony2/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-symfony2/deploy/nginx.conf", shell=True)
+    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-symfony2", stderr=errfile, stdout=logfile)
+    subprocess.check_call("php app/console cache:clear --env=prod --no-debug", shell=True, cwd="php-symfony2", stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R www-data:www-data php-symfony2", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-symfony2/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-symfony2/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-symfony2/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-symfony2", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-symfony2/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-symfony2", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 10 - 10
php-symfony2/setup.py

@@ -5,24 +5,24 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-symfony2/app/config/parameters.yml", "database_host: .*", "database_host: " + args.database_host)
   setup_util.replace_text("php-symfony2/app/config/parameters.yml", "database_host: .*", "database_host: " + args.database_host)
   setup_util.replace_text("php-symfony2/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-symfony2/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-symfony2")
-    subprocess.check_call("php app/console cache:clear --env=prod --no-debug", shell=True, cwd="php-symfony2")
-    subprocess.check_call("sudo chown -R www-data:www-data php-symfony2", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-symfony2/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-symfony2/deploy/nginx.conf", shell=True)
+    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-symfony2", stderr=errfile, stdout=logfile)
+    subprocess.check_call("php app/console cache:clear --env=prod --no-debug", shell=True, cwd="php-symfony2", stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R www-data:www-data php-symfony2", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-symfony2/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-symfony2/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-symfony2/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-symfony2", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-symfony2/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-symfony2", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 8 - 8
php-yaf/setup.py

@@ -5,23 +5,23 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php-yaf/app/conf/application.ini", "host=localhost", "host="+ args.database_host +"")
   setup_util.replace_text("php-yaf/app/conf/application.ini", "host=localhost", "host="+ args.database_host +"")
   setup_util.replace_text("php-yaf/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-yaf/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("sudo chown -R www-data:www-data php-yaf", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-yaf/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-yaf/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-yaf", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-yaf/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-yaf/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-yaf/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-yaf", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-yaf/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-yaf", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 8 - 8
php/setup.py

@@ -7,7 +7,7 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("php/dborm.php", "@.*\/hello_world", "@" + args.database_host + "/hello_world")
   setup_util.replace_text("php/dborm.php", "@.*\/hello_world", "@" + args.database_host + "/hello_world")
   setup_util.replace_text("php/dbraw.php", "host=.*;", "host=" + args.database_host + ";")
   setup_util.replace_text("php/dbraw.php", "host=.*;", "host=" + args.database_host + ";")
   setup_util.replace_text("php/updateraw.php", "host=.*;", "host=" + args.database_host + ";")
   setup_util.replace_text("php/updateraw.php", "host=.*;", "host=" + args.database_host + ";")
@@ -18,27 +18,27 @@ def start(args):
   
   
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php"', shell=True)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php"', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
     
     
     #subprocess.check_call("sudo cp php/deploy/php /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo cp php/deploy/php /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo a2ensite php", shell=True)
     #subprocess.check_call("sudo a2ensite php", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data php", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data php", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     
     
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('appcmd delete site PHP', shell=True)
+      subprocess.check_call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
     
     
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
     
     
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:

+ 9 - 9
phreeze/setup.py

@@ -6,7 +6,7 @@ from os.path import expanduser
 
 
 home = expanduser("~")
 home = expanduser("~")
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("phreeze/index.php", "localhost:3306", "" + args.database_host + ":3306")
   setup_util.replace_text("phreeze/index.php", "localhost:3306", "" + args.database_host + ":3306")
   setup_util.replace_text("phreeze/deploy/phreeze", "\".*\/FrameworkBenchmarks", "\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("phreeze/deploy/phreeze", "\".*\/FrameworkBenchmarks", "\"" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("phreeze/deploy/phreeze", "Directory .*\/FrameworkBenchmarks", "Directory " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("phreeze/deploy/phreeze", "Directory .*\/FrameworkBenchmarks", "Directory " + home + "/FrameworkBenchmarks")
@@ -14,26 +14,26 @@ def start(args):
   
   
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\phreeze" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\phreeze"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\phreeze" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\phreeze"', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
     #subprocess.check_call("sudo cp php/deploy/phreeze /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo cp php/deploy/phreeze /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo a2ensite php", shell=True)
     #subprocess.check_call("sudo a2ensite php", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data php", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data php", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/phreeze/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/phreeze/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/phreeze/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/phreeze/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
     
     
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat phreeze/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat phreeze/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
     
     
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:

+ 6 - 6
plack/setup.py

@@ -3,19 +3,19 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-def start(args):
+def start(args, logfile, errfile):
   setup_util.replace_text("plack/app.psgi", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("plack/app.psgi", "localhost", ""+ args.database_host +"")
   try:
   try:
-    subprocess.check_call("curl -L http://cpanmin.us | perl - App::cpanminus", shell=True, cwd="plack")
-    subprocess.check_call("cpanm --installdeps .", shell=True, cwd="plack")
-    pid = subprocess.Popen("plackup -E production -s Monoceros -l :8080 --max-workers=" + str(args.max_threads) + " app.psgi", shell=True, cwd="plack").pid
+    subprocess.check_call("curl -L http://cpanmin.us | perl - App::cpanminus", shell=True, cwd="plack", stderr=errfile, stdout=logfile)
+    subprocess.check_call("cpanm --installdeps .", shell=True, cwd="plack", stderr=errfile, stdout=logfile)
+    pid = subprocess.Popen("plackup -E production -s Monoceros -l :8080 --max-workers=" + str(args.max_threads) + " app.psgi", shell=True, cwd="plack", stderr=errfile, stdout=logfile).pid
     open('plack/app.pid', 'w').write(str(pid))
     open('plack/app.pid', 'w').write(str(pid))
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
-def stop():
+def stop(logfile, errfile):
   try:
   try:
-    subprocess.Popen("kill -TERM $(ps --ppid `cat app.pid` -o pid --no-header)", shell=True, cwd="plack")
+    subprocess.Popen("kill -TERM $(ps --ppid `cat app.pid` -o pid --no-header)", shell=True, cwd="plack", stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 23 - 0
plain/benchmark_config

@@ -23,6 +23,29 @@
       "display_name": "plain",
       "display_name": "plain",
       "notes": "",
       "notes": "",
       "versus": ""
       "versus": ""
+    },
+    "win": {
+      "setup_file": "setup",
+      "json_url": "/json",
+      "plaintext_url": "/plaintext",
+      "db_url": "/db",
+      "query_url": "/db?queries=",
+      "update_url": "/update?queries=",
+      "fortune_url": "/fortunes",
+      "port": 9080,
+      "approach": "Realistic",
+      "classification": "Fullstack",
+      "database": "MySQL",
+      "framework": "plain",
+      "language": "Scala",
+      "orm": "Full",
+      "platform": "Plain",
+      "webserver": "None",
+      "os": "Windows",
+      "database_os": "Linux",
+      "display_name": "plain-win",
+      "notes": "",
+      "versus": ""
     }
     }
   }]
   }]
 }
 }

+ 2 - 2
plain/build.sbt

@@ -31,8 +31,8 @@ libraryDependencies ++= Seq(
   "ch.qos.logback" % "logback-classic" % "1.0.13",
   "ch.qos.logback" % "logback-classic" % "1.0.13",
   "org.codehaus.janino" % "janino" % "2.6.1",
   "org.codehaus.janino" % "janino" % "2.6.1",
   "com.lmax" % "disruptor" % "3.2.0",
   "com.lmax" % "disruptor" % "3.2.0",
-  "com.typesafe.akka" %% "akka-actor" % "2.2.1",
-  "com.typesafe.akka" %% "akka-slf4j" % "2.2.1",
+  "com.typesafe.akka" %% "akka-actor" % "2.2.3",
+  "com.typesafe.akka" %% "akka-slf4j" % "2.2.3",
   "org.apache.commons" % "commons-lang3" % "3.1",
   "org.apache.commons" % "commons-lang3" % "3.1",
   "org.apache.commons" % "commons-compress" % "1.5",
   "org.apache.commons" % "commons-compress" % "1.5",
   "commons-io" % "commons-io" % "2.4",
   "commons-io" % "commons-io" % "2.4",

BIN
plain/lib/plain-library_2.10-1.0.1-SNAPSHOT.jar


BIN
plain/sbt-launch.jar


Some files were not shown because too many files changed in this diff