Profile Lines • AI Agents Framework
profile_lines: Decorator for line-level profiling.
profile_lines
Function
</div>
This function is defined in the profiler module.
Decorator for line-level profiling.
Note: Requires line_profiler package for full functionality. Falls back to basic timing if not available.
Signature
def profile_lines(func: Optional[Callable]) -> AnyParameters
ParamField
Optional[Callable]No description available.
Returns
ResponseField
AnyThe result of the operation.
Usage
@profile_lines
def my_function():
passUses
Profiler.is_enabledfnLineProfilerlp.add_functionlp.enablelp.disableio.StringIOlp.print_statsProfiler.set_line_profile_datas.getvalue
Source
View on GitHubpraisonai/profiler.py at line 1241