Struct rbspy_oncpu::sampler::Sampler
source · [−]pub struct Sampler { /* private fields */ }Implementations
sourceimpl Sampler
impl Sampler
pub fn new(
pid: Pid,
sample_rate: u32,
lock_process: bool,
time_limit: Option<Duration>,
with_subprocesses: bool,
force_version: Option<String>,
on_cpu: bool
) -> Self
pub fn total_traces(&self) -> usize
pub fn timing_error_traces(&self) -> usize
sourcepub fn start(
&self,
trace_sender: SyncSender<StackTrace>,
result_sender: Sender<Result<(), Error>>
) -> Result<(), Error>
pub fn start(
&self,
trace_sender: SyncSender<StackTrace>,
result_sender: Sender<Result<(), Error>>
) -> Result<(), Error>
Start thread(s) recording a PID and possibly its children. Tracks new processes Returns a pair of Receivers from which you can consume recorded stacktraces and errors
pub fn stop(&self)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Sampler
impl Send for Sampler
impl Sync for Sampler
impl Unpin for Sampler
impl UnwindSafe for Sampler
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more