Skip to content

Commit

Permalink
add logging about cnode sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
amitiuttarwar committed Oct 18, 2023
1 parent 3beae57 commit 83a3e20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,15 @@ size_t CNode::DynamicMemoryUsage() const {
//LOCK(cs_vRecv);

val += memusage::DynamicUsage(m_transport);
LogPrintf("ABCD DynamicUsage(m_transport): %d\n", memusage::DynamicUsage(m_transport));
val += memusage::DynamicUsage(m_sock);
val += m_send_memusage; // should represent memory usage of vSendMsg
auto calc_val = memusage::DynamicUsage(vSendMsg);
LogPrintf("ABCD m_send_memusage: %d, calculated value of vSendMsg %d\n", m_send_memusage, calc_val);
val += memusage::DynamicUsage(vRecvMsg);
val += memusage::DynamicUsage(m_msg_process_queue);
val += m_msg_process_queue_size; // should represent memory usage of m_msg_process_queue
auto calc_val_2 = memusage::DynamicUsage(m_msg_process_queue);
LogPrintf("ABCD m_msg_process_queue_size: %d, calculated value of m_msg_process_queue %d\n", m_msg_process_queue_size, calc_val_2);
val += memusage::DynamicUsage(mapSendBytesPerMsgType);
val += memusage::DynamicUsage(mapRecvBytesPerMsgType);
val += memusage::DynamicUsage(m_i2p_sam_session);
Expand Down

0 comments on commit 83a3e20

Please sign in to comment.