History

Only keep aggregated thread stats

Clement committed 7 years ago

Commit cfbb4e21 parent b9217e26 files · +8 −100Browse files

Showing the changes to libraries/networking/src/ThreadedAssignment.cpp (1 of 6 files). Show all

Unified · Split

libraries/networking/src/ThreadedAssignment.cpp+4−8
@@ -94,15 +94,11 @@ void ThreadedAssignment::commonInit(const QString& targetName, NodeType_t nodeTy · 93 unmodified lines
9494 void ThreadedAssignment::addPacketStatsAndSendStatsPacket(QJsonObject statsObject) {
9595 auto nodeList = DependencyManager::get<NodeList>();
9696
97− float packetsInPerSecond, bytesInPerSecond, packetsOutPerSecond, bytesOutPerSecond;
98− nodeList->getPacketStats(packetsInPerSecond, bytesInPerSecond, packetsOutPerSecond, bytesOutPerSecond);
99− nodeList->resetPacketStats();
100−
10197 QJsonObject ioStats;
102− ioStats["inbound_bytes_per_s"] = bytesInPerSecond;
103− ioStats["inbound_packets_per_s"] = packetsInPerSecond;
104− ioStats["outbound_bytes_per_s"] = bytesOutPerSecond;
105− ioStats["outbound_packets_per_s"] = packetsOutPerSecond;
98+ ioStats["inbound_kbps"] = nodeList->getInboundKbps();
99+ ioStats["inbound_pps"] = nodeList->getInboundPPS();
100+ ioStats["outbound_kbps"] = nodeList->getOutboundKbps();
101+ ioStats["outbound_pps"] = nodeList->getOutboundPPS();
106102
107103 statsObject["io_stats"] = ioStats;
108104