mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 22:31:06 +00:00
Remove mem_info and references to parity-util-mem (#12795)
* Remove mem_info and some references to parity-util-mem * [Draft] Finish removing references to `parity-util-mem` * Upgrade dependencies * Update scripts/ci/deny.toml Co-authored-by: ordian <write@reusable.software> * Fix Cargo.lock (remove unwanted dependency changes) * Removed unused argument * Run cargo fmt (didn't have pre-commit set up) * Fix some CI errors * Fix another CI error * Remove unused dependency Co-authored-by: ordian <write@reusable.software>
This commit is contained in:
@@ -2086,10 +2086,9 @@ impl<Block: BlockT> sc_client_api::backend::Backend<Block> for Backend<Block> {
|
||||
let state_cache = MemorySize::from_bytes(
|
||||
self.shared_trie_cache.as_ref().map_or(0, |c| c.used_memory_size()),
|
||||
);
|
||||
let state_db = self.storage.state_db.memory_info();
|
||||
|
||||
Some(UsageInfo {
|
||||
memory: MemoryInfo { state_cache, database_cache, state_db },
|
||||
memory: MemoryInfo { state_cache, database_cache },
|
||||
io: IoInfo {
|
||||
transactions: io_stats.transactions,
|
||||
bytes_read: io_stats.bytes_read,
|
||||
|
||||
@@ -59,15 +59,11 @@ pub struct Cache<B: BlockT> {
|
||||
|
||||
struct LRUMap<K, V>(LinkedHashMap<K, V>, usize, usize);
|
||||
|
||||
/// Internal trait similar to `heapsize` but using
|
||||
/// a simply estimation.
|
||||
/// Internal trait similar to `heapsize` but using a simple estimation.
|
||||
///
|
||||
/// This should not be made public, it is implementation
|
||||
/// detail trait. If it need to become public please
|
||||
/// consider using `malloc_size_of`.
|
||||
/// This should not be made public, it is an implementation detail trait.
|
||||
trait EstimateSize {
|
||||
/// Return a size estimation of additional size needed
|
||||
/// to cache this struct (in bytes).
|
||||
/// Return a size estimation of the additional size needed to cache this struct (in bytes).
|
||||
fn estimate_size(&self) -> usize;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user