Add parameter for show TCSR with old algorithm and it's realization

This commit is contained in:
weko 2023-02-01 14:06:28 +03:00
parent 89695a7040
commit 22b1066b0a
4 changed files with 19 additions and 2 deletions

View file

@ -289,6 +289,11 @@ namespace http {
if (family.length () > 0)
s << "<b>"<< tr("Family") << ":</b> " << family << "<br>\r\n";
s << "<b>" << tr("Tunnel creation success rate") << ":</b> " << i2p::tunnel::tunnels.GetTunnelCreationSuccessRate () << "%<br>\r\n";
bool isOldTCSR;
i2p::config::GetOption("http.old_tcsr", isOldTCSR);
if (isOldTCSR) {
s << "<b>" << tr("Tunnel creation success rate (old algorithm)") << ":</b> " << i2p::tunnel::tunnels.OldGetTunnelCreationSuccessRate() << "%<br/>\r\n";
}
s << "<b>" << tr("Received") << ":</b> ";
ShowTraffic (s, i2p::transport::transports.GetTotalReceivedBytes ());
s << " (" << tr(/* tr: Kibibyte/s */ "%.2f KiB/s", (double) i2p::transport::transports.GetInBandwidth15s () / 1024) << ")<br>\r\n";