pub struct Dhat(/* private fields */);
Available on crate feature
default
only.Expand description
The configuration for Dhat
Can be specified in crate::LibraryBenchmarkConfig::tool
or
crate::BinaryBenchmarkConfig::tool
.
§Example
use iai_callgrind::{LibraryBenchmarkConfig, main, Dhat};
main!(
config = LibraryBenchmarkConfig::default()
.tool(Dhat::default());
library_benchmark_groups = some_group
);
Implementations§
Source§impl Dhat
impl Dhat
Sourcepub fn with_args<I, T>(args: T) -> Self
pub fn with_args<I, T>(args: T) -> Self
Create a new Callgrind
configuration with initial command-line arguments
See also Callgrind::args
and Dhat::args
§Examples
use iai_callgrind::Dhat;
let config = Dhat::with_args(["mode=ad-hoc"]);
Sourcepub fn args<I, T>(&mut self, args: T) -> &mut Self
pub fn args<I, T>(&mut self, args: T) -> &mut Self
Add command-line arguments to the Dhat
configuration
Valid arguments are https://valgrind.org/docs/manual/dh-manual.html#dh-manual.options and the core valgrind command-line arguments https://valgrind.org/docs/manual/manual-core.html#manual-core.options.
See also Callgrind::args
§Examples
use iai_callgrind::Dhat;
let config = Dhat::default().args(["interval-size=10000"]);
Sourcepub fn enable(&mut self, value: bool) -> &mut Self
pub fn enable(&mut self, value: bool) -> &mut Self
Enable this tool. This is the default.
See also Callgrind::enable
use iai_callgrind::Dhat;
let config = Dhat::default().enable(false);
Sourcepub fn format<I, T>(&mut self, kinds: T) -> &mut Self
pub fn format<I, T>(&mut self, kinds: T) -> &mut Self
Customize the format of the dhat output
See also Callgrind::format
for more details and DhatMetric
for valid metrics.
§Examples
use iai_callgrind::{Dhat, DhatMetric};
let config = Dhat::default().format([DhatMetric::TotalBytes, DhatMetric::AtTGmaxBytes]);
Trait Implementations§
Source§impl AsRef<Tool> for Dhat
impl AsRef<Tool> for Dhat
Source§fn as_ref(&self) -> &InternalTool
fn as_ref(&self) -> &InternalTool
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl From<&Dhat> for InternalTool
impl From<&Dhat> for InternalTool
Source§impl From<&mut Dhat> for InternalTool
impl From<&mut Dhat> for InternalTool
Auto Trait Implementations§
impl Freeze for Dhat
impl RefUnwindSafe for Dhat
impl Send for Dhat
impl Sync for Dhat
impl Unpin for Dhat
impl UnwindSafe for Dhat
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