pub trait TraceHandler:
Send
+ Sync
+ 'static {
// Required method
fn trace_activity(
&self,
trace: &Trace,
event: Activity,
event_time: Duration,
);
}Expand description
Inference event handler trait.
Required Methods§
Sourcefn trace_activity(&self, trace: &Trace, event: Activity, event_time: Duration)
fn trace_activity(&self, trace: &Trace, event: Activity, event_time: Duration)
This function is invoked each time the event occures.
trace: Trace object that was reported.
Note that child traces of constructed one also are reported with this fn.
Check Trace::new_with_handle for more info.
event: activity that has occurred.
event_time: time when event occured.
Triton Trace APIs report timestamps using steady clock, which is a monotonic clock that ensures time always movess forward.
This clock is not related to wall clock time and, for example, can measure time since last reboot (aka /proc/uptime).