mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +00:00
state_machine no_std witness externalities (#6934)
* checkpoint before removing CT from change trie * before trie backend without tx * undo * Started no transaction, but would need using a different root calculation method, out of the scope of this pr, will roll back. * Remove NoTransaction. * partially address review. dummy stats implementation for no_std. * Remove ChangeTrieOverlay. * modified function * Remove witness_ext * need noops changes root * update from cumulus branch * line break * remove warning * line break * From review: renamings and stats active in no std (except time). * include cache, exclude change trie cache with individual temporary bad looking no_std check * little test * fuse imports and filter_map prepare_extrinsics_input_inner fold. * put back ExtInner into Ext, awkward double proto for new function. * Apply suggestions from code review * Update primitives/state-machine/Cargo.toml Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -17,8 +17,9 @@
|
||||
|
||||
//! Usage statistics for state db
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
use std::time::{Instant, Duration};
|
||||
use std::cell::RefCell;
|
||||
use sp_std::cell::RefCell;
|
||||
|
||||
/// Measured count of operations and total bytes.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
@@ -50,8 +51,10 @@ pub struct UsageInfo {
|
||||
/// Memory used.
|
||||
pub memory: usize,
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
/// Moment at which current statistics has been started being collected.
|
||||
pub started: Instant,
|
||||
#[cfg(feature = "std")]
|
||||
/// Timespan of the statistics.
|
||||
pub span: Duration,
|
||||
}
|
||||
@@ -99,7 +102,9 @@ impl UsageInfo {
|
||||
cache_reads: UsageUnit::default(),
|
||||
modified_reads: UsageUnit::default(),
|
||||
memory: 0,
|
||||
#[cfg(feature = "std")]
|
||||
started: Instant::now(),
|
||||
#[cfg(feature = "std")]
|
||||
span: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user