#[non_exhaustive]pub struct ProfilerOptions {
pub native_mem: Option<String>,
/* private fields */
}Expand description
Options for configuring the async-profiler behavior. Currently supports:
- Native memory allocation tracking
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.native_mem: Option<String>If set, the profiler will collect information about native memory allocations.
The value is the interval in bytes or in other units,
if followed by k (kilobytes), m (megabytes), or g (gigabytes).
For example, "10m" will sample an allocation for every
10 megabytes of memory allocated. Passing "0" will sample
all allocations.
See ProfilingModes in the async-profiler docs for more details.
Implementations§
Source§impl ProfilerOptions
impl ProfilerOptions
Sourcepub fn to_args_string(&self, jfr_file_path: &Path) -> String
pub fn to_args_string(&self, jfr_file_path: &Path) -> String
Convert the profiler options to a string of arguments for the async-profiler.
Trait Implementations§
Source§impl Debug for ProfilerOptions
impl Debug for ProfilerOptions
Source§impl Default for ProfilerOptions
impl Default for ProfilerOptions
Source§fn default() -> ProfilerOptions
fn default() -> ProfilerOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProfilerOptions
impl RefUnwindSafe for ProfilerOptions
impl Send for ProfilerOptions
impl Sync for ProfilerOptions
impl Unpin for ProfilerOptions
impl UnwindSafe for ProfilerOptions
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.