TraceHandler

Trait TraceHandler 

Source
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§

Source

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).

Implementations on Foreign Types§

Source§

impl TraceHandler for ()

Source§

fn trace_activity( &self, _trace: &Trace, _event: Activity, _event_time: Duration, )

Implementors§