Browse Source

Merge branch 'python-r8' of https://github.com/methane/FrameworkBenchmarks into PR611

Mike Smith 11 years ago
parent
commit
1f21dd0727

+ 16 - 16
bottle/benchmark_config

@@ -16,12 +16,12 @@
       "framework": "bottle",
       "framework": "bottle",
       "language": "Python",
       "language": "Python",
       "orm": "Full",
       "orm": "Full",
-      "platform": "wsgi",
-      "webserver": "Gunicorn",
+      "platform": "Gunicorn/Meinheld",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "bottle",
       "display_name": "bottle",
-      "notes": "",
+      "notes": "CPython 2.7",
       "versus": "wsgi"
       "versus": "wsgi"
     },
     },
     "py3": {
     "py3": {
@@ -39,12 +39,12 @@
       "framework": "bottle",
       "framework": "bottle",
       "language": "Python",
       "language": "Python",
       "orm": "Full",
       "orm": "Full",
-      "platform": "wsgi",
-      "webserver": "Gunicorn",
+      "platform": "Gunicorn/Meinheld",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "bottle-py3",
       "display_name": "bottle-py3",
-      "notes": "",
+      "notes": "CPython 3.3",
       "versus": "wsgi"
       "versus": "wsgi"
     },
     },
     "pypy": {
     "pypy": {
@@ -62,12 +62,12 @@
       "framework": "bottle",
       "framework": "bottle",
       "language": "Python",
       "language": "Python",
       "orm": "Full",
       "orm": "Full",
-      "platform": "pypy",
-      "webserver": "Gunicorn",
+      "platform": "Gunicorn/Tornado",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "bottle-pypy",
       "display_name": "bottle-pypy",
-      "notes": "",
+      "notes": "PyPy 2.2",
       "versus": "wsgi"
       "versus": "wsgi"
     },
     },
     "mysql-raw": {
     "mysql-raw": {
@@ -83,12 +83,12 @@
       "framework": "bottle",
       "framework": "bottle",
       "language": "Python",
       "language": "Python",
       "orm": "Raw",
       "orm": "Raw",
-      "platform": "wsgi",
-      "webserver": "Gunicorn",
+      "platform": "Gunicorn/Meinheld",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "bottle-raw",
       "display_name": "bottle-raw",
-      "notes": "",
+      "notes": "CPython 2.7",
       "versus": "wsgi"
       "versus": "wsgi"
     },
     },
     "nginx-uwsgi": {
     "nginx-uwsgi": {
@@ -106,12 +106,12 @@
       "framework": "bottle",
       "framework": "bottle",
       "language": "Python",
       "language": "Python",
       "orm": "Full",
       "orm": "Full",
-      "platform": "wsgi",
-      "webserver": "nginx-uWSGI",
+      "platform": "uWSGI",
+      "webserver": "nginx",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
-      "display_name": "bottle-nginx-uWSGI",
-      "notes": "",
+      "display_name": "bottle-uWSGI",
+      "notes": "CPython 2.7",
       "versus": "wsgi"
       "versus": "wsgi"
     }
     }
   }]
   }]

+ 2 - 1
config/uwsgi.ini

@@ -2,7 +2,8 @@
 master
 master
 ; Increase listen queue used for nginx connecting to uWSGI. This matches
 ; Increase listen queue used for nginx connecting to uWSGI. This matches
 ; net.ipv4.tcp_max_syn_backlog and net.core.somaxconn.
 ; net.ipv4.tcp_max_syn_backlog and net.core.somaxconn.
-listen = 65535
+; listen = 65535
+listen = 512
 ; for performance
 ; for performance
 disable-logging
 disable-logging
 ; use UNIX sockets instead of TCP loopback for performance
 ; use UNIX sockets instead of TCP loopback for performance

+ 9 - 9
django/benchmark_config

@@ -15,12 +15,12 @@
       "framework": "django",
       "framework": "django",
       "language": "Python",
       "language": "Python",
       "orm": "Full",
       "orm": "Full",
-      "platform": "wsgi",
-      "webserver": "Gunicorn",
+      "platform": "Gunicorn/Meinheld",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "django",
       "display_name": "django",
