]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Disable slow websocket performance tests by default.
authorBen Darnell <ben@bendarnell.com>
Sun, 22 Jan 2012 01:12:22 +0000 (17:12 -0800)
committerBen Darnell <ben@bendarnell.com>
Sun, 22 Jan 2012 01:12:22 +0000 (17:12 -0800)
Add pypy to the mix for when we do run the perf tests.  Depending on
the benchmark pypy is ~twice as fast as cpython 2.7

maint/test/websocket/client.py
maint/test/websocket/run.sh
maint/test/websocket/server.py
maint/test/websocket/tox.ini

index f549b218f0c093fdb549410b85ada0edb97e5e02..1679887942bfcd4bbfb620b41bb8b0c2e0f439f2 100644 (file)
@@ -11,7 +11,7 @@ define('servers', type=str, multiple=True,
 define('cases', type=str, multiple=True,
        default=["*"])
 define('exclude', type=str, multiple=True,
-       default=[])
+       default=["9.*"])
 
 if __name__ == '__main__':
    parse_command_line()
index d11870152b3a7860539ac15286e74bd492764112..9478687d47b628bdec1795ea36d0ed98f4d9d827 100755 (executable)
@@ -4,8 +4,8 @@
 # python2 and python3.  Output goes in ./reports/servers/index.html.
 #
 # The --cases and --exclude arguments can be used to run only part of
-# the suite.  --exclude="9.*" is useful to skip the relatively slow
-# performance tests.
+# the suite.  The default is --exclude="9.*" to skip the relatively slow
+# performance tests; pass --exclude="" to override and include them.
 
 set -e
 
@@ -21,13 +21,17 @@ PY27_SERVER_PID=$!
 .tox/py32/bin/python server.py --port=9003 &
 PY32_SERVER_PID=$!
 
+.tox/pypy/bin/python server.py --port=9004 &
+PYPY_SERVER_PID=$!
+
 sleep 1
 
-.tox/py27/bin/python ./client.py --servers=Tornado/py25=ws://localhost:9001,Tornado/py27=ws://localhost:9002,Tornado/py32=ws://localhost:9003 "$@"
+.tox/py27/bin/python ./client.py --servers=Tornado/py25=ws://localhost:9001,Tornado/py27=ws://localhost:9002,Tornado/py32=ws://localhost:9003,Tornado/pypy=ws://localhost:9004 "$@" || true
 
 kill $PY25_SERVER_PID
 kill $PY27_SERVER_PID
 kill $PY32_SERVER_PID
+kill $PYPY_SERVER_PID
 wait
 
 echo "Tests complete. Output is in ./reports/servers/index.html"
\ No newline at end of file
index 83e2da61911dbd7047d1519c86cf083dda068ccb..b44056cd63151e2463ab3c4a4fd2535517fe43da 100644 (file)
@@ -17,5 +17,5 @@ if __name__ == '__main__':
     app = Application([
             ('/', EchoHandler),
             ])
-    app.listen(options.port, address='localhost')
+    app.listen(options.port, address='127.0.0.1')
     IOLoop.instance().start()
index 7b374a48be66b08bdad5f30ee87cd4a18283cca4..0709749fab7950d50b58ec1d9b12a1d5584b1fe3 100644 (file)
@@ -2,7 +2,7 @@
 # to install autobahn and deal with 2to3 for the python3 version.
 # See run.sh for the real test runner.
 [tox]
-envlist = py27, py32, py25
+envlist = py27, py32, py25, pypy
 setupdir=../../..
 
 [testenv]