summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Notify
diff options
context:
space:
mode:
authormichel_j <michel_j@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-07-07 20:42:02 +0000
committermichel_j <michel_j@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-07-07 20:42:02 +0000
commitbcb182ff995f4e0586054c2d4369d6587babd9ae (patch)
tree0e0be4376b8eade2423e1facf75a91c6dad80d51 /TAO/orbsvcs/tests/Notify
parent0137dc75281c24eaebebbe90c3f646eb87049bed (diff)
downloadATCD-bcb182ff995f4e0586054c2d4369d6587babd9ae.tar.gz
Thu Jul 7 15:39:54 2005 Justin Michel <michel_j@ociweb.com>
Diffstat (limited to 'TAO/orbsvcs/tests/Notify')
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp43
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf2
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf.xml2
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf2
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf.xml2
5 files changed, 42 insertions, 9 deletions
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 <TAO_SYNCH_MUTEX, int> 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 @@
<?xml version='1.0'?>
<!-- Converted from ./orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf by svcconf-convert.pl -->
<ACE_Svc_Conf>
- <static id="Notify_Default_Event_Manager_Objects_Factory" params="-AllocateTaskperProxy -ListenerThreads 1"/>
+ <static id="Notify_Default_Event_Manager_Objects_Factory" params="-DispatchingThreads 1"/>
</ACE_Svc_Conf>
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 @@
<?xml version='1.0'?>
<!-- Converted from ./orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf by svcconf-convert.pl -->
<ACE_Svc_Conf>
- <static id="Notify_Default_Event_Manager_Objects_Factory" params="-AllocateTaskperProxy -MTLookup -LookupThreads 2"/>
+ <static id="Notify_Default_Event_Manager_Objects_Factory" params="-AllocateTaskperProxy -SourceThreads 2"/>
</ACE_Svc_Conf>