Changeset 93302 in vbox for trunk/src/VBox/ValidationKit/utils/network/NetPerf.cpp
- Timestamp:
- Jan 18, 2022 11:25:24 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/network/NetPerf.cpp
r93115 r93302 489 489 RTTestIValue("Sends", pSendStats->cTx, RTTESTUNIT_PACKETS); 490 490 RTTestIValue("Send Interval", pSendStats->cNsElapsed, RTTESTUNIT_NS); 491 RTTestIValue("Send Throughput", (uint64_t)( cbPacket * pSendStats->cTx/ rdSecElapsed), RTTESTUNIT_BYTES_PER_SEC);492 RTTestIValue("Send Rate", (uint64_t)( pSendStats->cTx / rdSecElapsed), RTTESTUNIT_PACKETS_PER_SEC);493 RTTestIValue("Send Latency", (uint64_t)(rdSecElapsed / pSendStats->cTx * 1000000000.0), RTTESTUNIT_NS_PER_PACKET);491 RTTestIValue("Send Throughput", (uint64_t)((double)(cbPacket * pSendStats->cTx) / rdSecElapsed), RTTESTUNIT_BYTES_PER_SEC); 492 RTTestIValue("Send Rate", (uint64_t)((double)pSendStats->cTx / rdSecElapsed), RTTESTUNIT_PACKETS_PER_SEC); 493 RTTestIValue("Send Latency", (uint64_t)(rdSecElapsed / (double)pSendStats->cTx * 1000000000.0), RTTESTUNIT_NS_PER_PACKET); 494 494 } 495 495 … … 499 499 RTTestIValue("Receives", pRecvStats->cRx, RTTESTUNIT_PACKETS); 500 500 RTTestIValue("Receive Interval", pRecvStats->cNsElapsed, RTTESTUNIT_NS); 501 RTTestIValue("Receive Throughput", (uint64_t)( cbPacket * pRecvStats->cRx/ rdSecElapsed), RTTESTUNIT_BYTES_PER_SEC);502 RTTestIValue("Receive Rate", (uint64_t)( pRecvStats->cRx / rdSecElapsed), RTTESTUNIT_PACKETS_PER_SEC);503 RTTestIValue("Receive Latency", (uint64_t)(rdSecElapsed / pRecvStats->cRx * 1000000000.0), RTTESTUNIT_NS_PER_PACKET);501 RTTestIValue("Receive Throughput", (uint64_t)((double)(cbPacket * pRecvStats->cRx) / rdSecElapsed), RTTESTUNIT_BYTES_PER_SEC); 502 RTTestIValue("Receive Rate", (uint64_t)((double)pRecvStats->cRx / rdSecElapsed), RTTESTUNIT_PACKETS_PER_SEC); 503 RTTestIValue("Receive Latency", (uint64_t)(rdSecElapsed / (double)pRecvStats->cRx * 1000000000.0), RTTESTUNIT_NS_PER_PACKET); 504 504 } 505 505 } … … 755 755 RTTestIValue("Interval", pStats->cNsElapsed, RTTESTUNIT_NS); 756 756 RTTestIValue("Packet size", cbPacket, RTTESTUNIT_BYTES); 757 RTTestIValue("Average rate", (uint64_t)( pStats->cEchos / rdSecElapsed), RTTESTUNIT_PACKETS_PER_SEC);758 RTTestIValue("Average throughput", (uint64_t)( cbPacket * pStats->cEchos/ rdSecElapsed), RTTESTUNIT_BYTES_PER_SEC);759 RTTestIValue("Average latency", (uint64_t)(rdSecElapsed / pStats->cEchos * 1000000000.0), RTTESTUNIT_NS_PER_ROUND_TRIP);757 RTTestIValue("Average rate", (uint64_t)((double)pStats->cEchos / rdSecElapsed), RTTESTUNIT_PACKETS_PER_SEC); 758 RTTestIValue("Average throughput", (uint64_t)((double)(cbPacket * pStats->cEchos) / rdSecElapsed), RTTESTUNIT_BYTES_PER_SEC); 759 RTTestIValue("Average latency", (uint64_t)(rdSecElapsed / (double)pStats->cEchos * 1000000000.0), RTTESTUNIT_NS_PER_ROUND_TRIP); 760 760 RTTestISubDone(); 761 761 }
Note:
See TracChangeset
for help on using the changeset viewer.