-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
The documentation says you can use the fixture like this:
benchmark(sum, data) # Only the `sum` function is measured
But, there's no mention of how you might benchmark an async function. Can this be done, or added in an upcoming release?
I guess I'd expect to be able to do something along the lines of one of these:
await benchmark(async_func)
await benchmark(async_func())
await benchmark.async(async_func)
(I imagine if you went for the second version, it'd be a simple task of checking inspect.isawaitable() and then returning an async wrapped benchmark).
edgarrmondragon
Metadata
Metadata
Assignees
Labels
No labels