#[repr(i32)]pub enum TriggerMode {
Unspecified = 0,
StartTracing = 1,
StopTracing = 2,
CloneSnapshot = 4,
}
Variants§
Unspecified = 0
StartTracing = 1
When this mode is chosen, data sources are not started until one of the |triggers| are received. This supports early initialization and fast starting of the tracing system. On triggering, the session will then record for |stop_delay_ms|. However if no trigger is seen after |trigger_timeout_ms| the session will be stopped and no data will be returned.
StopTracing = 2
When this mode is chosen, the session will be started via the normal EnableTracing() & StartTracing(). If no trigger is ever seen the session will be stopped after |trigger_timeout_ms| and no data will be returned. However if triggered the trace will stop after |stop_delay_ms| and any data in the buffer will be returned to the consumer.
CloneSnapshot = 4
When this mode is chosen, this causes a snapshot of the current tracing session to be created after |stop_delay_ms| while the current tracing session continues undisturbed (% an extra flush). This mode can be used only when the tracing session is handled by the “perfetto” cmdline client (which is true in 90% of cases). Part of the business logic necessary for this behavior, and ensuing file handling, lives in perfetto_cmd.cc . On other consumers, this causes only a notification of the trigger through a CloneTriggerHit ObservableEvent. The custom consumer is supposed to call CloneSession() itself after the event. Use use_clone_snapshot_if_available=true when targeting older versions of perfetto.
Implementations§
Source§impl TriggerMode
impl TriggerMode
Source§impl TriggerMode
impl TriggerMode
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for TriggerMode
impl Clone for TriggerMode
Source§fn clone(&self) -> TriggerMode
fn clone(&self) -> TriggerMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more