Changeset 61870 in vbox for trunk/src/VBox/Runtime/testcase
- Timestamp:
- Jun 24, 2016 6:38:49 AM (8 years ago)
- Location:
- trunk/src/VBox/Runtime/testcase
- Files:
-
- 2 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 } -
trunk/src/VBox/Runtime/testcase/tstRTSemRW.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/string.h> … … 466 467 if (Test1()) 467 468 { 469 RTCPUID cCores = RTMpGetOnlineCoreCount(); 468 470 if (argc == 1) 469 471 { … … 479 481 Test4( 10, 10, 10, false, false); 480 482 481 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "benchmarking...\n"); 482 for (unsigned cThreads = 1; cThreads < 32; cThreads++) 483 Test4(cThreads, 2, 1, false, true); 483 if (cCores > 1) 484 { 485 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "benchmarking (%u CPU cores)...\n", cCores); 486 for (unsigned cThreads = 1; cThreads < 32; cThreads++) 487 Test4(cThreads, 2, 1, false, true); 488 } 489 else 490 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "skipping benchmarking (only %u CPU core available)\n", cCores); 484 491 485 492 /** @todo add a testcase where some stuff times out. */ … … 487 494 else 488 495 { 489 /* threads, seconds, writePercent, yield, quiet */ 490 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "benchmarking...\n"); 491 Test4( 1, 3, 1, false, true); 492 Test4( 1, 3, 1, false, true); 493 Test4( 1, 3, 1, false, true); 494 Test4( 2, 3, 1, false, true); 495 Test4( 2, 3, 1, false, true); 496 Test4( 2, 3, 1, false, true); 497 Test4( 3, 3, 1, false, true); 498 Test4( 3, 3, 1, false, true); 499 Test4( 3, 3, 1, false, true); 496 if (cCores > 1) 497 { 498 /* threads, seconds, writePercent, yield, quiet */ 499 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "benchmarking...\n"); 500 Test4( 1, 3, 1, false, true); 501 Test4( 1, 3, 1, false, true); 502 Test4( 1, 3, 1, false, true); 503 Test4( 2, 3, 1, false, true); 504 Test4( 2, 3, 1, false, true); 505 Test4( 2, 3, 1, false, true); 506 Test4( 3, 3, 1, false, true); 507 Test4( 3, 3, 1, false, true); 508 Test4( 3, 3, 1, false, true); 509 } 510 else 511 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "skipping benchmarking (only %u CPU core available)\n", cCores); 500 512 } 501 513 }
Note:
See TracChangeset
for help on using the changeset viewer.