VirtualBox

Ignore:
Timestamp:
Jan 18, 2022 11:25:24 AM (3 years ago)
Author:
vboxsync
Message:

ValKit: VC++ 19.2 update 11 build adjustments (uint64_t -> double conversions). bugref:8489

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/network/NetPerf.cpp

    r93115 r93302  
    489489        RTTestIValue("Sends",               pSendStats->cTx,              RTTESTUNIT_PACKETS);
    490490        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);
    494494    }
    495495
     
    499499        RTTestIValue("Receives",            pRecvStats->cRx,              RTTESTUNIT_PACKETS);
    500500        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);
    504504    }
    505505}
     
    755755    RTTestIValue("Interval",            pStats->cNsElapsed,      RTTESTUNIT_NS);
    756756    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);
    760760    RTTestISubDone();
    761761}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette