diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-09-18 22:27:12 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-09-18 22:27:12 +0000 |
commit | b0be42e7a87f7e980088e444f83d1a37d68684a3 (patch) | |
tree | 38b44057394eb38276c30cd65d84b212d89b66e9 /TAO/performance-tests | |
parent | 83ab0384b08114233fc5c1ffa1e66a40f5258749 (diff) | |
download | ATCD-b0be42e7a87f7e980088e444f83d1a37d68684a3.tar.gz |
ChangeLogTag: Tue Sep 18 17:18:35 2001 Irfan Pyarali <irfan@cs.wustl.edu>
Diffstat (limited to 'TAO/performance-tests')
-rw-r--r-- | TAO/performance-tests/RTCorba/Thread_Pool/client.cpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/TAO/performance-tests/RTCorba/Thread_Pool/client.cpp b/TAO/performance-tests/RTCorba/Thread_Pool/client.cpp index 39f853ee336..00ca10e723b 100644 --- a/TAO/performance-tests/RTCorba/Thread_Pool/client.cpp +++ b/TAO/performance-tests/RTCorba/Thread_Pool/client.cpp @@ -453,8 +453,10 @@ Continuous_Worker::svc (void) // Collective samples. history.collect_basic_stats (this->collective_stats_); - this->time_for_test_ = + ACE_hrtime_t elapsed_time_for_current_thread = test_end - test_start; + if (elapsed_time_for_current_thread > this->time_for_test_) + this->time_for_test_ = elapsed_time_for_current_thread; } ACE_CATCHANY { @@ -469,12 +471,29 @@ Continuous_Worker::svc (void) int max_throughput (test_ptr test, + RTCORBA::Current_ptr current, + RTCORBA::PriorityMapping &priority_mapping, CORBA::ULong &max_rate) { CORBA::ULong calls_made = 0; + CORBA::Short CORBA_priority = 0; + CORBA::Short native_priority = 0; ACE_TRY_NEW_ENV { + CORBA_priority = + current->the_priority (ACE_TRY_ENV); + ACE_TRY_CHECK; + + CORBA::Boolean result = + priority_mapping.to_native (CORBA_priority, + native_priority); + if (!result) + ACE_ERROR_RETURN ((LM_ERROR, + "Error in converting CORBA priority %d to native priority\n", + CORBA_priority), + -1); + ACE_Time_Value start = ACE_OS::gettimeofday (); @@ -508,7 +527,9 @@ max_throughput (test_ptr test, calls_made / max_throughput_timeout; ACE_DEBUG ((LM_DEBUG, - "\nMax rate calculations => %d calls in %d seconds; Max rate = %d\n", + "\nPriority = %d/%d; Max rate calculations => %d calls in %d seconds; Max rate = %d\n", + CORBA_priority, + native_priority, calls_made, max_throughput_timeout, max_rate)); @@ -577,6 +598,8 @@ main (int argc, char *argv[]) CORBA::ULong max_rate = 0; result = max_throughput (test.in (), + current.in (), + priority_mapping, max_rate); if (result != 0) return result; |