Struct sc_client_db::bench::BenchmarkingState [−][src]
State that manages the backend database reference. Allows runtime to control the database.
Implementations
impl<B: BlockT> BenchmarkingState<B>
[src]
pub fn new(
genesis: Storage,
_cache_size_mb: Option<usize>
) -> Result<Self, String>
[src]
genesis: Storage,
_cache_size_mb: Option<usize>
) -> Result<Self, String>
Create a new instance that creates a database in a temporary dir.
Trait Implementations
impl<B: BlockT> Backend<<<B as Block>::Header as Header>::Hashing> for BenchmarkingState<B>
[src]
type Error = <TrieBackend<Arc<dyn Storage<HashFor<B>>>, HashFor<B>> as StateBackend<HashFor<B>>>::Error
An error type when fetching data is not possible.
type Transaction = <TrieBackend<Arc<dyn Storage<HashFor<B>>>, HashFor<B>> as StateBackend<HashFor<B>>>::Transaction
Storage changes to be applied if committing
type TrieBackendStorage = <TrieBackend<Arc<dyn Storage<HashFor<B>>>, HashFor<B>> as StateBackend<HashFor<B>>>::TrieBackendStorage
Type of trie backend storage.
fn storage(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Self::Error>
[src]
fn storage_hash(&self, key: &[u8]) -> Result<Option<B::Hash>, Self::Error>
[src]
fn child_storage(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<Vec<u8>>, Self::Error>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<Vec<u8>>, Self::Error>
fn exists_storage(&self, key: &[u8]) -> Result<bool, Self::Error>
[src]
fn exists_child_storage(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<bool, Self::Error>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<bool, Self::Error>
fn next_storage_key(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Self::Error>
[src]
fn next_child_storage_key(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<Vec<u8>>, Self::Error>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<Vec<u8>>, Self::Error>
fn for_keys_with_prefix<F: FnMut(&[u8])>(&self, prefix: &[u8], f: F)
[src]
fn for_key_values_with_prefix<F: FnMut(&[u8], &[u8])>(
&self,
prefix: &[u8],
f: F
)
[src]
&self,
prefix: &[u8],
f: F
)
fn for_keys_in_child_storage<F: FnMut(&[u8])>(
&self,
child_info: &ChildInfo,
f: F
)
[src]
&self,
child_info: &ChildInfo,
f: F
)
fn for_child_keys_with_prefix<F: FnMut(&[u8])>(
&self,
child_info: &ChildInfo,
prefix: &[u8],
f: F
)
[src]
&self,
child_info: &ChildInfo,
prefix: &[u8],
f: F
)
fn storage_root<'a>(
&self,
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>
) -> (B::Hash, Self::Transaction) where
B::Hash: Ord,
[src]
&self,
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>
) -> (B::Hash, Self::Transaction) where
B::Hash: Ord,
fn child_storage_root<'a>(
&self,
child_info: &ChildInfo,
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>
) -> (B::Hash, bool, Self::Transaction) where
B::Hash: Ord,
[src]
&self,
child_info: &ChildInfo,
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>
) -> (B::Hash, bool, Self::Transaction) where
B::Hash: Ord,
fn pairs(&self) -> Vec<(Vec<u8>, Vec<u8>)>
[src]
fn keys(&self, prefix: &[u8]) -> Vec<Vec<u8>>
[src]
fn child_keys(&self, child_info: &ChildInfo, prefix: &[u8]) -> Vec<Vec<u8>>
[src]
fn as_trie_backend(
&mut self
) -> Option<&TrieBackend<Self::TrieBackendStorage, HashFor<B>>>
[src]
&mut self
) -> Option<&TrieBackend<Self::TrieBackendStorage, HashFor<B>>>
fn commit(
&self,
storage_root: <HashFor<B> as Hasher>::Out,
transaction: Self::Transaction,
main_storage_changes: StorageCollection,
child_storage_changes: ChildStorageCollection
) -> Result<(), Self::Error>
[src]
&self,
storage_root: <HashFor<B> as Hasher>::Out,
transaction: Self::Transaction,
main_storage_changes: StorageCollection,
child_storage_changes: ChildStorageCollection
) -> Result<(), Self::Error>
fn wipe(&self) -> Result<(), Self::Error>
[src]
fn read_write_count(&self) -> (u32, u32, u32, u32)
[src]
Get the key tracking information for the state db.
fn reset_read_write_count(&self)
[src]
Reset the key tracking information for the state db.
fn get_whitelist(&self) -> Vec<TrackedStorageKey>
[src]
fn set_whitelist(&self, new: Vec<TrackedStorageKey>)
[src]
fn register_overlay_stats(&mut self, stats: &StateMachineStats)
[src]
fn usage_info(&self) -> UsageInfo
[src]
pub fn child_storage_hash(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<<H as Hasher>::Out>, Self::Error>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<<H as Hasher>::Out>, Self::Error>
pub fn full_storage_root<'a>(
&self,
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>,
child_deltas: impl Iterator<Item = (&'a ChildInfo, impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>)>
) -> (<H as Hasher>::Out, Self::Transaction) where
<H as Hasher>::Out: Ord,
<H as Hasher>::Out: Encode,
[src]
&self,
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>,
child_deltas: impl Iterator<Item = (&'a ChildInfo, impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>)>
) -> (<H as Hasher>::Out, Self::Transaction) where
<H as Hasher>::Out: Ord,
<H as Hasher>::Out: Encode,
impl<Block: BlockT> Debug for BenchmarkingState<Block>
[src]
Auto Trait Implementations
impl<B> !RefUnwindSafe for BenchmarkingState<B>
impl<B> Send for BenchmarkingState<B>
impl<B> !Sync for BenchmarkingState<B>
impl<B> Unpin for BenchmarkingState<B> where
<B as Block>::Hash: Unpin,
<B as Block>::Hash: Unpin,
impl<B> !UnwindSafe for BenchmarkingState<B>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CheckedConversion for T
[src]
pub fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src]
Self: TryFrom<T>,
pub fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src]
Self: TryInto<T>,
impl<T> Erased for T
[src]
impl<T> From<T> for T
[src]
impl<H, B> InspectState<H, B> for B where
B: Backend<H>,
H: Hasher,
[src]
B: Backend<H>,
H: Hasher,
pub fn inspect_with<F>(&self, f: F) where
F: FnOnce(),
[src]
F: FnOnce(),
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
pub fn from_ref(outer: &Outer) -> &T
[src]
Get a reference to the inner from the outer.
pub fn from_mut(outer: &mut Outer) -> &mut T
[src]
Get a mutable reference to the inner from the outer.
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> SaturatedConversion for T
[src]
pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
[src]
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
[src]
Self: UniqueSaturatedInto<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
T: UncheckedFrom<S>,
pub fn unchecked_into(self) -> T
[src]
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
[src]
T: Bounded,
S: TryInto<T>,
pub fn unique_saturated_into(self) -> T
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,