Showing the changes to libraries/networking/src/ThreadedAssignment.cpp (1 of 6 files). Show all
Unified · Split
| @@ -94,15 +94,11 @@ void ThreadedAssignment::commonInit(const QString& targetName, NodeType_t nodeTy · 93 unmodified lines | ||
| 94 | 94 | void ThreadedAssignment::addPacketStatsAndSendStatsPacket(QJsonObject statsObject) { |
| 95 | 95 | auto nodeList = DependencyManager::get<NodeList>(); |
| 96 | 96 | |
| 97 | − float packetsInPerSecond, bytesInPerSecond, packetsOutPerSecond, bytesOutPerSecond; | |
| 98 | − nodeList->getPacketStats(packetsInPerSecond, bytesInPerSecond, packetsOutPerSecond, bytesOutPerSecond); | |
| 99 | − nodeList->resetPacketStats(); | |
| 100 | − | |
| 101 | 97 | 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(); | |
| 106 | 102 | |
| 107 | 103 | statsObject["io_stats"] = ioStats; |
| 108 | 104 | |