pub struct AdHocStats {
pub total_events: u64,
pub total_units: u64,
}Available on crate feature
dhat-compat only.Expand description
Ad-hoc-mode statistics snapshot. Mirrors dhat::AdHocStats.
Populated by ad_hoc_event calls, which are independent of
the heap allocator hot path.
§Example
use mod_alloc::dhat_compat::{ad_hoc_event, AdHocStats};
ad_hoc_event(42);
let stats = AdHocStats::get();
assert_eq!(stats.total_events, 1);
assert_eq!(stats.total_units, 42);Fields§
§total_events: u64Number of ad_hoc_event calls.
total_units: u64Sum of all weight arguments passed to ad_hoc_event.
Implementations§
Source§impl AdHocStats
impl AdHocStats
Trait Implementations§
Source§impl Clone for AdHocStats
impl Clone for AdHocStats
Source§fn clone(&self) -> AdHocStats
fn clone(&self) -> AdHocStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AdHocStats
impl Debug for AdHocStats
Source§impl Default for AdHocStats
impl Default for AdHocStats
Source§fn default() -> AdHocStats
fn default() -> AdHocStats
Returns the “default value” for a type. Read more
Source§impl PartialEq for AdHocStats
impl PartialEq for AdHocStats
Source§fn eq(&self, other: &AdHocStats) -> bool
fn eq(&self, other: &AdHocStats) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for AdHocStats
impl StructuralPartialEq for AdHocStats
Auto Trait Implementations§
impl Freeze for AdHocStats
impl RefUnwindSafe for AdHocStats
impl Send for AdHocStats
impl Sync for AdHocStats
impl Unpin for AdHocStats
impl UnsafeUnpin for AdHocStats
impl UnwindSafe for AdHocStats
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