pub struct ProcessStatsConfig {
pub quirks: Vec<i32>,
pub scan_all_processes_on_start: Option<bool>,
pub record_thread_names: Option<bool>,
pub proc_stats_poll_ms: Option<u32>,
pub proc_stats_cache_ttl_ms: Option<u32>,
pub resolve_process_fds: Option<bool>,
pub scan_smaps_rollup: Option<bool>,
pub record_process_age: Option<bool>,
pub record_process_runtime: Option<bool>,
}
Fields§
§quirks: Vec<i32>
§scan_all_processes_on_start: Option<bool>
If enabled all processes will be scanned and dumped when the trace starts.
record_thread_names: Option<bool>
If enabled thread names are also recoded (this is redundant if sched_switch is enabled).
proc_stats_poll_ms: Option<u32>
If > 0 samples counters (see process_stats.proto) from /proc/pid/status and oom_score_adj every X ms. It will also sample /proc/pid/smaps_rollup if scan_smaps_rollup = true. This is required to be > 100ms to avoid excessive CPU usage.
proc_stats_cache_ttl_ms: Option<u32>
This is required to be either = 0 or a multiple of |proc_stats_poll_ms| (default: |proc_stats_poll_ms|). If = 0, will be set to |proc_stats_poll_ms|. Non-multiples will be rounded down to the nearest multiple.
resolve_process_fds: Option<bool>
Niche feature: If true this will resolve file descriptors for each process so these can be mapped to their actual device or file. Requires raw_syscalls/sys_{enter,exit} ftrace events to be enabled or new fds opened after initially scanning a process will not be recognized.
scan_smaps_rollup: Option<bool>
If true, output will include memory stats from /proc/pid/smaps_rollup.
record_process_age: Option<bool>
If true: process descriptions will include process age (starttime in /proc/pid/stat). Introduced in: perfetto v44.
record_process_runtime: Option<bool>
If true and |proc_stats_poll_ms| is true, process stats will include time spent running in user/kernel mode (utime/stime in /proc/pid/stat). Introduced in: perfetto v44.
Implementations§
Source§impl ProcessStatsConfig
impl ProcessStatsConfig
Sourcepub fn quirks(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<Quirks>>
pub fn quirks( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<Quirks>>
Returns an iterator which yields the valid enum values contained in quirks
.
Sourcepub fn push_quirks(&mut self, value: Quirks)
pub fn push_quirks(&mut self, value: Quirks)
Appends the provided enum value to quirks
.
Sourcepub fn scan_all_processes_on_start(&self) -> bool
pub fn scan_all_processes_on_start(&self) -> bool
Returns the value of scan_all_processes_on_start
, or the default value if scan_all_processes_on_start
is unset.
Sourcepub fn record_thread_names(&self) -> bool
pub fn record_thread_names(&self) -> bool
Returns the value of record_thread_names
, or the default value if record_thread_names
is unset.
Sourcepub fn proc_stats_poll_ms(&self) -> u32
pub fn proc_stats_poll_ms(&self) -> u32
Returns the value of proc_stats_poll_ms
, or the default value if proc_stats_poll_ms
is unset.
Sourcepub fn proc_stats_cache_ttl_ms(&self) -> u32
pub fn proc_stats_cache_ttl_ms(&self) -> u32
Returns the value of proc_stats_cache_ttl_ms
, or the default value if proc_stats_cache_ttl_ms
is unset.
Sourcepub fn resolve_process_fds(&self) -> bool
pub fn resolve_process_fds(&self) -> bool
Returns the value of resolve_process_fds
, or the default value if resolve_process_fds
is unset.
Sourcepub fn scan_smaps_rollup(&self) -> bool
pub fn scan_smaps_rollup(&self) -> bool
Returns the value of scan_smaps_rollup
, or the default value if scan_smaps_rollup
is unset.
Sourcepub fn record_process_age(&self) -> bool
pub fn record_process_age(&self) -> bool
Returns the value of record_process_age
, or the default value if record_process_age
is unset.
Sourcepub fn record_process_runtime(&self) -> bool
pub fn record_process_runtime(&self) -> bool
Returns the value of record_process_runtime
, or the default value if record_process_runtime
is unset.
Trait Implementations§
Source§impl Clone for ProcessStatsConfig
impl Clone for ProcessStatsConfig
Source§fn clone(&self) -> ProcessStatsConfig
fn clone(&self) -> ProcessStatsConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ProcessStatsConfig
impl Debug for ProcessStatsConfig
Source§impl Default for ProcessStatsConfig
impl Default for ProcessStatsConfig
Source§impl Message for ProcessStatsConfig
impl Message for ProcessStatsConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.