-      "notes": "",
+      "notes": "CPython 2.7",
       "versus": "wsgi"
       "versus": "wsgi"
     },
     },
     "py3": {
     "py3": {
@@ -37,12 +37,12 @@
       "framework": "django",
       "framework": "django",
       "language": "Python",
       "language": "Python",
       "orm": "Full",
       "orm": "Full",
-      "platform": "wsgi",
-      "webserver": "Gunicorn",
+      "platform": "Gunicorn/Meinheld",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "django-py3",
       "display_name": "django-py3",
-      "notes": "",
+      "notes": "CPython 3.3",
       "versus": "wsgi"
       "versus": "wsgi"
     },
     },
     "postgresql": {
     "postgresql": {
@@ -59,12 +59,12 @@
       "framework": "django",
       "framework": "django",
       "language": "Python",
       "language": "Python",
       "orm": "Full",
       "orm": "Full",
-      "platform": "wsgi",
-      "webserver": "Gunicorn",
+      "platform": "Gunicorn/Meinheld",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "django",
       "display_name": "django",
-      "notes": "",
+      "notes": "CPython 2.7",
       "versus": "wsgi"
       "versus": "wsgi"
     }
     }
   }]
   }]

+ 1 - 1
django/hello/hello/settings.py

@@ -111,7 +111,7 @@ TEMPLATE_DIRS = (
     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
     # Always use forward slashes, even on Windows.
     # Always use forward slashes, even on Windows.
     # Don't forget to use absolute paths, not relative paths.
     # Don't forget to use absolute paths, not relative paths.
-    "/home/hyoung/FrameworkBenchmarks/django/hello/templates",
+    os.path.expanduser("~/FrameworkBenchmarks/django/hello/templates"),
 )
 )
 
 
 INSTALLED_APPS = (
 INSTALLED_APPS = (

+ 2 - 2
django/hello/world/models.py

@@ -5,9 +5,9 @@ from django.db import models
 class World(models.Model):
 class World(models.Model):
   randomnumber = models.IntegerField()
   randomnumber = models.IntegerField()
   class Meta:
   class Meta:
-    db_table = 'World'
+    db_table = 'world'
 
 
 class Fortune(models.Model):
 class Fortune(models.Model):
   message = models.CharField(max_length=65535)
   message = models.CharField(max_length=65535)
   class Meta:
   class Meta:
-    db_table = 'Fortune'
+    db_table = 'fortune'

+ 1 - 1
falcon/README.md

@@ -10,7 +10,7 @@ Falcon API framework (http://falconframework.org)
 
 
 * CPython 2.7
 * CPython 2.7
 * CPython 3.3
 * CPython 3.3
-* PyPy 2.0
+* PyPy 2.2
 
 
 ### Database
 ### Database
 
 

+ 3 - 7
falcon/app.py

@@ -1,9 +1,9 @@
 #!/usr/bin/env python
 #!/usr/bin/env python
-import sys
 import json
 import json
 
 
 import falcon
 import falcon
 
 
+
 # resource endpoints
 # resource endpoints
 
 
 class JSONResource(object):
 class JSONResource(object):
@@ -20,12 +20,8 @@ class PlaintextResource(object):
 # setup
 # setup
 
 
 app = falcon.API()
 app = falcon.API()
-
-json_resource = JSONResource()
-plaintext_resource = PlaintextResource()
-
-app.add_route("/json", json_resource)
-app.add_route("/plaintext", plaintext_resource)
+app.add_route("/json", JSONResource())
+app.add_route("/plaintext", PlaintextResource())
 
 
 # entry point for debugging
 # entry point for debugging
 if __name__ == "__main__":
 if __name__ == "__main__":

+ 9 - 9
falcon/benchmark_config

@@ -12,12 +12,12 @@
       "framework": "falcon",
       "framework": "falcon",
       "language": "Python",
       "language": "Python",
       "orm": "Raw",
       "orm": "Raw",
-      "platform": "wsgi",
-      "webserver": "Gunicorn",
+      "platform": "Gunicorn/Meinheld",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "falcon",
       "display_name": "falcon",
-      "notes": "",
+      "notes": "CPython 2",
       "versus": "wsgi"
       "versus": "wsgi"
     },
     },
     "py3": {
     "py3": {
@@ -31,12 +31,12 @@
       "framework": "falcon",
       "framework": "falcon",
       "language": "Python",
       "language": "Python",
       "orm": "Raw",
       "orm": "Raw",
-      "platform": "wsgi",
-      "webserver": "Gunicorn",
+      "platform": "Gunicorn/Meinheld",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "falcon-py3",
       "display_name": "falcon-py3",
-      "notes": "",
+      "notes": "CPython 3",
       "versus": "wsgi"
       "versus": "wsgi"
     },
     },
     "pypy": {
     "pypy": {
@@ -50,12 +50,12 @@
       "framework": "falcon",
       "framework": "falcon",
       "language": "Python",
       "language": "Python",
       "orm": "Raw",
       "orm": "Raw",
-      "platform": "pypy",
-      "webserver": "Gunicorn",
+      "platform": "Gunicorn/Tornado",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "falcon-pypy",
       "display_name": "falcon-pypy",
-      "notes": "",
+      "notes": "PyPy",
       "versus": "wsgi"
       "versus": "wsgi"
     }
     }
   }]
   }]

