chain_mem_used function on client
This commit is contained in:
parent
bdf90df56f
commit
0688ccb003
@ -186,6 +186,13 @@ impl Client {
|
||||
pub fn report(&self) -> ClientReport {
|
||||
::std::mem::replace(&mut *self.report.write(), ClientReport::default())
|
||||
}
|
||||
|
||||
/// Get blockchain mem usage in bytes.
|
||||
pub fn chain_mem_used(&self) -> usize {
|
||||
use util::HeapSizeOf;
|
||||
|
||||
self.chain.heap_size_of_children()
|
||||
}
|
||||
}
|
||||
|
||||
impl LightChainClient for Client {
|
||||
|
Loading…
Reference in New Issue
Block a user