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>,
}
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. TODO(primiano): add CPU cost for change this value.
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>
If true this will resolve filedescriptors for each process so these can be mapped to their actual device or file. Requires raw_syscalls/sys_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 enabled memory stats from /proc/pid/smaps_rollup will be included in process stats.
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.
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>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
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>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
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>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
.