+ 1 - 1
falcon/setup.py

@@ -1,5 +1,4 @@
 import subprocess
 import subprocess
-import setup_util
 import multiprocessing
 import multiprocessing
 import os
 import os
 
 
@@ -21,6 +20,7 @@ def start(args, logfile, errfile):
         cwd="falcon", stderr=errfile, stdout=logfile)
         cwd="falcon", stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
+
 def stop(logfile, errfile):
 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()

+ 0 - 1
falcon/setup_py3.py

@@ -1,5 +1,4 @@
 import subprocess
 import subprocess
-import setup_util
 import multiprocessing
 import multiprocessing
 import os
 import os
 
 

+ 0 - 1
falcon/setup_pypy.py

@@ -1,5 +1,4 @@
 import subprocess
 import subprocess
-import setup_util
 import multiprocessing
 import multiprocessing
 import os
 import os
 
 

+ 20 - 20
flask/benchmark_config

@@ -16,12 +16,12 @@
       "framework": "flask",
       "framework": "flask",
       "language": "Python",
       "language": "Python",
       "orm": "Full",
       "orm": "Full",
-      "platform": "wsgi",
-      "webserver": "Meinheld",
+      "platform": "Gunicorn/Meinheld",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "flask",
       "display_name": "flask",
-      "notes": "",
+      "notes": "CPython 2.7",
       "versus": "wsgi"
       "versus": "wsgi"
     },
     },
     "mysql-raw": {
     "mysql-raw": {
@@ -37,12 +37,12 @@
       "framework": "flask",
       "framework": "flask",
       "language": "Python",
       "language": "Python",
       "orm": "Raw",
       "orm": "Raw",
-      "platform": "wsgi",
-      "webserver": "Meinheld",
+      "platform": "Gunicorn/Meinheld",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
-      "display_name": "flask",
-      "notes": "",
+      "display_name": "flask-raw",
+      "notes": "CPython 2.7",
       "versus": "wsgi"
       "versus": "wsgi"
     },
     },
     "py3": {
     "py3": {
@@ -60,12 +60,12 @@
       "framework": "flask",
       "framework": "flask",
       "language": "Python",
       "language": "Python",
       "orm": "Full",
       "orm": "Full",
-      "platform": "wsgi",
-      "webserver": "Meinheld",
+      "platform": "Gunicorn/Meinheld",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "flask-py3",
       "display_name": "flask-py3",
-      "notes": "",
+      "notes": "CPython 3.3",
       "versus": "wsgi"
       "versus": "wsgi"
     },
     },
     "pypy": {
     "pypy": {
@@ -83,12 +83,12 @@
       "framework": "flask",
       "framework": "flask",
       "language": "Python",
       "language": "Python",
       "orm": "Full",
       "orm": "Full",
-      "platform": "pypy",
-      "webserver": "Tornado",
+      "platform": "Gunicorn/Tornado",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "flask-pypy",
       "display_name": "flask-pypy",
-      "notes": "",
+      "notes": "PyPy 2.2",
       "versus": "wsgi"
       "versus": "wsgi"
     },
     },
     "pypy-mysql-raw": {
     "pypy-mysql-raw": {
@@ -104,12 +104,12 @@
       "framework": "flask",
       "framework": "flask",
       "language": "Python",
       "language": "Python",
       "orm": "Raw",
       "orm": "Raw",
-      "platform": "pypy",
-      "webserver": "Tornado",
+      "platform": "Gunicorn/Tornado",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
-      "display_name": "flask-pypy",
-      "notes": "",
+      "display_name": "flask-pypy-raw",
+      "notes": "PyPy 2.2",
       "versus": "wsgi"
       "versus": "wsgi"
     },
     },
     "nginx-uwsgi": {
     "nginx-uwsgi": {
@@ -127,12 +127,12 @@
       "framework": "flask",
       "framework": "flask",
       "language": "Python",
       "language": "Python",
       "orm": "Full",
       "orm": "Full",
-      "platform": "wsgi",
-      "webserver": "nginx-uWSGI",
+      "platform": "uWSGI",
+      "webserver": "nginx",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "flask-nginx-uWSGI",
       "display_name": "flask-nginx-uWSGI",
-      "notes": "",
+      "notes": "CPython 2.7",
       "versus": "wsgi"
       "versus": "wsgi"
     }
     }
   }]
   }]

