spdl.utils.tracing

tracing(output: int | str, buffer_size: int = 4096, process_name: str | None = None, enable: bool = True)[source]

Enable tracing.

Parameters:
  • output – The path to the trace file or file descriptor.

  • buffer_size – The size of the trace file write buffer in kilo-byte.

  • process_name – The name of the tracing process.

  • enable – Whether to enable tracing.

Example

>>> with tracing("/tmp/trace.pftrace"):
>>>     do_operations()