pub struct Sampler {
pub use_rayon: bool,
/* private fields */
}Fields§
§use_rayon: boolImplementations§
Trait Implementations§
Source§impl PlatformSampler for Sampler
The unified sampler interface.
impl PlatformSampler for Sampler
The unified sampler interface.
This was only implemented for the Darwin backend, so on Linux the trait was
declared but never satisfied: gander_core::PlatformSampler described an
interface that did not exist on the platform where it mattered most, and
every use gander_core::PlatformSampler in a Linux-only test was dead
(the inherent sample shadowed it). sample and cache_len now exist only
on the trait, on both platforms, so a caller cannot accidentally depend on a
method that one backend happens to have and the other does not.
Source§fn sample(&mut self) -> (SystemSnapshot, Vec<Row>)
fn sample(&mut self) -> (SystemSnapshot, Vec<Row>)
Take one sample: host counters plus one row per process.
Source§fn cache_len(&self) -> usize
fn cache_len(&self) -> usize
Number of cached per-process identity records, for tests and diagnostics.
Source§fn backend_name() -> &'static str
fn backend_name() -> &'static str
A user-facing name for the backend.
Source§fn set_scan_options(&mut self, opts: ScanOptions)
fn set_scan_options(&mut self, opts: ScanOptions)
Tell the sampler what the front end currently needs. Read more
Source§fn supports_threads() -> bool
fn supports_threads() -> bool
Whether this backend can actually enumerate threads.
Auto Trait Implementations§
impl Freeze for Sampler
impl RefUnwindSafe for Sampler
impl Send for Sampler
impl Sync for Sampler
impl Unpin for Sampler
impl UnsafeUnpin for Sampler
impl UnwindSafe for Sampler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more