pub struct ProfilerBuilder { /* private fields */ }Available on crate feature
dhat-compat only.Expand description
Builder for Profiler.
Mirrors dhat::ProfilerBuilder method-for-method. Obtain via
Profiler::builder.
Implementations§
Source§impl ProfilerBuilder
impl ProfilerBuilder
Sourcepub fn testing(self) -> Self
pub fn testing(self) -> Self
Build in testing mode — suppresses the drop-time file
write. Use for tests that snapshot stats directly without
littering the workspace with dhat-heap.json.
Sourcepub fn file_name<P: AsRef<Path>>(self, p: P) -> Self
pub fn file_name<P: AsRef<Path>>(self, p: P) -> Self
Override the output file name. Default is
dhat-heap.json (or dhat-ad-hoc.json in ad-hoc mode).
Sourcepub fn trim_backtraces(self, max_frames: Option<usize>) -> Self
pub fn trim_backtraces(self, max_frames: Option<usize>) -> Self
Maximum frames to retain per backtrace (None = walker
default).
Accepted for API parity with dhat::ProfilerBuilder;
silently clamped to mod-alloc’s walker cap of 8 frames.
Values above 8 produce up to 8 frames; values below 8
produce that many frames in the emitted JSON.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProfilerBuilder
impl RefUnwindSafe for ProfilerBuilder
impl Send for ProfilerBuilder
impl Sync for ProfilerBuilder
impl Unpin for ProfilerBuilder
impl UnsafeUnpin for ProfilerBuilder
impl UnwindSafe for ProfilerBuilder
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