Browse Source

Show TBM Queue size

openssl
orignal 21 hours ago
parent
commit
a248a2a732
  1. 1
      daemon/HTTPServer.cpp
  2. 1
      libi2pd/TransitTunnel.h
  3. 3
      libi2pd/Tunnel.h

1
daemon/HTTPServer.cpp

@ -701,6 +701,7 @@ namespace http {
{ {
s << "<b>" << tr("Tunnels") << ":</b><br>\r\n"; s << "<b>" << tr("Tunnels") << ":</b><br>\r\n";
s << "<b>" << tr("Queue size") << ":</b> " << i2p::tunnel::tunnels.GetQueueSize () << "<br>\r\n<br>\r\n"; s << "<b>" << tr("Queue size") << ":</b> " << i2p::tunnel::tunnels.GetQueueSize () << "<br>\r\n<br>\r\n";
s << "<b>" << tr("TBM Queue size") << ":</b> " << i2p::tunnel::tunnels.GetTBMQueueSize () << "<br>\r\n<br>\r\n";
auto ExplPool = i2p::tunnel::tunnels.GetExploratoryPool (); auto ExplPool = i2p::tunnel::tunnels.GetExploratoryPool ();

1
libi2pd/TransitTunnel.h

@ -149,6 +149,7 @@ namespace tunnel
// for HTTP only // for HTTP only
const auto& GetTransitTunnels () const { return m_TransitTunnels; }; const auto& GetTransitTunnels () const { return m_TransitTunnels; };
size_t GetTunnelBuildMsgQueueSize () const { return m_TunnelBuildMsgQueue.GetSize (); };
}; };
} }
} }

3
libi2pd/Tunnel.h

@ -327,7 +327,8 @@ namespace tunnel
size_t CountInboundTunnels() const; size_t CountInboundTunnels() const;
size_t CountOutboundTunnels() const; size_t CountOutboundTunnels() const;
int GetQueueSize () { return m_Queue.GetSize (); }; size_t GetQueueSize () const { return m_Queue.GetSize (); };
size_t GetTBMQueueSize () const { return m_TransitTunnels.GetTunnelBuildMsgQueueSize (); };
int GetTunnelCreationSuccessRate () const { return std::round(m_TunnelCreationSuccessRate * 100); } // in percents int GetTunnelCreationSuccessRate () const { return std::round(m_TunnelCreationSuccessRate * 100); } // in percents
double GetPreciseTunnelCreationSuccessRate () const { return m_TunnelCreationSuccessRate * 100; } // in percents double GetPreciseTunnelCreationSuccessRate () const { return m_TunnelCreationSuccessRate * 100; } // in percents
int GetTotalTunnelCreationSuccessRate () const // in percents int GetTotalTunnelCreationSuccessRate () const // in percents

Loading…
Cancel
Save