FuncProfiler Functions
Available functions:
function_profile(export_format: Optional[str] = None, filename: Optional[str] = None, shared_log: bool = False, enabled: bool = True, log_level: Optional[str]): Decorator factory to profile the execution time and memory usage of a function with optional data export and shared logging.line_by_line_profile(export_format: Optional[str] = None, filename: Optional[str] = None, shared_log: bool = False, enabled: bool = True, log_level: Optional[str]): Decorator for line-by-line profiling of a function with optional data export and shared logging.
Function profile
Decorator factory to profile the execution time and memory usage of a function with optional data export and shared logging.
Args:
export_format (Optional[str]): The format to export the profiling data ('txt', 'json', 'csv', 'html', 'xml', 'md').
filename (Optional[str]): The name of the output file (without extension).
shared_log (Optional[bool]): If True, log to a shared file for all profiled functions.
enabled (bool): If False, the decorator will not perform any profiling.
log_level (str): The logging level ("info" or "debug").
Returns:
Callable: The profiling wrapper or decorator function.Available values for Function profile:
export_format:json,txt,csv,html,xml,md(str)filename: any (str)shared_log:True/False(Boolean)enabled:True/False(Boolean)log_level:info,debug(str)
If no () was passed along with the decorator, you will receive a missing required positional parameter func error from Python.
Line-by-line profile
Decorator for line-by-line profiling of a function with optional data export and shared logging.
Available values for Line-by-line profile:
export_format:json,csv,html,xml,md(str)filename: any (str)shared_log:True/False(Boolean)enabled:True/False(Boolean)log_level:info,debug(str)
If no () was passed along with the decorator, you will receive a missing required positional parameter func error from Python.
Last updated
Was this helpful?