#[non_exhaustive]pub struct RecorderOptions { /* private fields */ }Expand description
Options used when attaching a Recorder to a process.
Implementations§
Source§impl RecorderOptions
impl RecorderOptions
Sourcepub fn new(sample_rate: SampleRate) -> Self
pub fn new(sample_rate: SampleRate) -> Self
Construct a usable recording configuration.
Sourcepub fn stack_size(self, stack_size: u32) -> Self
pub fn stack_size(self, stack_size: u32) -> Self
Set the user-stack snapshot size in bytes.
Sourcepub fn ring_buffer_stacks(self, stacks: u32) -> Self
pub fn ring_buffer_stacks(self, stacks: u32) -> Self
Set the target per-CPU perf data-ring capacity in stack-sized records.
Capacity is the larger of the configured stack snapshot and system page
size, times this count, with a floor large enough for any perf record and
power-of-two page rounding. On 4 KiB-page hosts, the default count of 32
gives a 1 MiB ring for the default 32 KiB stack and a 2 MiB ring for a
64 KiB stack. Memory is pinned per CPU. Values
requiring more than 256 MiB per CPU are rejected. Larger valid values
can absorb occasional long stalls, but should be benchmarked under
sustained load before deployment. Zero selects the default. If mmap
fails with EPERM or ENOMEM, attach progressively halves the ring down
to the minimum valid capacity. All per-CPU rings in one recorder also
share a 1 GiB aggregate data budget; effective capacities are available
in RecordingSummary.
Sourcepub fn include_kernel(self, include: bool) -> Self
pub fn include_kernel(self, include: bool) -> Self
Include kernel frames when permitted.
Sourcepub fn inherit_children(self, inherit: bool) -> Self
pub fn inherit_children(self, inherit: bool) -> Self
Follow child processes created after recording starts.
Sourcepub fn start_timestamp_us(self, timestamp: u64) -> Self
pub fn start_timestamp_us(self, timestamp: u64) -> Self
Set the Unix-timeline anchor stored in the spool header.
Sourcepub fn sample_interval_us(self, interval: u64) -> Self
pub fn sample_interval_us(self, interval: u64) -> Self
Set optional sampling-interval metadata stored in the spool header.
Trait Implementations§
Source§impl Clone for RecorderOptions
impl Clone for RecorderOptions
Source§fn clone(&self) -> RecorderOptions
fn clone(&self) -> RecorderOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more