dask-benchmarks
dask-benchmarks copied to clipboard
How to support asynchronous functions?
Much of the distributed codebase should probably be tested with async def functions. Does anyone have experience here? A quick web search doesn't list much.
I think Antoine's setup in https://github.com/dask/dask-benchmarks/blob/master/distributed/benchmarks/comm.py#L16 may work. The function to be timed is a normal callable
def time_tcp_connect(self):
self._time_connect('tcp://127.0.0.1')
which calls a callable that calls run_sync
def _time_connect(self, address):
run_sync(self.loop, partial(self._main, address))