Struct oasis_core_runtime::storage::mkvs::sync::StatsCollector
source · pub struct StatsCollector {
pub sync_get_count: usize,
pub sync_get_prefixes_count: usize,
pub sync_iterate_count: usize,
/* private fields */
}
Expand description
A proxy read syncer which keeps track of call statistics.
Fields§
§sync_get_count: usize
Count of sync_get
calls made to the underlying read syncer.
sync_get_prefixes_count: usize
Count of sync_get_prefixes
calls made to the underlying read syncer.
sync_iterate_count: usize
Count of sync_iterate
calls made to the underlying read syncer.
Implementations§
source§impl StatsCollector
impl StatsCollector
sourcepub fn new(rs: Box<dyn ReadSync>) -> StatsCollector
pub fn new(rs: Box<dyn ReadSync>) -> StatsCollector
Construct a new instance, proxying to the given backing read syncer.
Trait Implementations§
source§impl ReadSync for StatsCollector
impl ReadSync for StatsCollector
source§fn sync_get(&mut self, request: GetRequest) -> Result<ProofResponse>
fn sync_get(&mut self, request: GetRequest) -> Result<ProofResponse>
Fetch a single key and returns the corresponding proof.
source§fn sync_get_prefixes(
&mut self,
request: GetPrefixesRequest,
) -> Result<ProofResponse>
fn sync_get_prefixes( &mut self, request: GetPrefixesRequest, ) -> Result<ProofResponse>
Fetch all keys under the given prefixes and returns the corresponding proofs.
source§fn sync_iterate(&mut self, request: IterateRequest) -> Result<ProofResponse>
fn sync_iterate(&mut self, request: IterateRequest) -> Result<ProofResponse>
Seek to a given key and then fetch the specified number of following items
based on key iteration order.
Auto Trait Implementations§
impl Freeze for StatsCollector
impl !RefUnwindSafe for StatsCollector
impl !Send for StatsCollector
impl !Sync for StatsCollector
impl Unpin for StatsCollector
impl !UnwindSafe for StatsCollector
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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