From 752e74d33cdefd2bcbe9ab8218d29db1321fced3 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Tue, 15 Nov 2016 14:42:18 -0500 Subject: [PATCH] show latency of tunnels in web ui --- HTTPServer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/HTTPServer.cpp b/HTTPServer.cpp index 556051aa..bf0a3159 100644 --- a/HTTPServer.cpp +++ b/HTTPServer.cpp @@ -300,12 +300,16 @@ namespace http { s << "Inbound tunnels:
\r\n"; for (auto & it : pool->GetInboundTunnels ()) { it->Print(s); + if(it->LatencyIsKnown()) + s << " ( " << it->GetMeanLatency() << "ms )"; ShowTunnelDetails(s, it->GetState (), it->GetNumReceivedBytes ()); } s << "
\r\n"; s << "Outbound tunnels:
\r\n"; for (auto & it : pool->GetOutboundTunnels ()) { it->Print(s); + if(it->LatencyIsKnown()) + s << " ( " << it->GetMeanLatency() << "ms )"; ShowTunnelDetails(s, it->GetState (), it->GetNumSentBytes ()); } } @@ -401,12 +405,16 @@ namespace http { s << "Inbound tunnels:
\r\n"; for (auto & it : i2p::tunnel::tunnels.GetInboundTunnels ()) { it->Print(s); + if(it->LatencyIsKnown()) + s << " ( " << it->GetMeanLatency() << "ms )"; ShowTunnelDetails(s, it->GetState (), it->GetNumReceivedBytes ()); } s << "
\r\n"; s << "Outbound tunnels:
\r\n"; for (auto & it : i2p::tunnel::tunnels.GetOutboundTunnels ()) { it->Print(s); + if(it->LatencyIsKnown()) + s << " ( " << it->GetMeanLatency() << "ms )"; ShowTunnelDetails(s, it->GetState (), it->GetNumSentBytes ()); } s << "
\r\n";