pyquarkchain
pyquarkchain copied to clipboard
use tracemalloc and vmprof to track mem usage
FYI purpose, not going to merge at the moment
in the end, tracemalloc's compare_to() in snapshot helped identify the root cause of memory leak in #252
we can use this PR in the future if memory issue arises again
in addition to objgraph, tracking size of objects:
slave.add_block_futures
shard.state.new_block_pool
shard.add_block_futures
shard.state.db.m_header_pool
shard.state.db.m_meta_pool
shard.state.db.x_shard_set
shard.state.db.r_header_pool
shard.state.db.r_minor_header_pool
shard.state.db.height_to_minor_block_hashes
looks shard.state.db.height_to_minor_block_hashes
has steady increase over time but the count is not out of ordinary, will revisit with new testnet 23