Skip to main content

profile_lines

Function
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]) -> Any

Parameters

func
Optional
No description available.

Returns

Returns
Any
The result of the operation.

Usage

@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 1110