Profile API Async • AI Agents Framework

profile_api_async: Decorator to profile an async function as an API call.

profile_api_async

Function

</div>

This function is defined in the profiler module.

Decorator to profile an async function as an API call.

Signature

python
def profile_api_async(func: Optional[Callable]) -> Any

Parameters

ParamField Optional[Callable]

No description available.

Returns

ResponseField Any

The result of the operation.

Uses

  • Profiler.is_enabled
  • fn
  • time.perf_counter
  • Profiler.record_api_call
  • functools.wraps
  • decorator

Source

View on GitHub

praisonai/profiler.py at line 1175


Related Documentation