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

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

Parameters

ParamField Optional[Callable]

No description available.

Returns

ResponseField Any

The result of the operation.

Usage

python
@profile_lines
    def my_function():
        pass

Uses

  • Profiler.is_enabled
  • fn
  • LineProfiler
  • lp.add_function
  • lp.enable
  • lp.disable
  • io.StringIO
  • lp.print_stats
  • Profiler.set_line_profile_data
  • s.getvalue

Source

View on GitHub

praisonai/profiler.py at line 1241


Related Documentation