Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add uvloop benchmark #79

Merged
merged 1 commit into from
Nov 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion benchmarks/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import threading
import time
import zmq
import uvloop

from scipy.stats import norm, tmean, tvar, tstd
from numpy import array, arange
Expand Down Expand Up @@ -154,10 +155,20 @@ def connection_lost(self, exc):
self.on_close.set_result(exc)


def test_core_aiozmq_uvloop(count):
"""core aiozmq with uvloop"""
loop = uvloop.new_event_loop()
return _test_core_aiozmq(count, loop)


def test_core_aiozmq_loopless(count):
"""core aiozmq loopless"""
print('.', end='', flush=True)
loop = asyncio.new_event_loop()
return _test_core_aiozmq(count, loop)


def _test_core_aiozmq(count, loop):
print('.', end='', flush=True)

@asyncio.coroutine
def go():
Expand Down Expand Up @@ -273,6 +284,7 @@ def go():
avail_tests = {f.__name__: f for f in [test_raw_zmq, test_zmq_with_poller,
test_aiozmq_rpc,
test_core_aiozmq_legacy,
test_core_aiozmq_uvloop,
test_core_aiozmq_loopless,
test_zmq_with_thread]}

Expand Down
1 change: 1 addition & 0 deletions requirements-bench.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
matplotlib==1.5.3
scipy>=0.13.3
numpy>=1.8.1
uvloop>=0.5.4
-r requirements.txt