Struct RecordConfig

Source
pub struct RecordConfig {
    pub format: OutputFormat,
    pub raw_path: Option<PathBuf>,
    pub out_path: Option<PathBuf>,
    pub pid: Pid,
    pub with_subprocesses: bool,
    pub sample_rate: u32,
    pub maybe_duration: Option<Duration>,
    pub flame_min_width: f64,
    pub lock_process: bool,
    pub force_version: Option<String>,
    pub on_cpu_only: bool,
}
Expand description

A configuration bundle for the recorder

Fields§

§format: OutputFormat

The format to use for recorded traces. See OutputFormat for a list of available options.

§raw_path: Option<PathBuf>

Where to write rbspy’s raw trace output, which can be used for later processing.

§out_path: Option<PathBuf>

Where to write rbspy’s output. If - is given, output is written to standard output.

§pid: Pid

The process ID (PID) of the process to profile. This is usually a ruby process, but rbspy will locate and profile any ruby subprocesses of the target process if with_subprocesses is enabled.

§with_subprocesses: bool

Whether to profile the target process (given by pid) as well as its child processes, and their child processes, and so on. Default: false.

§sample_rate: u32

The number of traces that should be collected each second. Default: 100.

§maybe_duration: Option<Duration>

The length of time that the recorder should run before stopping. Default: none (run until interrupted).

§flame_min_width: f64

Minimum flame width. Applies to flamegraph output only. If your sample has many small functions in it and is difficult to read, then consider increasing this value. Default: 0.1.

§lock_process: bool

Locks the process when a sample is being taken.

You should enable this option for the most accurate samples. However, it briefly stops the process from executing and can affect performance. The performance impact is most noticeable in CPU-bound ruby programs or when a high sampling rate is used.

§force_version: Option<String>

Forces the recorder to use the given Ruby version. If not given, rbspy will attempt to determine the Ruby version from the running process.

This option shouldn’t be needed unless you’re testing a pre-release Ruby version.

§on_cpu_only: bool

Includes stack traces only when the program is using the CPU. Default: false (always includes stack traces, even when the program is waiting).

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V