diff --git a/HTTPServer.cpp b/HTTPServer.cpp
index 67ddf362..1aa5d273 100644
--- a/HTTPServer.cpp
+++ b/HTTPServer.cpp
@@ -421,10 +421,25 @@ namespace util
}
s << "
\r\n";
s << "Tunnel creation success rate: " << i2p::tunnel::tunnels.GetTunnelCreationSuccessRate () << "%
\r\n";
- s << "Received: " << i2p::transport::transports.GetTotalReceivedBytes ()/1000 << "K";
- s << " (" << i2p::transport::transports.GetInBandwidth () <<" Bps)
\r\n";
- s << "Sent: " << i2p::transport::transports.GetTotalSentBytes ()/1000 << "K";
- s << " (" << i2p::transport::transports.GetOutBandwidth () <<" Bps)
\r\n";
+ s << "Received: ";
+ s << std::fixed << std::setprecision(2);
+ auto numKBytesReceived = (double) i2p::transport::transports.GetTotalReceivedBytes () / 1024;
+ if (numKBytesReceived < 1024)
+ s << numKBytesReceived << " KiB";
+ else if (numKBytesReceived < 1024 * 1024)
+ s << numKBytesReceived / 1024 << " MiB";
+ else
+ s << numKBytesReceived / 1024 / 1024 << " GiB";
+ s << " (" << (double) i2p::transport::transports.GetInBandwidth () / 1024 << " KiB/s)
\r\n";
+ s << "Sent: ";
+ auto numKBytesSent = (double) i2p::transport::transports.GetTotalSentBytes () / 1024;
+ if (numKBytesSent < 1024)
+ s << numKBytesSent << " KiB";
+ else if (numKBytesSent < 1024 * 1024)
+ s << numKBytesSent / 1024 << " MiB";
+ else
+ s << numKBytesSent / 1024 / 1024 << " GiB";
+ s << " (" << (double) i2p::transport::transports.GetOutBandwidth () / 1024 << " KiB/s)
\r\n";
s << "Data path: " << i2p::fs::GetDataDir() << "
\r\n
\r\n";
s << "Our external address:" << "
\r\n" ;
for (auto address : i2p::context.GetRouterInfo().GetAddresses())