summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:21 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:21 +0000
commit3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (patch)
tree197c810e5f5bce17b1233a7cb8d7b50c0bcd25e2 /TAO/orbsvcs/tests/Notify/performance-tests/RedGreen
parent6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (diff)
downloadATCD-3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c.tar.gz
Repo restructuring
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/performance-tests/RedGreen')
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/Makefile.am71
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/README65
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen.mpc6
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp772
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.h329
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf5
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf.xml5
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf2
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf.xml5
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/main.cpp34
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/reactive.conf3
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/reactive.conf.xml5
-rwxr-xr-xTAO/orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl79
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/svc.conf1
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/svc.conf.xml5
15 files changed, 1387 insertions, 0 deletions
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/Makefile.am b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/Makefile.am
new file mode 100644
index 00000000000..56b72ea0e04
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/Makefile.am
@@ -0,0 +1,71 @@
+## Process this file with automake to create Makefile.in
+##
+## $Id$
+##
+## This file was generated by MPC. Any changes made directly to
+## this file will be lost the next time it is generated.
+##
+## MPC Command:
+## ../bin/mwc.pl -type automake -noreldefs TAO.mwc
+
+ACE_BUILDDIR = $(top_builddir)/..
+ACE_ROOT = $(top_srcdir)/..
+TAO_BUILDDIR = $(top_builddir)
+TAO_ROOT = $(top_srcdir)
+
+
+## Makefile.RedGreen_Ntf_Perf_RedGreen.am
+
+if BUILD_CORBA_MESSAGING
+if !BUILD_MINIMUM_CORBA
+
+noinst_PROGRAMS = RedGreen_Test
+
+RedGreen_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR) \
+ -I$(TAO_ROOT) \
+ -I$(TAO_BUILDDIR) \
+ -I$(TAO_ROOT)/orbsvcs \
+ -I$(TAO_BUILDDIR)/orbsvcs \
+ -I$(TAO_ROOT)/orbsvcs/tests/Notify/lib \
+ -DTAO_HAS_TYPED_EVENT_CHANNEL
+
+RedGreen_Test_SOURCES = \
+ RedGreen_Test.cpp \
+ main.cpp \
+ RedGreen_Test.h
+
+RedGreen_Test_LDADD = \
+ $(TAO_BUILDDIR)/orbsvcs/tests/Notify/lib/libTAO_NotifyTests.la \
+ $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosEvent_Serv.la \
+ $(TAO_BUILDDIR)/tao/libTAO_IFR_Client.la \
+ $(TAO_BUILDDIR)/tao/libTAO_DynamicInterface.la \
+ $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \
+ $(TAO_BUILDDIR)/tao/libTAO_PI.la \
+ $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \
+ $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \
+ $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \
+ $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNotification_Serv.la \
+ $(TAO_BUILDDIR)/tao/libTAO_DynamicAny.la \
+ $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_ETCL.la \
+ $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \
+ $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNotification_Skel.la \
+ $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosEvent_Skel.la \
+ $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \
+ $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNotification.la \
+ $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosEvent.la \
+ $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \
+ $(TAO_BUILDDIR)/tao/libTAO.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_MINIMUM_CORBA
+endif BUILD_CORBA_MESSAGING
+
+## Clean up template repositories, etc.
+clean-local:
+ -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.*
+ -rm -f gcctemp.c gcctemp so_locations *.ics
+ -rm -rf cxx_repository ptrepository ti_files
+ -rm -rf templateregistry ir.out
+ -rm -rf ptrepository SunWS_cache Templates.DB
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/README b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/README
new file mode 100644
index 00000000000..88b6a01e03c
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/README
@@ -0,0 +1,65 @@
+RedGreen Test
+
+This test will measure throughput in different configurations of the
+Notify Service.
+
+DESCRIPTION
+-----------
+The Test creates an Event Channel, one consumer admin and supplier
+admin.
+
+It connects 2 types of consumers to the consumer admin:
+A "slow" consumer that has a 1 sec "wait" in its "push" implementation
+and a "normal" consumer that returns immediately without any intensive
+processing in its "push".
+
+A supplier pushes 2 types of events to the channel. A "RED" event and
+a ""GREEN" event in a burst of RED and GREEN events alternatively.
+
+The subscriptions are specified in such a manner that the "slow"
+consumer only receives RED events while the "normal" consumer receives
+the "GREEN" events,
+
+We use a TP reactor with 4 worker threads to allow upcalls to the
+normal consumers servant proceed without having to wait for the slow
+consumer to finish. The default ORB configuration is reactive.
+
+First Run the Notify Service in the reactive mode.
+Each participant in this (supplier and both consumers) are coupled
+together because all calls are sychronous. The 1 sec wait should affect
+throughput of all 3.
+
+Next use 2 Lookup thread and check performance. The throughput
+values should increase for the supplier and normal consumer but same
+for the slow consumer.
+
+Lastly, deploy a thread each at each proxy supplier. The Throughput
+of the normal consumer should increase dramatically.
+This is because its data path is completely decoupled from the "slow consumer".
+
+COMMAND LINE OPTIONS:
+--------------------
+"-burst_size [size]"
+
+RUNNING THE TEST:
+-----------------
+
+Test 1
+------
+
+run $TAO_ROOT/orbsvcs/Notify_Service/Notify_Service -ORBsvcconf reactive.conf
+run RedGreen_Test
+
+
+Test 2
+------
+
+run $TAO_ROOT/orbsvcs/Notify_Service/Notify_Service -Notify_TPReactor 2 -ORBsvcconf lookup.conf
+run RedGreen_Test
+
+
+Test 3
+------
+
+run $TAO_ROOT/orbsvcs/Notify_Service/Notify_Service -Notify_TPReactor 2 -ORBsvcconf listener.conf
+run RedGreen_Test
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen.mpc b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen.mpc
new file mode 100644
index 00000000000..619fd2e21b9
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen.mpc
@@ -0,0 +1,6 @@
+// -*- MPC -*-
+// $Id$
+
+project(*Ntf Perf RedGreen): notifytest {
+ exename = RedGreen_Test
+}
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp
new file mode 100644
index 00000000000..b68b1bcbed4
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp
@@ -0,0 +1,772 @@
+// -*- C++ -*- $Id$
+
+#include "RedGreen_Test.h"
+#include "ace/Arg_Shifter.h"
+#include "ace/Get_Opt.h"
+#include "ace/OS_NS_unistd.h"
+#include "orbsvcs/Time_Utilities.h"
+#include "tao/debug.h"
+
+ACE_RCSID (Notify,
+ RedGreen_Test,
+ "$Id$")
+
+#define NOTIFY_FACTORY_NAME "NotifyEventChannelFactory"
+#define NAMING_SERVICE_NAME "NameService"
+
+#define DOMAIN_GREEN "DOMAIN_GREEN"
+#define DOMAIN_RED "DOMAIN_RED"
+
+#define TYPE_GREEN "TYPE_GREEN"
+#define TYPE_RED "TYPE_RED"
+
+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[])
+{
+ ACE_Arg_Shifter arg_shifter (argc, argv);
+
+ const char *current_arg = 0;
+
+ while (arg_shifter.is_anything_left ())
+ {
+ if ((current_arg = arg_shifter.get_the_parameter ("-burst_size")))
+ {
+ this->burst_size_ = ACE_OS::atoi (current_arg);
+ ACE_DEBUG ((LM_DEBUG,
+ "Burst size = %d\n",
+ burst_size_));
+ // The number of events to send/receive.
+ arg_shifter.consume_arg ();
+ }
+ else if (arg_shifter.cur_arg_strncasecmp ("-?") == 0)
+ {
+ ACE_DEBUG((LM_DEBUG,
+ "usage: %s "
+ "-burst_size [count]\n",
+ argv[0],
+ argv[0]));
+
+ arg_shifter.consume_arg ();
+
+ return -1;
+ }
+ else
+ {
+ arg_shifter.ignore_arg ();
+ }
+ }
+
+ return 0;
+}
+
+RedGreen_Test::RedGreen_Test (void)
+ : burst_size_ (10),
+ nthreads_ (2)
+{
+ // No-Op.
+ ifgop_ = CosNotifyChannelAdmin::OR_OP;
+}
+
+void
+RedGreen_Test::destroy_ec ()
+{
+ if (!CORBA::is_nil (ec_.in ()))
+ {
+ // Even though we still have a reference, there's no guarantee
+ // the EC is still around. So, trap exceptions.
+ ACE_TRY_NEW_ENV
+ {
+ this->ec_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCH (CORBA::COMM_FAILURE, ex)
+ {
+ // Silently swallow this b/c this could mean the EC is gone
+ // or that the network is hosed. Either way, we're not waiting
+ // around to figure out the problem. Report the incident to the
+ // log and be done with it.
+ ACE_DEBUG ((LM_INFO,
+ "INFO: Got a COMM_FAILURE exception while trying to \n"
+ " invoke `destroy()' on the Event Channel in the \n"
+ " RedGreen destroy_ec. This is likely not a problem.\n"));
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION(ACE_ANY_EXCEPTION,
+ "in RedGreen destructor; swallowing.\n");
+ }
+ ACE_ENDTRY;
+
+ this->ec_ = CosNotifyChannelAdmin::EventChannel::_nil ();
+ }
+}
+
+
+void
+RedGreen_Test::init (int argc,
+ char *argv []
+ ACE_ENV_ARG_DECL)
+{
+ this->init_ORB (argc,
+ argv
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ this->resolve_naming_service (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+ this->resolve_Notify_factory (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+ this->create_EC (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+ this->create_supplieradmin (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+ this->create_consumeradmin (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+ this->create_consumers (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+ this->create_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+RedGreen_Test::run (ACE_ENV_SINGLE_ARG_DECL)
+{
+ 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 ();
+}
+
+void
+RedGreen_Test::done (void)
+{
+ dump_results ();
+ worker_.done ();
+}
+
+void
+RedGreen_Test::init_ORB (int argc,
+ char *argv []
+ ACE_ENV_ARG_DECL)
+{
+ this->orb_ = CORBA::ORB_init (argc,
+ argv,
+ ""
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CORBA::Object_ptr poa_object =
+ this->orb_->resolve_initial_references("RootPOA"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (poa_object))
+ {
+ ACE_ERROR ((LM_ERROR,
+ " (%P|%t) Unable to initialize the POA.\n"));
+ return;
+ }
+ this->root_poa_ =
+ PortableServer::POA::_narrow (poa_object
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ PortableServer::POAManager_var poa_manager =
+ root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ worker_.orb (this->orb_.in ());
+
+ if (worker_.activate (THR_NEW_LWP | THR_JOINABLE,
+ this->nthreads_) != 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "Cannot activate client threads\n"));
+ }
+}
+
+void
+RedGreen_Test::resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CORBA::Object_var naming_obj =
+ this->orb_->resolve_initial_references (NAMING_SERVICE_NAME
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // Need to check return value for errors.
+ if (CORBA::is_nil (naming_obj.in ()))
+ {
+ ACE_THROW (CORBA::UNKNOWN ());
+ }
+
+ this->naming_context_ =
+ CosNaming::NamingContext::_narrow (naming_obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+RedGreen_Test::resolve_Notify_factory (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNaming::Name name (1);
+ name.length (1);
+ name[0].id = CORBA::string_dup (NOTIFY_FACTORY_NAME);
+
+ CORBA::Object_var obj =
+ this->naming_context_->resolve (name
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->notify_factory_ =
+ CosNotifyChannelAdmin::EventChannelFactory::_narrow (
+ obj.in ()
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_CHECK;
+}
+
+void
+RedGreen_Test::create_EC (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyChannelAdmin::ChannelID id;
+
+ this->ec_ = notify_factory_->create_channel (this->initial_qos_,
+ this->initial_admin_,
+ id
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_ASSERT (!CORBA::is_nil (ec_.in ()));
+}
+
+void
+RedGreen_Test::create_supplieradmin (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyChannelAdmin::AdminID adminid;
+
+ supplier_admin_ =
+ ec_->new_for_suppliers (this->ifgop_,
+ adminid
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_ASSERT (!CORBA::is_nil (supplier_admin_.in ()));
+}
+
+void
+RedGreen_Test::create_consumeradmin (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CosNotifyChannelAdmin::AdminID adminid;
+
+ consumer_admin_ =
+ ec_->new_for_consumers (this->ifgop_,
+ adminid
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_ASSERT (!CORBA::is_nil (consumer_admin_.in ()));
+}
+
+void
+RedGreen_Test::create_consumers (ACE_ENV_SINGLE_ARG_DECL)
+{
+ ACE_NEW (this->normal_consumer_,
+ RedGreen_Test_StructuredPushConsumer (this));
+ this->normal_consumer_->connect (this->consumer_admin_.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_NEW (this->slow_consumer_,
+ SlowConsumer (this));
+ this->slow_consumer_->connect (this->consumer_admin_.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+RedGreen_Test::create_suppliers (ACE_ENV_SINGLE_ARG_DECL)
+{
+ ACE_NEW (this->supplier_,
+ RedGreen_Test_StructuredPushSupplier ());
+ this->supplier_->connect (this->supplier_admin_.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+RedGreen_Test::send_events (ACE_ENV_SINGLE_ARG_DECL)
+{
+ // Setup the Consumer 1 to receive
+ //event_type : "DOMAIN_GREEN", "DOMAIN_GREEN".
+ CosNotification::EventTypeSeq added_1(1);
+ CosNotification::EventTypeSeq removed_1 (0);
+
+ added_1[0].domain_name = CORBA::string_dup (DOMAIN_GREEN);
+ added_1[0].type_name = CORBA::string_dup (TYPE_GREEN);
+ added_1.length (1);
+ removed_1.length (0);
+
+ this->normal_consumer_->get_proxy_supplier ()->subscription_change (
+ added_1,
+ removed_1
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_CHECK;
+
+ // Setup the Consumer 2 to receive event_type : "DOMAIN_RED", "TYPE_RED"
+ CosNotification::EventTypeSeq added_2(1);
+ CosNotification::EventTypeSeq removed_2 (0);
+
+ added_2[0].domain_name = CORBA::string_dup (DOMAIN_RED);
+ added_2[0].type_name = CORBA::string_dup (TYPE_RED);
+ added_2.length (1);
+ removed_2.length (0);
+
+ this->slow_consumer_->get_proxy_supplier ()->subscription_change (
+ added_2,
+ removed_2
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_CHECK;
+
+ // Create the events - one of each type
+
+ // Event 2
+ CosNotification::StructuredEvent green_event;
+ green_event.header.fixed_header.event_type.domain_name =
+ CORBA::string_dup(DOMAIN_GREEN);
+ green_event.header.fixed_header.event_type.type_name =
+ CORBA::string_dup(TYPE_GREEN);
+ green_event.header.fixed_header.event_name = CORBA::string_dup ("");
+ green_event.header.variable_header.length (0); // put nothing here
+ green_event.filterable_data.length (0);
+ green_event.remainder_of_body <<= (CORBA::Long)10;
+
+ // event 3
+ CosNotification::StructuredEvent red_event;
+ red_event.header.fixed_header.event_type.domain_name =
+ CORBA::string_dup(DOMAIN_RED);
+ red_event.header.fixed_header.event_type.type_name =
+ CORBA::string_dup(TYPE_RED);
+ red_event.header.fixed_header.event_name = CORBA::string_dup("");
+ red_event.header.variable_header.length (0); // put nothing here
+ red_event.filterable_data.length (0);
+ red_event.remainder_of_body <<= (CORBA::Long)10;
+
+ g_throughput_start_ = ACE_OS::gethrtime ();
+
+ // let supplier 1 send all these events
+ for (int i = 0; i < this->burst_size_; ++i)
+ {
+ this->supplier_->send_event (red_event
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->supplier_->send_event (green_event
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+}
+
+
+void
+RedGreen_Test::dump_results (void)
+{
+ ACE_Throughput_Stats throughput;
+ ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
+ char buf[BUFSIZ];
+
+ ACE_OS::sprintf (buf,
+ "Normal Consumer [%02d]",
+ 1);
+ normal_consumer_->dump_stats (buf,
+ gsf);
+ normal_consumer_->accumulate_into (throughput);
+
+ ACE_OS::sprintf (buf,
+ "Slow Consumer [%02d]",
+ 2);
+ slow_consumer_->dump_stats (buf,
+ gsf);
+ slow_consumer_->accumulate_into (throughput);
+
+ ACE_DEBUG ((LM_DEBUG,
+ "\n"));
+
+ ACE_Throughput_Stats suppliers;
+
+ ACE_OS::sprintf (buf,
+ "Supplier [%02d]",
+ 1);
+
+ this->supplier_->dump_stats (buf,
+ gsf);
+ this->supplier_->accumulate_into (suppliers);
+
+ ACE_DEBUG ((LM_DEBUG, "\nTotals:\n"));
+ throughput.dump_results ("Notify_Consumer/totals", gsf);
+
+ ACE_DEBUG ((LM_DEBUG, "\n"));
+ suppliers.dump_results ("Notify_Supplier/totals", gsf);
+}
+
+// *****************************************************************
+
+RedGreen_Test_StructuredPushConsumer::RedGreen_Test_StructuredPushConsumer (
+ RedGreen_Test* RedGreen_Test
+ )
+ : RedGreen_Test_ (RedGreen_Test),
+ push_count_ (0)
+{
+}
+
+RedGreen_Test_StructuredPushConsumer::~RedGreen_Test_StructuredPushConsumer (
+ void
+ )
+{
+}
+
+void
+RedGreen_Test_StructuredPushConsumer::accumulate_into (
+ ACE_Throughput_Stats &throughput
+ ) const
+{
+ throughput.accumulate (this->throughput_);
+}
+
+void
+RedGreen_Test_StructuredPushConsumer::dump_stats (const char* msg,
+ ACE_UINT32 gsf)
+{
+ this->throughput_.dump_results (msg,
+ gsf);
+}
+
+void
+RedGreen_Test_StructuredPushConsumer::connect (
+ CosNotifyChannelAdmin::ConsumerAdmin_ptr consumer_admin
+ ACE_ENV_ARG_DECL
+ )
+{
+ // Activate the consumer with the default_POA_.
+ CosNotifyComm::StructuredPushConsumer_var objref =
+ this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CosNotifyChannelAdmin::ProxySupplier_var proxysupplier =
+ consumer_admin->obtain_notification_push_supplier (
+ CosNotifyChannelAdmin::STRUCTURED_EVENT,
+ proxy_supplier_id_
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_CHECK;
+
+ ACE_ASSERT (!CORBA::is_nil (proxysupplier.in ()));
+
+ // narrow
+ this->proxy_supplier_ =
+ CosNotifyChannelAdmin::StructuredProxyPushSupplier::_narrow (
+ proxysupplier.in ()
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_CHECK;
+
+ ACE_ASSERT (!CORBA::is_nil (proxy_supplier_.in ()));
+
+ proxy_supplier_->connect_structured_push_consumer (objref.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+RedGreen_Test_StructuredPushConsumer::disconnect (ACE_ENV_SINGLE_ARG_DECL)
+{
+ this->proxy_supplier_->
+ disconnect_structured_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+RedGreen_Test_StructuredPushConsumer::offer_change (
+ const CosNotification::EventTypeSeq & /*added*/,
+ const CosNotification::EventTypeSeq & /*removed*/
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ CosNotifyComm::InvalidEventType))
+{
+ // No-Op.
+}
+
+void
+RedGreen_Test_StructuredPushConsumer::push_structured_event (
+ const CosNotification::StructuredEvent & notification
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ CosEventComm::Disconnected))
+{
+ ACE_GUARD (TAO_SYNCH_MUTEX,
+ ace_mon,
+ this->lock_);
+ const char* domain_name =
+ notification.header.fixed_header.event_type.domain_name;
+
+ const char* type_name =
+ notification.header.fixed_header.event_type.type_name;
+
+ if (TAO_debug_level)
+ ACE_DEBUG ((LM_DEBUG,
+ "Consumer %d event, domain = %s, type = %s\n",
+ this->proxy_supplier_id_,
+ domain_name,
+ type_name));
+
+ TimeBase::TimeT latency_base_recorded;
+ ACE_hrtime_t latency_base;
+
+ notification.filterable_data[0].value >>= latency_base_recorded;
+
+ ORBSVCS_Time::TimeT_to_hrtime (latency_base,
+ latency_base_recorded);
+
+ ++this->push_count_;
+
+ // Grab timestamp again.
+ ACE_hrtime_t now = ACE_OS::gethrtime ();
+
+ // Record statistics.
+ this->throughput_.sample (now - g_throughput_start_,
+ now - latency_base);
+
+
+ if (++g_result_count == 2*RedGreen_Test_->burst_size_)
+ {
+ RedGreen_Test_->done ();
+ }
+}
+
+void
+RedGreen_Test_StructuredPushConsumer::disconnect_structured_push_consumer (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // No-Op.
+}
+
+CosNotifyChannelAdmin::StructuredProxyPushSupplier_ptr
+RedGreen_Test_StructuredPushConsumer::get_proxy_supplier (void)
+{
+ return this->proxy_supplier_.in ();
+}
+
+// *****************************************************************
+
+SlowConsumer::SlowConsumer (RedGreen_Test* RedGreen_Test)
+ : RedGreen_Test_StructuredPushConsumer (RedGreen_Test)
+{
+}
+
+void
+SlowConsumer::push_structured_event (
+ const CosNotification::StructuredEvent & notification
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ CosEventComm::Disconnected))
+{
+ // Slow it down ...
+ ACE_OS::sleep (1);
+
+ RedGreen_Test_StructuredPushConsumer::push_structured_event (
+ notification
+ ACE_ENV_ARG_PARAMETER
+ );
+}
+
+// *****************************************************************
+
+RedGreen_Test_StructuredPushSupplier::RedGreen_Test_StructuredPushSupplier (
+ void
+ )
+{
+}
+
+RedGreen_Test_StructuredPushSupplier::~RedGreen_Test_StructuredPushSupplier (
+ void
+ )
+{
+}
+
+void
+RedGreen_Test_StructuredPushSupplier::accumulate_into (
+ ACE_Throughput_Stats &throughput
+ ) const
+{
+ throughput.accumulate (this->throughput_);
+}
+
+void
+RedGreen_Test_StructuredPushSupplier::dump_stats (const char* msg,
+ ACE_UINT32 gsf)
+{
+ this->throughput_.dump_results (msg,
+ gsf);
+}
+
+void
+RedGreen_Test_StructuredPushSupplier::connect (
+ CosNotifyChannelAdmin::SupplierAdmin_ptr supplier_admin
+ ACE_ENV_ARG_DECL
+ )
+{
+ CosNotifyComm::StructuredPushSupplier_var objref =
+ this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ CosNotifyChannelAdmin::ProxyConsumer_var proxyconsumer =
+ supplier_admin->obtain_notification_push_consumer (
+ CosNotifyChannelAdmin::STRUCTURED_EVENT,
+ proxy_consumer_id_
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_CHECK;
+
+ ACE_ASSERT (!CORBA::is_nil (proxyconsumer.in ()));
+
+ // narrow
+ this->proxy_consumer_ =
+ CosNotifyChannelAdmin::StructuredProxyPushConsumer::_narrow (
+ proxyconsumer.in ()
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_CHECK;
+
+ ACE_ASSERT (!CORBA::is_nil (proxy_consumer_.in ()));
+
+ proxy_consumer_->connect_structured_push_supplier (objref.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+RedGreen_Test_StructuredPushSupplier::disconnect (ACE_ENV_SINGLE_ARG_DECL)
+{
+ ACE_ASSERT (!CORBA::is_nil (this->proxy_consumer_.in ()));
+
+ this->proxy_consumer_->disconnect_structured_push_consumer (
+ ACE_ENV_SINGLE_ARG_PARAMETER
+ );
+}
+
+void
+RedGreen_Test_StructuredPushSupplier::subscription_change (
+ const CosNotification::EventTypeSeq & /*added*/,
+ const CosNotification::EventTypeSeq & /*removed */
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ CosNotifyComm::InvalidEventType))
+{
+ //No-Op.
+}
+
+void
+RedGreen_Test_StructuredPushSupplier::send_event (
+ CosNotification::StructuredEvent& event
+ ACE_ENV_ARG_DECL
+ )
+{
+ event.filterable_data.length (1);
+ event.filterable_data[0].name = CORBA::string_dup("latency_base");
+
+ // Record current time.
+ ACE_hrtime_t start = ACE_OS::gethrtime ();
+
+ TimeBase::TimeT latency_base;
+ ORBSVCS_Time::hrtime_to_TimeT (latency_base,
+ start);
+ // any
+ event.filterable_data[0].value <<= latency_base;
+ proxy_consumer_->push_structured_event (event ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ ACE_hrtime_t end = ACE_OS::gethrtime ();
+
+ this->throughput_.sample (end - g_throughput_start_,
+ end - start);
+ ACE_CHECK;
+}
+
+void
+RedGreen_Test_StructuredPushSupplier::disconnect_structured_push_supplier (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // No-Op.
+}
+
+//*****************************************************************
+
+Worker::Worker (void)
+{
+}
+
+void
+Worker::orb (CORBA::ORB_ptr orb)
+{
+ orb_ = CORBA::ORB::_duplicate (orb);
+}
+
+void
+Worker::done (void)
+{
+ consumer_is_done = true;
+}
+
+int
+Worker::svc (void)
+{
+ 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/RedGreen_Test.h b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.h
new file mode 100644
index 00000000000..480a55ee0b7
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.h
@@ -0,0 +1,329 @@
+/* -*- C++ -*- */
+// $Id$
+// ==========================================================================
+//
+// = FILENAME
+// RedGreen_Test.h
+//
+// = DESCRIPTION
+// Performance test to show improvement in Notify performance by picking the
+// correcting configuration.
+//
+// = AUTHOR
+// Pradeep Gore <pradeep@cs.wustl.edu>
+//
+// ==========================================================================
+
+#ifndef NOTIFY_RedGreen_Test_CLIENT_H
+#define NOTIFY_RedGreen_Test_CLIENT_H
+
+#include "orbsvcs/CosNotifyChannelAdminS.h"
+#include "orbsvcs/CosNotifyCommC.h"
+#include "orbsvcs/CosNamingC.h"
+#include "ace/Task.h"
+#include "ace/Stats.h"
+#include "ace/High_Res_Timer.h"
+#include "ace/Sched_Params.h"
+
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4250)
+#endif /* _MSC_VER */
+
+class RedGreen_Test_StructuredPushConsumer;
+class RedGreen_Test_StructuredPushSupplier;
+
+class Worker : public ACE_Task_Base
+{
+ // = TITLE
+ // Run a server thread
+ //
+ // = DESCRIPTION
+ // Use the ACE_Task_Base class to run server threads
+ //
+public:
+ Worker (void);
+ // Constructor.
+
+ void orb (CORBA::ORB_ptr orb);
+
+ virtual int svc (void);
+ // The thread entry point.
+
+ // Shutdown ORB
+ void done (void);
+
+private:
+ CORBA::ORB_var orb_;
+ // The orb
+};
+
+class RedGreen_Test
+{
+ // = TITLE
+ // RedGreen_Test
+ // = DESCRIPTION
+ // Shows how consumers RedGreen_Test for events.
+
+ public:
+ // = Initialization
+ RedGreen_Test (void);
+
+ int parse_args (int argc,
+ char *argv[]);
+
+ void dump_results (void);
+
+ void init (int argc,
+ char *argv []
+ ACE_ENV_ARG_DECL);
+ // Initialize the Client.
+
+ void run (ACE_ENV_SINGLE_ARG_DECL);
+ // Run the demo.
+
+ void done (void);
+ // Called when all events we are waiting for have occured.
+
+ void destroy_ec (void);
+ // Destroy from the EC
+
+ int burst_size_;
+ Worker worker_;
+ int nthreads_;
+
+ protected:
+ void init_ORB (int argc,
+ char *argv []
+ ACE_ENV_ARG_DECL);
+ // Initializes the ORB.
+
+ void resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL);
+ // Try to get hold of a running naming service.
+
+ void resolve_Notify_factory (ACE_ENV_SINGLE_ARG_DECL);
+ // Try to resolve the Notify factory from the Naming service.
+
+ void create_EC (ACE_ENV_SINGLE_ARG_DECL);
+ // Create an EC.
+
+ void create_supplieradmin(ACE_ENV_SINGLE_ARG_DECL);
+ // Create the Supplier Admin.
+
+ void create_consumeradmin (ACE_ENV_SINGLE_ARG_DECL);
+ // Create the Consumer Admin.
+
+ void create_consumers (ACE_ENV_SINGLE_ARG_DECL);
+ // Create and initialize the consumers.
+
+ void create_suppliers (ACE_ENV_SINGLE_ARG_DECL);
+ // create and initialize the suppliers.
+
+ void send_events (ACE_ENV_SINGLE_ARG_DECL);
+ // send the events.
+
+ // = Data Members.
+ PortableServer::POA_var root_poa_;
+ // Reference to the root poa.
+
+ CORBA::ORB_var orb_;
+ // The ORB that we use.
+
+ CosNaming::NamingContext_var naming_context_;
+ // Handle to the name service.
+
+ CosNotifyChannelAdmin::EventChannelFactory_var notify_factory_;
+ // Channel factory.
+
+ CosNotifyChannelAdmin::EventChannel_var ec_;
+ // The one channel that we create using the factory.
+
+ CosNotifyChannelAdmin::InterFilterGroupOperator ifgop_;
+ // The group operator between admin-proxy's.
+
+ CosNotification::QoSProperties initial_qos_;
+ // Initial qos specified to the factory when creating the EC.
+
+ CosNotification::AdminProperties initial_admin_;
+ // Initial admin props specified to the factory when creating the EC.
+
+ CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin_;
+ // The consumer admin used by consumers.
+
+ CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin_;
+ // The supplier admin used by suppliers.
+
+ RedGreen_Test_StructuredPushConsumer* normal_consumer_;
+ RedGreen_Test_StructuredPushConsumer* slow_consumer_;
+
+ RedGreen_Test_StructuredPushSupplier* supplier_;
+};
+
+/*****************************************************************/
+class RedGreen_Test_StructuredPushConsumer
+ : public POA_CosNotifyComm::StructuredPushConsumer
+{
+ // = TITLE
+ // RedGreen_Test_StructuredPushConsumer
+ //
+ // = DESCRIPTION
+ // Consumer for the RedGreen_Test example.
+ //
+
+ public:
+ // = Initialization and Termination code
+ RedGreen_Test_StructuredPushConsumer (RedGreen_Test* RedGreen_Test);
+ // Constructor.
+
+ void connect (CosNotifyChannelAdmin::ConsumerAdmin_ptr consumer_admin
+ ACE_ENV_ARG_DECL);
+ // Connect the Consumer to the EventChannel.
+ // Creates a new proxy supplier and connects to it.
+
+ virtual void disconnect (ACE_ENV_SINGLE_ARG_DECL);
+ // Disconnect from the supplier.
+
+ CosNotifyChannelAdmin::StructuredProxyPushSupplier_ptr get_proxy_supplier (
+ void
+ );
+ // Accessor for the Proxy that we're connected to.
+
+ void accumulate_into (ACE_Throughput_Stats &throughput) const;
+ // Accumulate the throughput statistics into <throughput>
+
+ void dump_stats (const char* msg, ACE_UINT32 gsf);
+ // Accumulate the throughput statistics into <throughput>
+
+protected:
+ // = Data members
+ CosNotifyChannelAdmin::StructuredProxyPushSupplier_var proxy_supplier_;
+ // The proxy that we are connected to.
+
+ CosNotifyChannelAdmin::ProxyID proxy_supplier_id_;
+ // The proxy_supplier id.
+
+ RedGreen_Test* RedGreen_Test_;
+ // callback <done>
+
+ TAO_SYNCH_MUTEX lock_;
+ // Protect internal state
+
+ int push_count_;
+
+ ACE_Throughput_Stats throughput_;
+ // Used for reporting stats
+
+ // = Methods
+ virtual ~RedGreen_Test_StructuredPushConsumer (void);
+ // Destructor
+
+ // = NotifyPublish method
+ virtual void offer_change (
+ const CosNotification::EventTypeSeq & added,
+ const CosNotification::EventTypeSeq & removed
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ CosNotifyComm::InvalidEventType));
+
+ // = StructuredPushSupplier methods
+ virtual void push_structured_event (
+ const CosNotification::StructuredEvent & notification
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ CosEventComm::Disconnected));
+
+ virtual void disconnect_structured_push_consumer (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+};
+
+/*****************************************************************/
+
+class SlowConsumer : public RedGreen_Test_StructuredPushConsumer
+{
+public:
+ SlowConsumer (RedGreen_Test* RedGreen_Test);
+
+ virtual void push_structured_event (
+ const CosNotification::StructuredEvent & notification
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ CosEventComm::Disconnected));
+};
+
+
+/*****************************************************************/
+class RedGreen_Test_StructuredPushSupplier
+ : public POA_CosNotifyComm::StructuredPushSupplier
+{
+ // = TITLE
+ // RedGreen_Test_StructuredPushSupplier
+ //
+ // = DESCRIPTION
+ // Supplier for the RedGreen_Test example.
+ //
+ public:
+ // = Initialization and Termination code
+ RedGreen_Test_StructuredPushSupplier (void);
+ // Constructor.
+
+ void connect (CosNotifyChannelAdmin::SupplierAdmin_ptr supplier_admin
+ ACE_ENV_ARG_DECL);
+ // Connect the Supplier to the EventChannel.
+ // Creates a new proxy supplier and connects to it.
+
+ void disconnect (ACE_ENV_SINGLE_ARG_DECL);
+ // Disconnect from the supplier.
+
+ virtual void send_event (CosNotification::StructuredEvent& event
+ ACE_ENV_ARG_DECL);
+ // Send one event.
+
+ void accumulate_into (ACE_Throughput_Stats &throughput) const;
+ // Accumulate the throughput statistics into <throughput>
+
+ void dump_stats (const char* msg, ACE_UINT32 gsf);
+ // Accumulate the throughput statistics into <throughput>
+
+protected:
+ // = Data members
+ CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxy_consumer_;
+ // The proxy that we are connected to.
+
+ CosNotifyChannelAdmin::ProxyID proxy_consumer_id_;
+ // This supplier's id.
+
+ ACE_Throughput_Stats throughput_;
+ // Measure the elapsed time spent while sending the events.
+
+ // = Protected Methods
+ virtual ~RedGreen_Test_StructuredPushSupplier ();
+ // Destructor
+
+ // = NotifyRedGreen_Test
+ virtual void subscription_change (
+ const CosNotification::EventTypeSeq & added,
+ const CosNotification::EventTypeSeq & removed
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ CosNotifyComm::InvalidEventType));
+
+ // = StructuredPushSupplier method
+ virtual void disconnect_structured_push_supplier (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+};
+
+/*****************************************************************/
+
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif /* _MSC_VER */
+
+#endif /* NOTIFY_RedGreen_Test_CLIENT_H */
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf
new file mode 100644
index 00000000000..6c62c9bb7c2
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf
@@ -0,0 +1,5 @@
+## $Id$
+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
new file mode 100644
index 00000000000..686b6f6e4ba
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf.xml
@@ -0,0 +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="-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
new file mode 100644
index 00000000000..9965c905158
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf
@@ -0,0 +1,2 @@
+## $Id$
+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
new file mode 100644
index 00000000000..f72d4165927
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf.xml
@@ -0,0 +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 -SourceThreads 2"/>
+</ACE_Svc_Conf>
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/main.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/main.cpp
new file mode 100644
index 00000000000..25f07f3583e
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/main.cpp
@@ -0,0 +1,34 @@
+// -*- C++ -*-
+// $Id$
+
+#include "RedGreen_Test.h"
+
+int
+main (int argc, char *argv [])
+{
+ ACE_High_Res_Timer::calibrate ();
+
+ RedGreen_Test client;
+
+ client.parse_args (argc, argv);
+
+ ACE_TRY_NEW_ENV
+ {
+ client.init (argc, argv
+ ACE_ENV_ARG_PARAMETER); //Init the Client
+ ACE_TRY_CHECK;
+
+ client.run (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ client.destroy_ec ();
+ }
+ ACE_CATCH (CORBA::Exception, se)
+ {
+ ACE_PRINT_EXCEPTION (se, "Error: ");
+ return 1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/reactive.conf b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/reactive.conf
new file mode 100644
index 00000000000..d4399938cec
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/reactive.conf
@@ -0,0 +1,3 @@
+## $Id$
+static Notify_Default_Event_Manager_Objects_Factory ""
+
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/reactive.conf.xml b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/reactive.conf.xml
new file mode 100644
index 00000000000..b8b7e4f8e71
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/reactive.conf.xml
@@ -0,0 +1,5 @@
+<?xml version='1.0'?>
+<!-- Converted from ./orbsvcs/tests/Notify/performance-tests/RedGreen/reactive.conf by svcconf-convert.pl -->
+<ACE_Svc_Conf>
+ <static id="Notify_Default_Event_Manager_Objects_Factory"/>
+</ACE_Svc_Conf>
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl
new file mode 100755
index 00000000000..c745855334a
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl
@@ -0,0 +1,79 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "../../../../../../bin";
+use PerlACE::Run_Test;
+
+$experiment_timeout = 60;
+$startup_timeout = 60;
+$notifyior = PerlACE::LocalFile ("notify.ior");
+$namingior = PerlACE::LocalFile ("naming.ior");
+$status = 0;
+
+unlink $notifyior;
+unlink $namingior;
+
+$Naming = new PerlACE::Process ("../../../../Naming_Service/Naming_Service",
+ "-o $namingior");
+
+$test = new PerlACE::Process ("RedGreen_Test",
+ "-ORBInitRef NameService=file://$namingior");
+
+@test_configs =
+ (
+ "reactive.conf",
+ "lookup.conf",
+ "listener.conf",
+ );
+
+$Naming->Spawn ();
+
+if (PerlACE::waitforfile_timed ($namingior, $startup_timeout) == -1)
+ {
+ print STDERR "ERROR: waiting for the naming service to start\n";
+ $Naming->Kill ();
+ exit 1;
+ }
+
+for $config (@test_configs)
+ {
+ print STDERR "\nTesting Notification Service with config file = $config ....\n\n";
+
+ $Notification =
+ new PerlACE::Process ("../../../../Notify_Service/Notify_Service",
+ "-ORBInitRef NameService=file://$namingior " .
+ "-IORoutput $notifyior " .
+ "-ORBSvcConf $config");
+
+ $Notification->Spawn ();
+
+ if (PerlACE::waitforfile_timed ($notifyior, $startup_timeout) == -1) {
+ print STDERR "ERROR: waiting for the notify service to start\n";
+ $Notification->Kill ();
+ $Naming->Kill ();
+ exit 1;
+ }
+
+ $test->Spawn ();
+
+ $status = $test->WaitKill ($experiment_timeout);
+
+ if ($status != 0)
+ {
+ print STDERR "ERROR: $name returned $status\n";
+ break;
+ }
+
+ $Notification->Kill ();
+ }
+
+$Naming->Kill ();
+
+unlink $namingior;
+unlink $notifyior;
+
+exit $status;
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/svc.conf b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/svc.conf
new file mode 100644
index 00000000000..71ec9c42ce6
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/svc.conf
@@ -0,0 +1 @@
+static Resource_Factory "-ORBReactorMaskSignals 0"
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/svc.conf.xml b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/svc.conf.xml
new file mode 100644
index 00000000000..0673554e968
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/svc.conf.xml
@@ -0,0 +1,5 @@
+<?xml version='1.0'?>
+<!-- Converted from ./orbsvcs/tests/Notify/performance-tests/RedGreen/svc.conf by svcconf-convert.pl -->
+<ACE_Svc_Conf>
+ <static id="Resource_Factory" params="-ORBReactorMaskSignals 0"/>
+</ACE_Svc_Conf>