+ 1 - 4
flask/setup.py

@@ -6,13 +6,10 @@ import os
 bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py2/bin')
 bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py2/bin')
 NCPU = multiprocessing.cpu_count()
 NCPU = multiprocessing.cpu_count()
 
 
-proc = None
-
 
 
 def start(args, logfile, errfile):
 def start(args, logfile, errfile):
-    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([
+    subprocess.Popen([
         bin_dir + "/gunicorn",
         bin_dir + "/gunicorn",
         "app:app",
         "app:app",
         "-k", "meinheld.gmeinheld.MeinheldWorker",
         "-k", "meinheld.gmeinheld.MeinheldWorker",

+ 0 - 2
flask/setup_py3.py

@@ -6,8 +6,6 @@ import os
 bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py3/bin')
 bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py3/bin')
 NCPU = multiprocessing.cpu_count()
 NCPU = multiprocessing.cpu_count()
 
 
-proc = None
-
 
 
 def start(args, logfile, errfile):
 def start(args, logfile, errfile):
     global proc
     global proc

+ 22 - 20
toolset/setup/linux/installer.py

@@ -43,6 +43,7 @@ class Installer:
     self.__run_command("cat ../config/benchmark_profile >> ../../.bashrc")
     self.__run_command("cat ../config/benchmark_profile >> ../../.bashrc")
     self.__run_command("source ../../.profile")
     self.__run_command("source ../../.profile")
     self.__run_command("sudo sh -c \"echo '*               -    nofile          65535' >> /etc/security/limits.conf\"")
     self.__run_command("sudo sh -c \"echo '*               -    nofile          65535' >> /etc/security/limits.conf\"")
+    self.__run_command("sudo sysctl -w net.core.somaxconn=1024")
 
 
     ##############################################################
     ##############################################################
     # System Tools
     # System Tools
@@ -316,17 +317,17 @@ class Installer:
       if three: self.__run_command(python3_bin + cmd, retry=True)
       if three: self.__run_command(python3_bin + cmd, retry=True)
       if pypy:  self.__run_command(pypy_bin + cmd, retry=True)
       if pypy:  self.__run_command(pypy_bin + cmd, retry=True)
 
 
-    self.__download("http://bitbucket.org/pypy/pypy/downloads/pypy-2.1-linux64.tar.bz2")
-    self.__run_command("tar xjf pypy-2.1-linux64.tar.bz2")
-    self.__run_command('ln -sf pypy-2.1 pypy')
-    self.__download("http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz")
-    self.__run_command("tar xzf Python-2.7.5.tgz")
+    self.__download("https://bitbucket.org/pypy/pypy/downloads/pypy-2.2-linux64.tar.bz2")
+    self.__run_command("tar xjf pypy-2.2-linux64.tar.bz2")
+    self.__run_command('ln -sf pypy-2.2-linux64 pypy')
+    self.__download("http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz")
+    self.__run_command("tar xzf Python-2.7.6.tgz")
     self.__download("http://www.python.org/ftp/python/3.3.2/Python-3.3.2.tar.xz")
     self.__download("http://www.python.org/ftp/python/3.3.2/Python-3.3.2.tar.xz")
     self.__run_command("tar xJf Python-3.3.2.tar.xz")
     self.__run_command("tar xJf Python-3.3.2.tar.xz")
-    self.__run_command("./configure --prefix=$HOME/FrameworkBenchmarks/installs/py2 --disable-shared CC=gcc-4.8", cwd="Python-2.7.5")
+    self.__run_command("./configure --prefix=$HOME/FrameworkBenchmarks/installs/py2 --disable-shared CC=gcc-4.8", cwd="Python-2.7.6")
     self.__run_command("./configure --prefix=$HOME/FrameworkBenchmarks/installs/py3 --disable-shared CC=gcc-4.8", cwd="Python-3.3.2")
     self.__run_command("./configure --prefix=$HOME/FrameworkBenchmarks/installs/py3 --disable-shared CC=gcc-4.8", cwd="Python-3.3.2")
-    self.__run_command("make -j2", cwd="Python-2.7.5")
-    self.__run_command("make install", cwd="Python-2.7.5")
+    self.__run_command("make -j2", cwd="Python-2.7.6")
+    self.__run_command("make install", cwd="Python-2.7.6")
     self.__run_command("make -j2", cwd="Python-3.3.2")
     self.__run_command("make -j2", cwd="Python-3.3.2")
     self.__run_command("make install", cwd="Python-3.3.2")
     self.__run_command("make install", cwd="Python-3.3.2")
 
 
@@ -338,33 +339,34 @@ class Installer:
     easy_install('pip==1.4.1', two=True, three=True, pypy=True)
     easy_install('pip==1.4.1', two=True, three=True, pypy=True)
     easy_install('MySQL-python==1.2.4', two=True, three=False, pypy=True)
     easy_install('MySQL-python==1.2.4', two=True, three=False, pypy=True)
     easy_install('https://github.com/clelland/MySQL-for-Python-3/archive/master.zip', two=False, three=True, pypy=False)
     easy_install('https://github.com/clelland/MySQL-for-Python-3/archive/master.zip', two=False, three=True, pypy=False)
-    easy_install('PyMySQL==0.5', pypy=True)
-    easy_install('PyMySQL3==0.5', two=False, three=True)
+    easy_install('PyMySQL==0.6.1', two=True, three=True, pypy=True)
     easy_install('psycopg2==2.5.1', three=True)
     easy_install('psycopg2==2.5.1', three=True)
 
 
-    easy_install('simplejson==3.3.0', two=True, three=True, pypy=False)
+    easy_install('simplejson==3.3.1', two=True, three=True, pypy=False)
     easy_install('ujson==1.33', three=True)
     easy_install('ujson==1.33', three=True)
-    easy_install('https://github.com/downloads/surfly/gevent/gevent-1.0rc2.tar.gz', three=True)
+    easy_install('https://github.com/surfly/gevent/releases/download/1.0rc3/gevent-1.0rc3.tar.gz', three=False)
     easy_install('uwsgi', three=True)  # uwsgi is released too often to stick on single version.
     easy_install('uwsgi', three=True)  # uwsgi is released too often to stick on single version.
 
 
     # Gunicorn
     # Gunicorn
-    easy_install('gunicorn==17.5', two=True, three=True, pypy=True)
+    easy_install('gunicorn==18', two=True, three=True, pypy=True)
     # meinheld HEAD supports gunicorn worker on Python 3
     # meinheld HEAD supports gunicorn worker on Python 3
     easy_install('https://github.com/mopemope/meinheld/archive/master.zip', two=True, three=True, pypy=True)
     easy_install('https://github.com/mopemope/meinheld/archive/master.zip', two=True, three=True, pypy=True)
 
 
     # Tornado
     # Tornado
     easy_install('tornado==3.1', two=True, three=True, pypy=True)
     easy_install('tornado==3.1', two=True, three=True, pypy=True)
-    easy_install('motor==0.1.1', two=True, three=True, pypy=True)
+    easy_install('motor==0.1.2', two=True, three=True, pypy=True)
     easy_install('pymongo==2.5.2', two=True, three=True, pypy=True)
     easy_install('pymongo==2.5.2', two=True, three=True, pypy=True)
 
 
     # Django
     # Django
-    easy_install("https://www.djangoproject.com/download/1.6b2/tarball/", two=True, three=True, pypy=True)
+    easy_install("https://www.djangoproject.com/download/1.6/tarball/", two=True, three=True, pypy=True)
 
 
     # Flask
     # Flask
-    easy_install('Werkzeug==0.9.3', two=True, three=True, pypy=True)
+    easy_install('Werkzeug==0.9.4', two=True, three=True, pypy=True)
     easy_install('flask==0.10.1', two=True, three=True, pypy=True)
     easy_install('flask==0.10.1', two=True, three=True, pypy=True)
-    easy_install('sqlalchemy==0.8.2', two=True, three=True, pypy=True)
-    easy_install('Jinja2==2.7', two=True, three=True, pypy=True)
+    easy_install('sqlalchemy==0.8.3', two=True, three=False, pypy=True)
+    # SQLAlchemy 0.9 supports C extension for Python 3
+    easy_install('https://bitbucket.org/zzzeek/sqlalchemy/downloads/SQLAlchemy-0.9.0b1.tar.gz', two=False, three=True)
+    easy_install('Jinja2==2.7.1', two=True, three=True, pypy=True)
     easy_install('Flask-SQLAlchemy==1.0', two=True, three=True, pypy=True)
     easy_install('Flask-SQLAlchemy==1.0', two=True, three=True, pypy=True)
 
 
     # Bottle
     # Bottle
@@ -372,8 +374,8 @@ class Installer:
     easy_install('bottle-sqlalchemy==0.4', two=True, three=True, pypy=True)
     easy_install('bottle-sqlalchemy==0.4', two=True, three=True, pypy=True)
 
 
     # Falcon
     # Falcon
-    easy_install('Cython==0.19.1', two=True, three=True, pypy=True)
-    easy_install('falcon==0.1.6post3', two=True, three=True, pypy=True)
+    easy_install('Cython==0.19.2', two=True, three=True, pypy=True)
+    easy_install('falcon==0.1.7', two=True, three=True, pypy=True)
 
 
   ############################################################
   ############################################################
   # __install_error
   # __install_error

+ 13 - 9
tornado/benchmark_config

@@ -4,11 +4,13 @@
     "default": {
     "default": {
       "setup_file": "setup",
       "setup_file": "setup",
       "json_url": "/json",
       "json_url": "/json",
+      "db_url": "/db",
+      "query_url": "/db?queries=",
       "plaintext_url": "/plaintext",
       "plaintext_url": "/plaintext",
       "port": 8080,
       "port": 8080,
       "approach": "Realistic",
       "approach": "Realistic",
       "classification": "Platform",
       "classification": "Platform",
-      "database": "None",
+      "database": "MongoDB",
       "framework": "tornado",
       "framework": "tornado",
       "language": "Python",
       "language": "Python",
       "orm": "Raw",
       "orm": "Raw",
@@ -17,13 +19,15 @@
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "tornado",
       "display_name": "tornado",
-      "notes": "",
+      "notes": "CPython 2.7",
       "versus": ""
       "versus": ""
     },
     },
-    "raw": {
-      "setup_file": "setup",
+    "py3": {
+      "setup_file": "setup_py3",
+      "json_url": "/json",
       "db_url": "/db",
       "db_url": "/db",
       "query_url": "/db?queries=",
       "query_url": "/db?queries=",
+      "plaintext_url": "/plaintext",
       "port": 8080,
       "port": 8080,
       "approach": "Realistic",
       "approach": "Realistic",
       "classification": "Platform",
       "classification": "Platform",
@@ -35,11 +39,11 @@
       "webserver": "None",
       "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
-      "display_name": "tornado",
-      "notes": "",
+      "display_name": "tornado-py3",
+      "notes": "CPython 3.3",
       "versus": ""
       "versus": ""
     },
     },
-    "pypy-raw": {
+    "pypy": {
       "setup_file": "setup_pypy",
       "setup_file": "setup_pypy",
       "json_url": "/json",
       "json_url": "/json",
       "db_url": "/db",
       "db_url": "/db",
@@ -52,12 +56,12 @@
       "framework": "tornado",
       "framework": "tornado",
       "language": "Python",
       "language": "Python",
       "orm": "Raw",
       "orm": "Raw",
-      "platform": "pypy",
+      "platform": "Tornado",
       "webserver": "None",
       "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "tornado-pypy",
       "display_name": "tornado-pypy",
-      "notes": "",
+      "notes": "PyPy 2.2",
       "versus": ""
       "versus": ""
     }
     }
   }]
   }]

