Changeset 61870 in vbox for trunk/src/VBox/Runtime/testcase/tstRTCritSectRw.cpp
- Timestamp:
- Jun 24, 2016 6:38:49 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 108286
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstRTCritSectRw.cpp
r57358 r61870 36 36 #include <iprt/initterm.h> 37 37 #include <iprt/lockvalidator.h> 38 #include <iprt/mp.h> 38 39 #include <iprt/rand.h> 39 40 #include <iprt/semaphore.h> … … 454 455 if (Test1()) 455 456 { 457 RTCPUID cCores = RTMpGetOnlineCoreCount(); 456 458 if (argc == 1) 457 459 { … … 466 468 Test4( 10, 10, 10, false, false); 467 469 468 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "benchmarking...\n"); 469 for (unsigned cThreads = 1; cThreads < 32; cThreads++) 470 if (cCores > 1) 471 { 472 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "benchmarking (%u CPU cores)...\n", cCores); 473 for (unsigned cThreads = 1; cThreads < 32; cThreads++) 470 474 Test4(cThreads, 2, 1, false, true); 475 } 476 else 477 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "skipping benchmarking (only %u core available)\n", cCores); 471 478 472 479 /** @todo add a testcase where some stuff times out. */ … … 474 481 else 475 482 { 476 /* threads, seconds, writePercent, yield, quiet */ 477 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "benchmarking...\n"); 478 Test4( 1, 3, 1, false, true); 479 Test4( 1, 3, 1, false, true); 480 Test4( 1, 3, 1, false, true); 481 Test4( 2, 3, 1, false, true); 482 Test4( 2, 3, 1, false, true); 483 Test4( 2, 3, 1, false, true); 484 Test4( 3, 3, 1, false, true); 485 Test4( 3, 3, 1, false, true); 486 Test4( 3, 3, 1, false, true); 483 if (cCores > 1) 484 { 485 /* threads, seconds, writePercent, yield, quiet */ 486 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "benchmarking (%u CPU cores)...\n", cCores); 487 Test4( 1, 3, 1, false, true); 488 Test4( 1, 3, 1, false, true); 489 Test4( 1, 3, 1, false, true); 490 Test4( 2, 3, 1, false, true); 491 Test4( 2, 3, 1, false, true); 492 Test4( 2, 3, 1, false, true); 493 Test4( 3, 3, 1, false, true); 494 Test4( 3, 3, 1, false, true); 495 Test4( 3, 3, 1, false, true); 496 } 497 else 498 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "skipping benchmarking (only %u core available)\n", cCores); 487 499 } 488 500 }
Note:
See TracChangeset
for help on using the changeset viewer.