From bcb182ff995f4e0586054c2d4369d6587babd9ae Mon Sep 17 00:00:00 2001 From: michel_j Date: Thu, 7 Jul 2005 20:42:02 +0000 Subject: Thu Jul 7 15:39:54 2005 Justin Michel --- .../performance-tests/RedGreen/RedGreen_Test.cpp | 43 +++++++++++++++++++--- .../performance-tests/RedGreen/listener.conf | 2 +- .../performance-tests/RedGreen/listener.conf.xml | 2 +- .../Notify/performance-tests/RedGreen/lookup.conf | 2 +- .../performance-tests/RedGreen/lookup.conf.xml | 2 +- 5 files changed, 42 insertions(+), 9 deletions(-) (limited to 'TAO/orbsvcs') diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp index cbb435d4295..3b79012e86a 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp +++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp @@ -7,8 +7,8 @@ #include "orbsvcs/Time_Utilities.h" #include "tao/debug.h" -ACE_RCSID (Notify, - RedGreen_Test, +ACE_RCSID (Notify, + RedGreen_Test, "$Id$") #define NOTIFY_FACTORY_NAME "NotifyEventChannelFactory" @@ -23,6 +23,8 @@ ACE_RCSID (Notify, ACE_Atomic_Op g_result_count = 0; ACE_hrtime_t g_throughput_start_; +static bool consumer_is_done = false; + int RedGreen_Test::parse_args (int argc, char *argv[]) @@ -107,9 +109,31 @@ RedGreen_Test::init (int argc, void RedGreen_Test::run (ACE_ENV_SINGLE_ARG_DECL) { - this->send_events (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_NEW_ENV + { + this->send_events (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + while (! consumer_is_done) + { + ACE_Time_Value tv(0, 10 * 1000); + this->orb_->run(tv ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + + this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION(ACE_ANY_EXCEPTION, "Supplier:"); + ACE_RE_THROW; + } + ACE_ENDTRY; ACE_CHECK; + + worker_.thr_mgr ()->wait (); } @@ -702,13 +726,22 @@ Worker::orb (CORBA::ORB_ptr orb) void Worker::done (void) { - this->orb_->shutdown (); + consumer_is_done = true; } int Worker::svc (void) { - this->orb_->run (); + ACE_TRY_NEW_ENV + { + this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION(ACE_ANY_EXCEPTION, "Consumer:"); + } + ACE_ENDTRY; return 0; } diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf index 4e98def139e..6c62c9bb7c2 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf +++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf @@ -1,5 +1,5 @@ ## $Id$ -static Notify_Default_Event_Manager_Objects_Factory "-AllocateTaskperProxy -ListenerThreads 1" +static Notify_Default_Event_Manager_Objects_Factory "-AllocateTaskperProxy -DispatchingThreads 1" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf.xml b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf.xml index f15ccd92083..686b6f6e4ba 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf.xml +++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf.xml @@ -1,5 +1,5 @@ - + diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf index ad55a75a73f..9965c905158 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf +++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf @@ -1,2 +1,2 @@ ## $Id$ -static Notify_Default_Event_Manager_Objects_Factory "-MTLookup -LookupThreads 2" \ No newline at end of file +static Notify_Default_Event_Manager_Objects_Factory "-SourceThreads 2" \ No newline at end of file diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf.xml b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf.xml index c4ea809ff0f..f72d4165927 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf.xml +++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf.xml @@ -1,5 +1,5 @@ - + -- cgit v1.2.1