+ 5 - 1
tornado/server.py

@@ -9,7 +9,11 @@ import tornado.options
 from tornado.options import options
 from tornado.options import options
 import tornado.httpserver
 import tornado.httpserver
 
 
+if sys.version_info[0] == 3:
+    xrange = range
+
 tornado.options.define('port', default=8888, type=int, help="Server port")
 tornado.options.define('port', default=8888, type=int, help="Server port")
+tornado.options.define('mongo', default='localhost', type=str, help="MongoDB host")
 
 
 
 
 class BaseHandler(tornado.web.RequestHandler):
 class BaseHandler(tornado.web.RequestHandler):
@@ -61,5 +65,5 @@ if __name__ == "__main__":
     server = tornado.httpserver.HTTPServer(application)
     server = tornado.httpserver.HTTPServer(application)
     server.bind(options.port)
     server.bind(options.port)
     server.start(0)
     server.start(0)
-    db = motor.MotorClient("localhost").open_sync().hello_world
+    db = motor.MotorClient(options.mongo).open_sync().hello_world
     tornado.ioloop.IOLoop.instance().start()
     tornado.ioloop.IOLoop.instance().start()

+ 17 - 12
tornado/setup.py

@@ -1,25 +1,30 @@
-import subprocess
-import setup_util
 from os.path import expanduser
 from os.path import expanduser
 from os import kill
 from os import kill
