pub struct BenchCounters {
pub cow_copies: u64,
pub arc_clones: u64,
}Expand description
A point-in-time read of the counters. Cheap Copy value so benches can
snapshot before/after a measured section and diff.
Fields§
§cow_copies: u64Number of times array_make_mut/map_make_mut/record_make_mut
found a shared Arc (strong_count > 1) and paid the one-time O(n)
copy — the “mutate-while-shared” cost value-model-spec §5 argues is
bounded per share, not unbounded.
arc_clones: u64Number of times a collection-typed Value (Array/Map/Record)
was duplicated via a cheap Arc::clone (an O(1) snapshot/read) —
the “sharing is O(1)” half of the same claim.
Trait Implementations§
Source§impl Clone for BenchCounters
impl Clone for BenchCounters
Source§fn clone(&self) -> BenchCounters
fn clone(&self) -> BenchCounters
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 moreimpl Copy for BenchCounters
Source§impl Debug for BenchCounters
impl Debug for BenchCounters
Source§impl Default for BenchCounters
impl Default for BenchCounters
Source§fn default() -> BenchCounters
fn default() -> BenchCounters
Returns the “default value” for a type. Read more
impl Eq for BenchCounters
Source§impl PartialEq for BenchCounters
impl PartialEq for BenchCounters
impl StructuralPartialEq for BenchCounters
Auto Trait Implementations§
impl Freeze for BenchCounters
impl RefUnwindSafe for BenchCounters
impl Send for BenchCounters
impl Sync for BenchCounters
impl Unpin for BenchCounters
impl UnsafeUnpin for BenchCounters
impl UnwindSafe for BenchCounters
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