change net debug logging to kB/s
This commit is contained in:
parent
6208636d69
commit
658fab846e
@ -41,9 +41,6 @@ void PacketStatCollector::calculate() {
|
||||
m_lastMixTime = currentTime;
|
||||
m_stats.worstPacketSize = 0;
|
||||
|
||||
if (abs(elapsedTime) - m_calculationWindow < 0.0125f)
|
||||
elapsedTime = m_calculationWindow;
|
||||
|
||||
for (auto& pair : m_unmixed) {
|
||||
if (pair.second > m_stats.worstPacketSize) {
|
||||
m_stats.worstPacketType = pair.first;
|
||||
|
@ -296,13 +296,12 @@ void UniverseClient::update(float dt) {
|
||||
m_celestialDatabase->cleanup();
|
||||
|
||||
if (auto netStats = m_connection->incomingStats()) {
|
||||
LogMap::set("net_incoming_bps", netStats->bytesPerSecond);
|
||||
LogMap::set("net_worst_incoming", strf("{}:{}", PacketTypeNames.getRight(netStats->worstPacketType), netStats->worstPacketSize));
|
||||
LogMap::set("net_total_incoming", strf("{:4.3f} kB/s", netStats->bytesPerSecond / 1000.f));
|
||||
LogMap::set("net_worst_incoming", strf("^cyan;{}^reset; ({:4.3f} kB/s)", PacketTypeNames.getRight(netStats->worstPacketType), (float)netStats->worstPacketSize / 1000.f));
|
||||
}
|
||||
if (auto netStats = m_connection->outgoingStats()) {
|
||||
LogMap::set("net_outgoing_bps", netStats->bytesPerSecond);
|
||||
LogMap::set("net_worst_outgoing",
|
||||
strf("{}:{}", PacketTypeNames.getRight(netStats->worstPacketType), netStats->worstPacketSize));
|
||||
LogMap::set("net_total_outgoing", strf("{:4.3f} kB/s", netStats->bytesPerSecond / 1000.f));
|
||||
LogMap::set("net_worst_outgoing", strf("^cyan;{}^reset; ({:4.3f} kB/s)", PacketTypeNames.getRight(netStats->worstPacketType), (float)netStats->worstPacketSize / 1000.f));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user