+import subprocess
+import sys
+import time
+
 
 
 python = expanduser('~/FrameworkBenchmarks/installs/py2/bin/python')
 python = expanduser('~/FrameworkBenchmarks/installs/py2/bin/python')
 cwd = expanduser('~/FrameworkBenchmarks/tornado')
 cwd = expanduser('~/FrameworkBenchmarks/tornado')
 
 
-def start(args, logfile, errfile):
-    setup_util.replace_text(
-        cwd + "/server.py", "localhost", args.database_host)
 
 
+def start(args, logfile, errfile):
     subprocess.Popen(
     subprocess.Popen(
-        python + " server.py --port=8080 --logging=error",
+        python + " server.py --port=8080 --mongo=%s --logging=error" % (args.database_host,),
         shell=True, cwd=cwd, stderr=errfile, stdout=logfile)
         shell=True, cwd=cwd, stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile, errfile):
 def stop(logfile, errfile):
-    p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
-    out, err = p.communicate()
-    for line in out.splitlines():
-      if 'FrameworkBenchmarks/installs/py2/bin/python server.py --port=8080 --logging=error' in line:
-        pid = int(line.split(None,2)[1])
-        kill(pid, 9)
+    for line in subprocess.check_output(["ps", "aux"]).splitlines():
+        if 'server.py --port=8080' in line:
+            pid = int(line.split(None,2)[1])
+            kill(pid, 9)
     return 0
     return 0
