Struct sp_state_machine::UsageInfo
source · [−]pub struct UsageInfo {
pub reads: UsageUnit,
pub writes: UsageUnit,
pub nodes_writes: UsageUnit,
pub overlay_writes: UsageUnit,
pub removed_nodes: UsageUnit,
pub cache_reads: UsageUnit,
pub modified_reads: UsageUnit,
pub memory: usize,
pub started: Instant,
pub span: Duration,
}
Expand description
Usage statistics for state backend.
Fields
reads: UsageUnit
Read statistics (total).
writes: UsageUnit
Write statistics (total).
nodes_writes: UsageUnit
Write trie nodes statistics.
overlay_writes: UsageUnit
Write into cached state machine change overlay.
removed_nodes: UsageUnit
Removed trie nodes statistics.
cache_reads: UsageUnit
Cache read statistics.
modified_reads: UsageUnit
Modified value read statistics.
memory: usize
Memory used.
started: Instant
Moment at which current statistics has been started being collected.
span: Duration
Timespan of the statistics.
Implementations
sourceimpl UsageInfo
impl UsageInfo
sourcepub fn include_state_machine_states(&mut self, count: &StateMachineStats)
pub fn include_state_machine_states(&mut self, count: &StateMachineStats)
Add collected state machine to this state.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for UsageInfo
impl Send for UsageInfo
impl Sync for UsageInfo
impl Unpin for UsageInfo
impl UnwindSafe for UsageInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcepub fn unchecked_into(self) -> T
pub fn unchecked_into(self) -> T
The counterpart to unchecked_from
.