Closed methane closed 2 years ago
I tested the example on my Fedora 35 with Python 3.10. I get:
async_sleep: Mean +- std dev: 1.32 ms +- 0.02 ms
That's interesting :-) Using await asyncio.sleep(1e-6)
, I get:
async_sleep: Mean +- std dev: 13.0 us +- 0.6 us
Oh, sadly asyncio.run()
doesn't exist in Python 3.6. Is it possible to reimplement asyncio.run()
in pyperf on Python 3.6?
pyperf currently still supports Python 3.6: https://pyperf.readthedocs.io/en/latest/run_benchmark.html#install-pyperf
With the proposed implementation (measure time inside asyncio.run and not outside), I agree that the implementation increases the accuracy and so it's worth it to add a new method ;-)
I completed the changelog in commit 0814a4af62646b00cb2908db67f873c5910dd913.
This change is now part of the just released pyperf 2.3.1.
Ref #121.