block • AI Agents Framework

block: Context manager for profiling a block of code.

block

Method

</div>

This is a method of the Profiler class in the profiler module.

Context manager for profiling a block of code.

Signature

python
def block(name: str, category: str) -> Any

Parameters

ParamField str

No description available.

ParamField str

No description available.

Returns

ResponseField Any

The result of the operation.

Uses

  • time.time
  • cls.record_timing
  • cls.record_flow

Source

View on GitHub

praisonai/profiler.py at line 337