pub struct PerfettoTraceBuilder { /* private fields */ }Expand description
State for a trace builder instance.
Implementations§
Source§impl PerfettoTraceBuilder
impl PerfettoTraceBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a Perfetto trace builder.
Each trace builder instance will use a unique TrustedPacketSequenceId when creating packets.
Sourcepub fn build_enter_exit_track_descriptor_trace_packet(
&mut self,
current_time_ns: u64,
id: Id,
parent: Id,
name: &str,
) -> TracePacket
pub fn build_enter_exit_track_descriptor_trace_packet( &mut self, current_time_ns: u64, id: Id, parent: Id, name: &str, ) -> TracePacket
Build a TracePacket containing the TrackDescriptor for crate::tracker::Track::enter and crate::tracker::Track::exit events (using an incremental counter).
Sourcepub fn build_value_track_descriptor_trace_packet(
&mut self,
current_time_ns: u64,
id: Id,
parent: Id,
name: &str,
) -> TracePacket
pub fn build_value_track_descriptor_trace_packet( &mut self, current_time_ns: u64, id: Id, parent: Id, name: &str, ) -> TracePacket
Build a TracePacket containing the TrackDescriptor for a sequence of crate::tracker::Track::values.
Sourcepub fn build_activity_track_descriptor_trace_packet(
&mut self,
current_time_ns: u64,
id: Id,
parent: Id,
name: &str,
) -> TracePacket
pub fn build_activity_track_descriptor_trace_packet( &mut self, current_time_ns: u64, id: Id, parent: Id, name: &str, ) -> TracePacket
Build a TracePacket containing the TrackDescriptor for activity slices denoted by crate::tracker::Track::begin_activity and crate::tracker::Track::end_activity events.
Sourcepub fn build_enter_track_event_trace_packet(
&self,
current_time_ns: u64,
id: Id,
other: Id,
) -> TracePacket
pub fn build_enter_track_event_trace_packet( &self, current_time_ns: u64, id: Id, other: Id, ) -> TracePacket
Build a TracePacket containing a TrackEvent to represent an crate::tracker::Track::enter event (as an incremental counter update).
Sourcepub fn build_exit_track_event_trace_packet(
&self,
current_time_ns: u64,
id: Id,
other: Id,
) -> TracePacket
pub fn build_exit_track_event_trace_packet( &self, current_time_ns: u64, id: Id, other: Id, ) -> TracePacket
Build a TracePacket containing a TrackEvent to represent an crate::tracker::Track::exit event (as an incremental counter update).
Sourcepub fn build_value_track_event_trace_packet(
&self,
current_time_ns: u64,
id: Id,
value: f64,
) -> TracePacket
pub fn build_value_track_event_trace_packet( &self, current_time_ns: u64, id: Id, value: f64, ) -> TracePacket
Build a TracePacket containing the TrackEvent for a floating point crate::tracker::Track::value.
Sourcepub fn build_activity_begin_trace_packet(
&self,
current_time_ns: u64,
id: Id,
name: &str,
correlation_id: Option<u64>,
) -> TracePacket
pub fn build_activity_begin_trace_packet( &self, current_time_ns: u64, id: Id, name: &str, correlation_id: Option<u64>, ) -> TracePacket
Build a TracePacket containing the TrackEvent for a crate::tracker::Track::begin_activity SliceBegin event.
Sourcepub fn build_activity_end_trace_packet(
&self,
current_time_ns: u64,
id: Id,
) -> TracePacket
pub fn build_activity_end_trace_packet( &self, current_time_ns: u64, id: Id, ) -> TracePacket
Build a TracePacket containing the TrackEvent for a crate::tracker::Track::end_activity SliceEnd event.