Skip to content

Commit 5a18d50

Browse files
committed
Disable slow websocket performance tests by default.
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
1 parent bc28966 commit 5a18d50

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

maint/test/websocket/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
define('cases', type=str, multiple=True,
1212
default=["*"])
1313
define('exclude', type=str, multiple=True,
14-
default=[])
14+
default=["9.*"])
1515

1616
if __name__ == '__main__':
1717
parse_command_line()

maint/test/websocket/run.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# python2 and python3. Output goes in ./reports/servers/index.html.
55
#
66
# The --cases and --exclude arguments can be used to run only part of
7-
# the suite. --exclude="9.*" is useful to skip the relatively slow
8-
# performance tests.
7+
# the suite. The default is --exclude="9.*" to skip the relatively slow
8+
# performance tests; pass --exclude="" to override and include them.
99

1010
set -e
1111

@@ -21,13 +21,17 @@ PY27_SERVER_PID=$!
2121
.tox/py32/bin/python server.py --port=9003 &
2222
PY32_SERVER_PID=$!
2323

24+
.tox/pypy/bin/python server.py --port=9004 &
25+
PYPY_SERVER_PID=$!
26+
2427
sleep 1
2528

26-
.tox/py27/bin/python ./client.py --servers=Tornado/py25=ws://localhost:9001,Tornado/py27=ws://localhost:9002,Tornado/py32=ws://localhost:9003 "$@"
29+
.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
2730

2831
kill $PY25_SERVER_PID
2932
kill $PY27_SERVER_PID
3033
kill $PY32_SERVER_PID
34+
kill $PYPY_SERVER_PID
3135
wait
3236

3337
echo "Tests complete. Output is in ./reports/servers/index.html"

maint/test/websocket/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ def on_message(self, message):
1717
app = Application([
1818
('/', EchoHandler),
1919
])
20-
app.listen(options.port, address='localhost')
20+
app.listen(options.port, address='127.0.0.1')
2121
IOLoop.instance().start()

maint/test/websocket/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# to install autobahn and deal with 2to3 for the python3 version.
33
# See run.sh for the real test runner.
44
[tox]
5-
envlist = py27, py32, py25
5+
envlist = py27, py32, py25, pypy
66
setupdir=../../..
77

88
[testenv]

0 commit comments

Comments
 (0)