Changeset 73639 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Aug 13, 2018 3:00:49 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/serial/SerialTest.cpp
r72031 r73639 381 381 static DECLCALLBACK(int) serialTestRunReadWrite(PSERIALTEST pSerialTest) 382 382 { 383 uint64_t tsStart = RTTime MilliTS();383 uint64_t tsStart = RTTimeNanoTS(); 384 384 bool fFailed = false; 385 385 SERIALTESTTXRXBUFCNT SerBufTx; … … 423 423 } 424 424 425 uint64_t tsRuntime = RTTimeMilliTS() - tsStart; 426 tsRuntime /= 1000; /* Seconds */ 427 RTTestValue(pSerialTest->hTest, "Throughput", g_cbTx / tsRuntime, RTTESTUNIT_BYTES_PER_SEC); 425 uint64_t tsRuntime = RTTimeNanoTS() - tsStart; 426 size_t cNsPerByte = tsRuntime / g_cbTx; 427 uint64_t cbBytesPerSec = RT_NS_1SEC / cNsPerByte; 428 RTTestValue(pSerialTest->hTest, "Throughput", cbBytesPerSec, RTTESTUNIT_BYTES_PER_SEC); 428 429 429 430 return rc; … … 439 440 static DECLCALLBACK(int) serialTestRunWrite(PSERIALTEST pSerialTest) 440 441 { 441 uint64_t tsStart = RTTime MilliTS();442 uint64_t tsStart = RTTimeNanoTS(); 442 443 SERIALTESTTXRXBUFCNT SerBufTx; 443 444 … … 458 459 } 459 460 460 uint64_t tsRuntime = RTTimeMilliTS() - tsStart; 461 tsRuntime /= 1000; /* Seconds */ 462 RTTestValue(pSerialTest->hTest, "Throughput", g_cbTx / tsRuntime, RTTESTUNIT_BYTES_PER_SEC); 461 uint64_t tsRuntime = RTTimeNanoTS() - tsStart; 462 size_t cNsPerByte = tsRuntime / g_cbTx; 463 uint64_t cbBytesPerSec = RT_NS_1SEC / cNsPerByte; 464 RTTestValue(pSerialTest->hTest, "Throughput", cbBytesPerSec, RTTESTUNIT_BYTES_PER_SEC); 463 465 464 466 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.