+
+if __name__ == '__main__':
+    class DummyArg:
+        database_host = 'localhost'
+    start(DummyArg(), sys.stderr, sys.stderr)
+    time.sleep(1)
+    stop(sys.stderr, sys.stderr)

+ 19 - 14
tornado/setup_py3.py

@@ -1,25 +1,30 @@
-import subprocess
-import setup_util
 from os.path import expanduser
 from os.path import expanduser
+from os import kill
+import subprocess
+import sys
+import time
+
 
 
-python = expanduser('~/FrameworkBenchmarks/installs/py3/bin/python')
+python = expanduser('~/FrameworkBenchmarks/installs/py3/bin/python3')
 cwd = expanduser('~/FrameworkBenchmarks/tornado')
 cwd = expanduser('~/FrameworkBenchmarks/tornado')
-proc = None
 
 
 
 
 def start(args, logfile, errfile):
 def start(args, logfile, errfile):
-    global proc
-    setup_util.replace_text(
-        cwd + "/server.py", "localhost", args.database_host)
-
-    proc = subprocess.Popen(
-        python + " server.py --port=8080 --logging=error",
+    subprocess.Popen(
+        python + " server.py --port=8080 --mongo=%s --logging=error" % (args.database_host,),
         shell=True, cwd=cwd, stderr=errfile, stdout=logfile)
         shell=True, cwd=cwd, stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile, errfile):
 def stop(logfile, errfile):
