unilab.logging.trace_event.TraceRecorder
-
class unilab.logging.trace_event.TraceRecorder[source]
Bases: object
Minimal Chrome trace / Perfetto event recorder.
- Parameters:
-
Methods
__init__(process_name, *[, pid])
|
|
add_counter(name, value, *, category[, ...])
|
|
add_cuda_pending_span(name, *, category, ...)
|
|
add_slice(name, *, category, start_ns, end_ns)
|
|
drain_events()
|
|
extend(events)
|
|
flush_cuda_pending()
|
|
register_thread(name, *[, tid])
|
|
span(name, *, category[, tid, args])
|
|
write_json(output_path)
|
|
-
__init__(process_name, *, pid=None)[source]
- Parameters:
-
-
register_thread(name, *, tid=None)[source]
- Parameters:
-
- Return type:
int
-
add_slice(name, *, category, start_ns, end_ns, tid=None, args=None)[source]
- Parameters:
-
- Return type:
None
-
span(name, *, category, tid=None, args=None)[source]
- Parameters:
-
-
add_counter(name, value, *, category, timestamp_ns=None, tid=None, args=None)[source]
- Parameters:
-
- Return type:
None
-
add_cuda_pending_span(name, *, category, cpu_begin_ns, start_event, end_event, args=None, tid=None)[source]
- Parameters:
-
- Return type:
None
-
flush_cuda_pending()[source]
- Return type:
None
-
extend(events)[source]
- Parameters:
events (list[dict[str, Any]])
- Return type:
None
-
drain_events()[source]
- Return type:
list[dict[str, Any]]
-
write_json(output_path)[source]
- Parameters:
output_path (str | Path)
- Return type:
Path