pub struct InstrumentedSamplingConfig {
pub activity_name_filters: Vec<ActivityNameFilter>,
pub activity_tx_include_globs: Vec<String>,
pub activity_tx_exclude_globs: Vec<String>,
pub activity_ranges: Vec<ActivityRange>,
}Expand description
Configuration for sampling counters by instrumenting command buffers.
When instrumented_sampling_config is used (instead of the instrumented_sampling bool), the following steps determine whether instrumented counters are enabled for a given GPU activity:
- Activity name filtering: If activity_name_filters is non-empty, the activity must match at least one filter. If empty, all activities pass this step.
- TX range filtering: If activity_tx_include_globs is non-empty, the activity must fall within a matching TX range. Activities in TX ranges matching activity_tx_exclude_globs are excluded (excludes take precedence over includes). If both are empty, all activities pass this step.
- Range-based sampling: If activity_ranges is non-empty, only activities within the specified skip/count ranges are instrumented. If empty, all activities that passed the previous steps are instrumented.
Fields§
§activity_name_filters: Vec<ActivityNameFilter>GPU activity name filters. An activity matches if it matches any filter.
activity_tx_include_globs: Vec<String>Glob patterns to use for including GPU activities in TX ranges. TX ranges are in-process annotations that mark different sections of GPU work (e.g. NVTX ranges for CUDA). TX ranges can be nested, and an activity is included if any range in its nesting hierarchy matches. Only activities that fall within a matching TX range will be instrumented.
activity_tx_exclude_globs: Vec<String>Glob patterns to use for excluding GPU activities from TX ranges. TX ranges can be nested, and an activity is excluded if any range in its nesting hierarchy matches. Excludes take precedence over includes.
activity_ranges: Vec<ActivityRange>Ranges of GPU activities to instrument. Applied after activity name and TX range filters. If empty, all activities that passed the previous filters are instrumented.
Trait Implementations§
Source§impl Clone for InstrumentedSamplingConfig
impl Clone for InstrumentedSamplingConfig
Source§fn clone(&self) -> InstrumentedSamplingConfig
fn clone(&self) -> InstrumentedSamplingConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstrumentedSamplingConfig
impl Debug for InstrumentedSamplingConfig
Source§impl Default for InstrumentedSamplingConfig
impl Default for InstrumentedSamplingConfig
Source§impl Message for InstrumentedSamplingConfig
impl Message for InstrumentedSamplingConfig
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.