profile • AI Agents Framework
profile: Decorator to profile a function.
profile
Function
</div>
This function is defined in the profiler module.
Decorator to profile a function.
Signature
def profile(func: Optional[Callable]) -> AnyParameters
ParamField
Optional[Callable]No description available.
Returns
ResponseField
AnyThe result of the operation.
Usage
@profile
def my_function():
pass
@profile(category="api")
def api_call():
passUses
Profiler.is_enabledfntime.timeProfiler.record_timingProfiler.record_flowfunctools.wrapsdecorator
Source
View on GitHubpraisonai/profiler.py at line 986