Async Timeit

Replica of default python timeit module with small changes to allow async functions and await keyword.

All CLI options should work as same from the original module.
Taken from this exact commit.

Example usage

$python -n 5 -r 5 -s "import asyncio" 'await asyncio.sleep(2)'
5 loops, best of 5: 2 sec per loop


This is not extensively tested. Also unsure if timeit can be reliably used for async code.


All original python library code is under PSF’s original license.
Any of my contributions are under Apache 2.0


View Github