bundle.testing.tools.decorators.cprofile¶
Attributes¶
Classes¶
Context manager that profiles an async function execution, |
Functions¶
|
|
|
|
|
Module Contents¶
- bundle.testing.tools.decorators.cprofile.log¶
- class bundle.testing.tools.decorators.cprofile.ProfileContext(expected_duration: int, performance_threshold: int, cprofile_folder: pathlib.Path | None, func_name: str, result_identifier: collections.abc.Callable[[Any], str])[source]¶
Context manager that profiles an async function execution, logs execution time, dumps stats, and warns if performance thresholds are exceeded.
- expected_duration¶
- performance_threshold¶
- cprofile_folder¶
- func_name¶
- result_identifier¶
- profiler¶
- result: Any = None¶
- bundle.testing.tools.decorators.cprofile.cprofile(expected_duration: int = EXPECTED_DURATION_NS, performance_threshold: int = PERFORMANCE_THRESHOLD_NS, cprofile_folder: pathlib.Path | None = None) collections.abc.Callable[[collections.abc.Callable[Ellipsis, Any]], collections.abc.Callable[Ellipsis, Any]][source]¶