mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 23:21:06 +00:00
Full block import benchmark (#4865)
* full block import benchmark * try rocksdb cache * add profiling helper * use random keyring instead of zero caching * update docs * add more io stats * remove last sentence * add ci job to see * Update primitives/keyring/src/sr25519.rs Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com> * switch to 100tx-block * remove ci script Co-authored-by: Marcio Diaz <marcio@parity.io>
This commit is contained in:
@@ -125,6 +125,8 @@ pub struct IoInfo {
|
||||
pub state_reads: u64,
|
||||
/// State reads (keys) from cache.
|
||||
pub state_reads_cache: u64,
|
||||
/// State reads (keys) from cache.
|
||||
pub state_writes: u64,
|
||||
}
|
||||
|
||||
/// Usage statistics for running client instance.
|
||||
@@ -143,7 +145,7 @@ pub struct UsageInfo {
|
||||
impl fmt::Display for UsageInfo {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f,
|
||||
"caches: ({} state, {} db overlay), i/o: ({} tx, {} write, {} read, {} avg tx, {}/{} key cache reads/total)",
|
||||
"caches: ({} state, {} db overlay), i/o: ({} tx, {} write, {} read, {} avg tx, {}/{} key cache reads/total, {} key writes)",
|
||||
self.memory.state_cache,
|
||||
self.memory.database_cache,
|
||||
self.io.transactions,
|
||||
@@ -152,6 +154,7 @@ impl fmt::Display for UsageInfo {
|
||||
self.io.average_transaction_size,
|
||||
self.io.state_reads_cache,
|
||||
self.io.state_reads,
|
||||
self.io.state_writes,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1472,6 +1472,7 @@ impl<Block: BlockT> sc_client_api::backend::Backend<Block> for Backend<Block> {
|
||||
average_transaction_size: io_stats.avg_transaction_size() as u64,
|
||||
state_reads: state_stats.reads.ops,
|
||||
state_reads_cache: state_stats.cache_reads.ops,
|
||||
state_writes: state_stats.writes.ops,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -592,6 +592,7 @@ impl<Block> LightBlockchainStorage<Block> for LightStorage<Block>
|
||||
// Light client does not track those
|
||||
state_reads: 0,
|
||||
state_reads_cache: 0,
|
||||
state_writes: 0,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user