Changeset 70404 in vbox for trunk/src/VBox/ValidationKit/utils
- Timestamp:
- Jan 1, 2018 3:30:25 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/network/NetPerf.cpp
r69111 r70404 234 234 { "--daemonized", 'D', RTGETOPT_REQ_NOTHING }, 235 235 { "--check-data", 'C', RTGETOPT_REQ_NOTHING }, 236 { "--verbose", 'v', RTGETOPT_REQ_NOTHING }, 236 237 { "--help", 'h', RTGETOPT_REQ_NOTHING } /* for Usage() */ 237 238 }; … … 239 240 /** The test handle. */ 240 241 static RTTEST g_hTest; 242 /** Verbosity level. */ 243 static uint32_t g_uVerbosity = 0; 241 244 242 245 … … 301 304 pszHelp = "Check payload data at the receiving end"; 302 305 break; 306 case 'v': 307 pszHelp = "Verbose execution."; 308 break; 303 309 default: 304 310 pszHelp = "Option undocumented"; … … 323 329 { 324 330 bool volatile *pfStop = (bool volatile *)pvUser; 325 /* RTPrintf("Time's Up!\n");*/ 331 if (g_uVerbosity > 0) 332 RTPrintf("Time's Up!\n"); 326 333 ASMAtomicWriteBool(pfStop, true); 327 334 NOREF(hTimer); NOREF(iTick); … … 518 525 * Warm up. 519 526 */ 527 if (g_uVerbosity > 0) 528 RTPrintf("Warmup...\n"); 520 529 pBuf->u32State = RT_H2LE_U32_C(NETPERFHDR_WARMUP); 521 530 rc = RTTimerLRStart(hTimer, pParams->cMsWarmup * UINT64_C(1000000) /* nsec */); … … 542 551 if (RT_SUCCESS(rc)) 543 552 { 553 if (g_uVerbosity > 0) 554 RTPrintf("The real thing...\n"); 544 555 pBuf->u32State = RT_H2LE_U32_C(NETPERFHDR_TESTING); 545 556 fStop = false; … … 571 582 if (RT_SUCCESS(rc)) 572 583 { 584 if (g_uVerbosity > 0) 585 RTPrintf("Cool down...\n"); 573 586 pBuf->u32State = RT_H2LE_U32_C(NETPERFHDR_COOL_DOWN); 574 587 fStop = false; … … 595 608 * Send DONE packet. 596 609 */ 610 if (g_uVerbosity > 0) 611 RTPrintf("Done\n"); 597 612 if (RT_SUCCESS(rc)) 598 613 { … … 1443 1458 * Warm up. 1444 1459 */ 1460 if (g_uVerbosity > 0) 1461 RTPrintf("Warmup...\n"); 1445 1462 rc = RTTimerLRStart(hTimer, pParams->cMsWarmup * UINT64_C(1000000) /* nsec */); 1446 1463 if (RT_SUCCESS(rc)) … … 1474 1491 if (RT_SUCCESS(rc)) 1475 1492 { 1493 if (g_uVerbosity > 0) 1494 RTPrintf("The real thing...\n"); 1476 1495 fStop = false; 1477 1496 rc = RTTimerLRStart(hTimer, pParams->cSecTimeout * UINT64_C(1000000000) /* nsec */); … … 1517 1536 if (RT_SUCCESS(rc)) 1518 1537 { 1538 if (g_uVerbosity > 0) 1539 RTPrintf("Cool down...\n"); 1519 1540 fStop = false; 1520 1541 rc = RTTimerLRStart(hTimer, pParams->cMsCoolDown * UINT64_C(1000000) /* nsec */); … … 1548 1569 * Send DONE packet. 1549 1570 */ 1571 if (g_uVerbosity > 0) 1572 RTPrintf("Done\n"); 1550 1573 if (RT_SUCCESS(rc)) 1551 1574 { … … 1758 1781 bool fPacketSizeSet = false; 1759 1782 const char *pszServerAddress= NULL; 1783 1760 1784 NETPERFPARAMS Params; 1761 1762 1785 Params.uPort = NETPERF_DEFAULT_PORT; 1763 1786 Params.fServerStats = false; … … 1861 1884 break; 1862 1885 1886 case 'v': 1887 g_uVerbosity++; 1888 break; 1889 1863 1890 case 'h': 1864 1891 Usage(g_pStdOut);
Note:
See TracChangeset
for help on using the changeset viewer.