diff options
Diffstat (limited to 'TAO/performance-tests/Latency/AMI/client.cpp')
-rw-r--r-- | TAO/performance-tests/Latency/AMI/client.cpp | 54 |
1 files changed, 19 insertions, 35 deletions
diff --git a/TAO/performance-tests/Latency/AMI/client.cpp b/TAO/performance-tests/Latency/AMI/client.cpp index ac678fc1a15..6e0abf22d68 100644 --- a/TAO/performance-tests/Latency/AMI/client.cpp +++ b/TAO/performance-tests/Latency/AMI/client.cpp @@ -72,15 +72,13 @@ main (int argc, char *argv[]) "client (%P|%t): sched_params failed\n")); } - ACE_TRY_NEW_ENV + try { CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + CORBA::ORB_init (argc, argv, ""); CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->resolve_initial_references("RootPOA"); if (CORBA::is_nil (poa_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -88,23 +86,19 @@ main (int argc, char *argv[]) 1); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + PortableServer::POA::_narrow (poa_object.in ()); PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); if (parse_args (argc, argv) != 0) return 1; CORBA::Object_var object = - orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->string_to_object (ior); Test::Roundtrip_var roundtrip = - Test::Roundtrip::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + Test::Roundtrip::_narrow (object.in ()); if (CORBA::is_nil (roundtrip.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -115,8 +109,7 @@ main (int argc, char *argv[]) for (int j = 0; j < 100; ++j) { ACE_hrtime_t start = 0; - (void) roundtrip->test_method (start ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + (void) roundtrip->test_method (start); } Roundtrip_Handler *roundtrip_handler_impl; @@ -126,11 +119,9 @@ main (int argc, char *argv[]) PortableServer::ServantBase_var owner_transfer(roundtrip_handler_impl); Test::AMI_RoundtripHandler_var roundtrip_handler = - roundtrip_handler_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + roundtrip_handler_impl->_this (); - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); ACE_hrtime_t test_start = ACE_OS::gethrtime (); @@ -138,20 +129,17 @@ main (int argc, char *argv[]) { // Invoke asynchronous operation.... roundtrip->sendc_test_method (roundtrip_handler.in (), - ACE_OS::gethrtime () - ACE_ENV_ARG_PARAMETER); - if (orb->work_pending (ACE_ENV_SINGLE_ARG_PARAMETER)) - orb->perform_work (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_OS::gethrtime ()); + if (orb->work_pending ()) + orb->perform_work (); - ACE_TRY_CHECK; } ACE_Time_Value tv (0, 2000); while (roundtrip_handler_impl->pending_callbacks ()) { - orb->perform_work (tv ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->perform_work (tv); } ACE_hrtime_t test_end = ACE_OS::gethrtime (); @@ -166,21 +154,17 @@ main (int argc, char *argv[]) test_end - test_start, niterations); - roundtrip->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + roundtrip->shutdown (); - root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->destroy (1, 1); - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); } - 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; } |