spdl.utils.trace_event

trace_event(name: str)[source]

Trace an operation with custom name.

Parameters:

name – The name of the tracing slice.

Example

>>> with tracing():
>>>     # Tracce `my_operation()` with the name "my_operation".
>>>     with trace_event("my_operation"):
>>>         my_operation()