fn_benchmarks
async_benchmark(description='Unnamed async function timer')
async
Time an asynchronous operation.
Run an async function/operation with this context manager to time function execution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
description |
str
|
A string that prints while the benchmark is running. This can be a message to the user, like |
'Unnamed async function timer'
|
Usage:
Source code in src/red_utils/std/context_managers/benchmarks/fn_benchmarks.py
benchmark(description='Unnamed function timer')
Time an operation.
Run an operation with this context manager (with benchmark("time some function"):) to time function execution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
description |
str
|
A string that prints while the benchmark is running. This can be a message to the user, like |
'Unnamed function timer'
|
Usage: