diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-05-15 18:40:50 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-05-15 18:40:50 +0000 |
commit | 80b685788593ffc78ef05ef3bd5fe44557fbb371 (patch) | |
tree | 9423a3c8c30c44d858a16f23c79e52cb3a731a61 /performance-tests | |
parent | fbbba06cf15f5f6cd8dc2c2a21fc74e5d4de8bfd (diff) | |
download | ATCD-80b685788593ffc78ef05ef3bd5fe44557fbb371.tar.gz |
fixed printout of context switch time for other then the default number
of iterations
Diffstat (limited to 'performance-tests')
-rw-r--r-- | performance-tests/Misc/context_switch_time.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/performance-tests/Misc/context_switch_time.cpp b/performance-tests/Misc/context_switch_time.cpp index a299b17e058..00039f53542 100644 --- a/performance-tests/Misc/context_switch_time.cpp +++ b/performance-tests/Misc/context_switch_time.cpp @@ -19,8 +19,7 @@ // <em>reprinted by <a href="http://www.wrs.com/artreqfm.html">Wind River // Systems</a></em><p> // which in turn is based on Superconducting Super Collider (SSC) -// Ping Suspend/Resume Task and Suspend/Resume Task benchmarks. -// Laboratory benchmark +// Laboratory Ping Suspend/Resume Task and Suspend/Resume Task benchmarks. // It measures two different times: // 1) The time to resume a blocked high priority task, which does // nothing other than block immediately. A lower priority task @@ -37,11 +36,6 @@ // LWPs for new threads (THR_NEW_LWP). The -n option enables the use of // THR_NEW_LWP for testing. // -// On Solaris 2.5.1, real-time threads must be bound to LWPs (using the -// THR_BOUND flag), so that they can compete for system-wide resources. -// In other words, if a thread is bound to an LWP, then the kernel is -// aware of it. -// // = CREATION DATE // 17 January 1997 // @@ -762,10 +756,10 @@ main (int argc, char *argv []) ACE_DEBUG ((LM_INFO, "context switch time from yield test is %u.%03u " "microseconds\n", (ACE_UINT32) - (yield_test.elapsed_time () / num_iterations / 2), + (yield_test.elapsed_time () / num_iterations / 2u), (ACE_UINT32) - (yield_test.elapsed_time () % (ACE_UINT32) 2000u) / - (num_iterations / 1000u) / 2u)); + (yield_test.elapsed_time () % (num_iterations * 2u)) * + 1000u / num_iterations / 2u)); } return 0; |