Struct sp_state_machine::StateMachineStats
source · pub struct StateMachineStats {
pub reads_modified: RefCell<u64>,
pub bytes_read_modified: RefCell<u64>,
pub writes_overlay: RefCell<u64>,
pub bytes_writes_overlay: RefCell<u64>,
}
Expand description
Accumulated usage statistics specific to state machine crate.
Fields§
§reads_modified: RefCell<u64>
Number of read query from runtime that hit a modified value (in state machine overlay).
bytes_read_modified: RefCell<u64>
Size in byte of read queries that hit a modified value.
writes_overlay: RefCell<u64>
Number of time a write operation occurs into the state machine overlay.
bytes_writes_overlay: RefCell<u64>
Size in bytes of the writes overlay operation.
Implementations§
source§impl StateMachineStats
impl StateMachineStats
sourcepub fn add(&self, other: &StateMachineStats)
pub fn add(&self, other: &StateMachineStats)
Accumulates some registered stats.
source§impl StateMachineStats
impl StateMachineStats
sourcepub fn tally_read_modified(&self, data_bytes: u64)
pub fn tally_read_modified(&self, data_bytes: u64)
Tally one read modified operation, of some length.
sourcepub fn tally_write_overlay(&self, data_bytes: u64)
pub fn tally_write_overlay(&self, data_bytes: u64)
Tally one write overlay operation, of some length.
Trait Implementations§
source§impl Clone for StateMachineStats
impl Clone for StateMachineStats
source§fn clone(&self) -> StateMachineStats
fn clone(&self) -> StateMachineStats
Returns a copy of the value. Read more
1.0.0 · 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 StateMachineStats
impl Debug for StateMachineStats
source§impl Default for StateMachineStats
impl Default for StateMachineStats
source§fn default() -> StateMachineStats
fn default() -> StateMachineStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for StateMachineStats
impl Send for StateMachineStats
impl !Sync for StateMachineStats
impl Unpin for StateMachineStats
impl UnwindSafe for StateMachineStats
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, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.