Lines Matching defs:pStats

334  * @param   pStats              The stats to send.
337 static int netperfSendStats(NETPERFSTATS const *pStats, RTSOCKET hSocket)
343 pStats->cTx,
344 pStats->cRx,
345 pStats->cEchos,
346 pStats->cErrors,
347 pStats->cNsElapsed);
376 * @param pStats Where to receive the stats.
379 static int netperfRecvStats(NETPERFSTATS *pStats, RTSOCKET hSocket)
421 &pStats->cTx,
422 &pStats->cRx,
423 &pStats->cEchos,
424 &pStats->cErrors,
425 &pStats->cNsElapsed
621 * @param pStats Where to return the statistics.
623 static int netperfTCPThroughputRecv(NETPERFPARAMS const *pParams, NETPERFHDR *pBuf, NETPERFSTATS *pStats)
625 RT_ZERO(*pStats);
638 pStats->cErrors++;
645 pStats->cErrors++;
654 pStats->cErrors++;
668 pStats->cErrors++;
690 pStats->cNsElapsed = RTTimeNanoTS() - u64StartTS;
691 pStats->cRx = cRx + 1;
704 pStats->cErrors++;
720 * @param pStats The statistics.
722 static void netperfPrintLatencyStats(NETPERFSTATS const *pStats, uint32_t cbPacket)
724 double rdSecElapsed = (double)pStats->cNsElapsed / 1000000000.0;
725 RTTestIValue("Transmitted", pStats->cTx, RTTESTUNIT_PACKETS);
726 RTTestIValue("Successful echos", pStats->cEchos, RTTESTUNIT_PACKETS);
727 RTTestIValue("Errors", pStats->cErrors, RTTESTUNIT_PACKETS);
728 RTTestIValue("Interval", pStats->cNsElapsed, RTTESTUNIT_NS);
730 RTTestIValue("Average rate", (uint64_t)(pStats->cEchos / rdSecElapsed), RTTESTUNIT_PACKETS_PER_SEC);
731 RTTestIValue("Average throughput", (uint64_t)(cbPacket * pStats->cEchos / rdSecElapsed), RTTESTUNIT_BYTES_PER_SEC);
732 RTTestIValue("Average latency", (uint64_t)(rdSecElapsed / pStats->cEchos * 1000000000.0), RTTESTUNIT_NS_PER_ROUND_TRIP);