diff options
Diffstat (limited to 'TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/client.cpp')
-rw-r--r-- | TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/client.cpp | 65 |
1 files changed, 23 insertions, 42 deletions
diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/client.cpp b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/client.cpp index a3caafe3b54..22ba06395b5 100644 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/client.cpp +++ b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/client.cpp @@ -34,21 +34,18 @@ public: { } - virtual void run_test (ACE_ENV_SINGLE_ARG_DECL) = 0; + virtual void run_test (void) = 0; virtual int svc (void) { this->barrier_->wait (); - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { - this->run_test (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->run_test (); } - ACE_CATCHANY + catch (const CORBA::Exception&) { } - ACE_ENDTRY; ACE_DEBUG ((LM_DEBUG, "(%P|%t) done...\n")); return 0; @@ -76,25 +73,23 @@ public: { } - virtual void run_test (ACE_ENV_SINGLE_ARG_DECL) + virtual void run_test (void) { for (int i = 0; i != this->iterations_; ++i) { ACE_Time_Value period (0, this->period_in_usecs_); ACE_OS::sleep (period); - ACE_TRY { + try{ ACE_hrtime_t start = ACE_OS::gethrtime (); (void) this->roundtrip_->test_method (start, - this->workload_ - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + this->workload_); ACE_hrtime_t elapsed = ACE_OS::gethrtime () - start; this->sample_history.sample (elapsed); - } ACE_CATCHANY { - } ACE_ENDTRY; + } catch (const CORBA::Exception&) { + } } } @@ -128,7 +123,7 @@ public: this->stopped_ = 1; } - virtual void run_test (ACE_ENV_SINGLE_ARG_DECL) + virtual void run_test (void) { for (;;) { @@ -141,15 +136,13 @@ public: return; } - ACE_TRY { + try{ CORBA::ULongLong dummy = 0; (void) this->roundtrip_->test_method (dummy, - this->workload_ - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + this->workload_); - } ACE_CATCHANY { - } ACE_ENDTRY; + } catch (const CORBA::Exception&) { + } } } @@ -167,11 +160,9 @@ int main (int argc, char *argv[]) { RT_Class rt_class; - ACE_TRY_NEW_ENV + try { - ORB_Holder orb (argc, argv, "" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + ORB_Holder orb (argc, argv, ""); Client_Options options (argc, argv); if (argc != 1) @@ -195,25 +186,18 @@ int main (int argc, char *argv[]) RTClient_Setup rtclient_setup (options.use_rt_corba, orb, rt_class, - options.nthreads - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + options.nthreads); ACE_DEBUG ((LM_DEBUG, "Finished ORB and POA configuration\n")); CORBA::Object_var object = - orb->string_to_object (options.ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->string_to_object (options.ior); Test::Roundtrip_var roundtrip = - Test::Roundtrip::_narrow (object.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + Test::Roundtrip::_narrow (object.in ()); CORBA::PolicyList_var inconsistent_policies; - (void) roundtrip->_validate_connection (inconsistent_policies - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + (void) roundtrip->_validate_connection (inconsistent_policies); int thread_count = 1 + options.nthreads; ACE_Barrier the_barrier (thread_count); @@ -263,18 +247,15 @@ int main (int argc, char *argv[]) ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - all task(s) joined\n")); - roundtrip->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + roundtrip->shutdown (); ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - starting cleanup\n")); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); + ex._tao_print_exception ("Exception caught:"); return 1; } - ACE_ENDTRY; return 0; } |