-    global proc
-    if proc:
-        proc.terminate()
-        proc = None
+    for line in subprocess.check_output(["ps", "aux"]).splitlines():
+        if 'server.py --port=8080' in line:
+            pid = int(line.split(None,2)[1])
+            kill(pid, 9)
     return 0
     return 0
+
+if __name__ == '__main__':
+    class DummyArg:
+        database_host = 'localhost'
+    start(DummyArg(), sys.stderr, sys.stderr)
+    time.sleep(1)
+    stop(sys.stderr, sys.stderr)

+ 19 - 14
tornado/setup_pypy.py

@@ -1,25 +1,30 @@
-import subprocess
-import setup_util
 from os.path import expanduser
 from os.path import expanduser
+from os import kill
+import subprocess
+import sys
+import time
+
 
 
-python = expanduser('~/FrameworkBenchmarks/installs/pypy/bin/python')
+python = expanduser('~/FrameworkBenchmarks/installs/pypy/bin/pypy')
 cwd = expanduser('~/FrameworkBenchmarks/tornado')
 cwd = expanduser('~/FrameworkBenchmarks/tornado')
-proc = None
 
 
 
 
 def start(args, logfile, errfile):
 def start(args, logfile, errfile):
-    global proc
-    setup_util.replace_text(
-        cwd + "/server.py", "localhost", args.database_host)
-
-    proc = subprocess.Popen(
-        python + " server.py --port=8080 --logging=error",
+    subprocess.Popen(
+        python + " server.py --port=8080 --mongo=%s --logging=error" % (args.database_host,),
         shell=True, cwd=cwd, stderr=errfile, stdout=logfile)
         shell=True, cwd=cwd, stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile, errfile):
 def stop(logfile, errfile):
-    global proc
-    if proc:
-        proc.terminate()
-        proc = None
+    for line in subprocess.check_output(["ps", "aux"]).splitlines():
+        if 'server.py --port=8080' in line:
+            pid = int(line.split(None,2)[1])
+            kill(pid, 9)
     return 0
     return 0
+
+if __name__ == '__main__':
+    class DummyArg:
+        database_host = 'localhost'
+    start(DummyArg(), sys.stderr, sys.stderr)
+    time.sleep(1)
+    stop(sys.stderr, sys.stderr)

+ 4 - 4
wsgi/benchmark_config

@@ -12,8 +12,8 @@
       "framework": "wsgi",
       "framework": "wsgi",
       "language": "Python",
       "language": "Python",
       "orm": "Raw",
       "orm": "Raw",
-      "platform": "wsgi",
-      "webserver": "Gunicorn",
+      "platform": "Gunicorn/Meinheld",
+      "webserver": "None",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "wsgi",
       "display_name": "wsgi",
@@ -31,8 +31,8 @@
       "framework": "wsgi",
       "framework": "wsgi",
       "language": "Python",
       "language": "Python",
       "orm": "Raw",
       "orm": "Raw",
-      "platform": "wsgi",
-      "webserver": "nginx-uWSGI",
+      "platform": "uWSGI",
+      "webserver": "nginx",
       "os": "Linux",
       "os": "Linux",
       "database_os": "Linux",
       "database_os": "Linux",
       "display_name": "wsgi-nginx-uWSGI",
       "display_name": "wsgi-nginx-uWSGI",

+ 1 - 1
wsgi/setup.py

@@ -21,7 +21,7 @@ def start(args, logfile, errfile):
         cwd="wsgi", stderr=errfile, stdout=logfile)
         cwd="wsgi", stderr=errfile, stdout=logfile)
     return 0
     return 0
 
 
-def stop(logfile):
+def stop(logfile, errfile):
     global proc
     global proc
     if proc is None:
     if proc is None:
         return 0
         return 0