Skip to content

Commit

Permalink
Show TBM Queue size
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Nov 20, 2024
1 parent 09ae278 commit a248a2a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions daemon/HTTPServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ namespace http {
{
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("TBM Queue size") << ":</b> " << i2p::tunnel::tunnels.GetTBMQueueSize () << "<br>\r\n<br>\r\n";

auto ExplPool = i2p::tunnel::tunnels.GetExploratoryPool ();

Expand Down
1 change: 1 addition & 0 deletions libi2pd/TransitTunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ namespace tunnel

// for HTTP only
const auto& GetTransitTunnels () const { return m_TransitTunnels; };
size_t GetTunnelBuildMsgQueueSize () const { return m_TunnelBuildMsgQueue.GetSize (); };
};
}
}
Expand Down
3 changes: 2 additions & 1 deletion libi2pd/Tunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ namespace tunnel
size_t CountInboundTunnels() 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
double GetPreciseTunnelCreationSuccessRate () const { return m_TunnelCreationSuccessRate * 100; } // in percents
int GetTotalTunnelCreationSuccessRate () const // in percents
Expand Down

0 comments on commit a248a2a

Please sign in to comment.