diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/performance-tests')
114 files changed, 8108 insertions, 0 deletions
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Filter.mpc b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Filter.mpc new file mode 100644 index 00000000000..f2020bde1d3 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Filter.mpc @@ -0,0 +1,57 @@ +// $Id$ + +project(*idl): taoidldefaults, minimum_corba { + IDL_Files { + go.idl + } + custom_only = 1 +} + +project(*Ntf Perf Struct Supp): notifytest, minimum_corba { + after += *idl + exename = Structured_Supplier + Source_Files { + Structured_Supplier.cpp + goS.cpp + goC.cpp + } + IDL_Files { + } +} + +project(*Ntf Perf Struct Cons): notifytest, minimum_corba { + after += *idl + exename = Structured_Consumer + Source_Files { + goC.cpp + Notify_Structured_Push_Consumer.cpp + Structured_Consumer.cpp + } + IDL_Files { + } +} + +project(*Ntf Perf Seq Supp): notifytest, minimum_corba { + after += *idl + exename = Sequence_Supplier + Source_Files { + Sequence_Supplier.cpp + goS.cpp + goC.cpp + } + IDL_Files { + } +} + +project(*notify perf Sequence Consumer): notifytest, minimum_corba { + after += *idl + exename = Sequence_Consumer + Source_Files { + goC.cpp + Notify_Sequence_Push_Consumer.cpp + Sequence_Consumer.cpp + } + IDL_Files { + } +} + diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Makefile.am b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Makefile.am new file mode 100644 index 00000000000..4718b9c9c15 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Makefile.am @@ -0,0 +1,258 @@ +## 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_IDL = ACE_ROOT=$(ACE_ROOT) TAO_ROOT=$(TAO_ROOT) $(TAO_BUILDDIR)/TAO_IDL/tao_idl +TAO_IDL_DEP = $(TAO_BUILDDIR)/TAO_IDL/tao_idl +TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) -I$(srcdir) -g $(ACE_BUILDDIR)/apps/gperf/src/gperf +TAO_ROOT = $(top_srcdir) + +noinst_PROGRAMS = + +## Makefile.Filter_Idl.am + +if !BUILD_MINIMUM_CORBA + +BUILT_SOURCES = \ + goC.cpp \ + goC.h \ + goC.inl \ + goS.cpp \ + goS.h \ + goS.inl + +CLEANFILES = \ + go-stamp \ + goC.cpp \ + goC.h \ + goC.inl \ + goS.cpp \ + goS.h \ + goS.inl + +goC.cpp goC.h goC.inl goS.cpp goS.h goS.inl: go-stamp + +go-stamp: $(srcdir)/go.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -Sa -St $(srcdir)/go.idl + @touch $@ + + +noinst_HEADERS = \ + go.idl + +endif !BUILD_MINIMUM_CORBA + +## Makefile.Filter_Notify_Perf_Sequence_Consumer.am + +if BUILD_CORBA_MESSAGING +if !BUILD_MINIMUM_CORBA + +noinst_PROGRAMS += Sequence_Consumer + +Sequence_Consumer_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 + +Sequence_Consumer_SOURCES = \ + Notify_Sequence_Push_Consumer.cpp \ + Sequence_Consumer.cpp \ + goC.cpp \ + Notify_Sequence_Push_Consumer.h + +Sequence_Consumer_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 + +## Makefile.Filter_Ntf_Perf_Seq_Supp.am + +if BUILD_CORBA_MESSAGING +if !BUILD_MINIMUM_CORBA + +noinst_PROGRAMS += Sequence_Supplier + +Sequence_Supplier_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 + +Sequence_Supplier_SOURCES = \ + Sequence_Supplier.cpp \ + goC.cpp \ + goS.cpp \ + Notify_Sequence_Push_Consumer.h \ + Notify_Structured_Push_Consumer.h + +Sequence_Supplier_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 + +## Makefile.Filter_Ntf_Perf_Struct_Cons.am + +if BUILD_CORBA_MESSAGING +if !BUILD_MINIMUM_CORBA + +noinst_PROGRAMS += Structured_Consumer + +Structured_Consumer_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 + +Structured_Consumer_SOURCES = \ + Notify_Structured_Push_Consumer.cpp \ + Structured_Consumer.cpp \ + goC.cpp \ + Notify_Structured_Push_Consumer.h + +Structured_Consumer_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 + +## Makefile.Filter_Ntf_Perf_Struct_Supp.am + +if BUILD_CORBA_MESSAGING +if !BUILD_MINIMUM_CORBA + +noinst_PROGRAMS += Structured_Supplier + +Structured_Supplier_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 + +Structured_Supplier_SOURCES = \ + Structured_Supplier.cpp \ + goC.cpp \ + goS.cpp \ + Notify_Sequence_Push_Consumer.h \ + Notify_Structured_Push_Consumer.h + +Structured_Supplier_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/Filter/Notify_Sequence_Push_Consumer.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Notify_Sequence_Push_Consumer.cpp new file mode 100644 index 00000000000..4abebdab3f4 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Notify_Sequence_Push_Consumer.cpp @@ -0,0 +1,92 @@ +// $Id$ + +#include "Notify_Sequence_Push_Consumer.h" +#include "Notify_Test_Client.h" +#include "common.h" + +#include "ace/OS_NS_sys_time.h" + +Notify_Sequence_Push_Consumer::Notify_Sequence_Push_Consumer ( + const char* name, + unsigned int expected, + Notify_Test_Client& client) + : name_ (name), + expected_ (expected), + count_ (0), + client_ (client) +{ + this->client_.consumer_start (this); +} + + +Notify_Sequence_Push_Consumer::~Notify_Sequence_Push_Consumer () +{ +} + +void +Notify_Sequence_Push_Consumer::_connect ( + CosNotifyChannelAdmin::ConsumerAdmin_ptr consumer_admin + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + CosNotifyComm::SequencePushConsumer_var objref = + this->_this (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + CosNotifyChannelAdmin::ProxySupplier_var proxysupplier = + consumer_admin->obtain_notification_push_supplier ( + CosNotifyChannelAdmin::SEQUENCE_EVENT, + proxy_id_ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + this->proxy_ = + CosNotifyChannelAdmin::SequenceProxyPushSupplier::_narrow ( + proxysupplier.in () ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + CosNotification::QoSProperties properties(1); + properties.length(1); + properties[0].name = CORBA::string_dup(CosNotification::MaximumBatchSize); + properties[0].value <<= (CORBA::Long)10; + + proxy_->set_qos(properties); + proxy_->connect_sequence_push_consumer (objref.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + // give ownership to POA + this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; +} + + +void +Notify_Sequence_Push_Consumer::push_structured_events( + const CosNotification::EventBatch& events + ACE_ENV_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER*/) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + if ( this->count_ == 0 ) + { + this->first_ = ACE_OS::gettimeofday(); + } + + this->count_ += events.length(); + + if (this->count_ > this->expected_) + { + ACE_ERROR ((LM_ERROR, ACE_TEXT ("\nError: Expected %d events. Received %d\n"), expected_, count_)); + this->client_.consumer_done (this); + return; + } + + if (this->count_ >= this->expected_) + { + this->client_.consumer_done (this); + ACE_Time_Value totaltime = ( ACE_OS::gettimeofday() - this->first_ ); + double events_per_ms = static_cast<double>(this->count_) / + static_cast<double>(totaltime.msec()); + ACE_DEBUG((LM_DEBUG, "\nConsumer %s received %d at %.2f events/ms\n", name_.c_str(), this->count_, events_per_ms )); + } +} diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Notify_Sequence_Push_Consumer.h b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Notify_Sequence_Push_Consumer.h new file mode 100644 index 00000000000..ccd5af92252 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Notify_Sequence_Push_Consumer.h @@ -0,0 +1,50 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// TAO/orbsvcs/tests/Notify/Discarding +// +// = FILENAME +// Notify_Sequence_Push_Consumer.h +// +// = DESCRIPTION +// A sequence push consumer implementation. +// +// = AUTHOR +// Chad Elliott <elliott_c@ociweb.com> +// +// ========================================================================== +#ifndef TAO_NOTIFY_SEQUENCE_PUSH_CONSUMER_H +#define TAO_NOTIFY_SEQUENCE_PUSH_CONSUMER_H + +#include "Notify_SequencePushConsumer.h" + +class Notify_Test_Client; + +class Notify_Sequence_Push_Consumer : public TAO_Notify_Tests_SequencePushConsumer +{ +public: + Notify_Sequence_Push_Consumer (const char* name, + unsigned int expected, + Notify_Test_Client& client); + + ~Notify_Sequence_Push_Consumer (); + + void _connect (CosNotifyChannelAdmin::ConsumerAdmin_ptr consumer_admin + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + +private: + void push_structured_events(const CosNotification::EventBatch& + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + ACE_CString name_; + unsigned int expected_; + unsigned int count_; + Notify_Test_Client& client_; + ACE_Time_Value first_; +}; + +#endif /* TAO_NOTIFY_SEQUENCE_PUSH_CONSUMER_H */ diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Notify_Structured_Push_Consumer.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Notify_Structured_Push_Consumer.cpp new file mode 100644 index 00000000000..271bf5fbeeb --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Notify_Structured_Push_Consumer.cpp @@ -0,0 +1,86 @@ +// $Id$ + +#include "Notify_Structured_Push_Consumer.h" +#include "Notify_Test_Client.h" +#include "common.h" + +#include "ace/OS_NS_sys_time.h" + +Notify_Structured_Push_Consumer::Notify_Structured_Push_Consumer ( + const char* name, + unsigned int expected, + Notify_Test_Client& client) + : name_ (name), + expected_ (expected), + count_ (0), + client_ (client) +{ + this->client_.consumer_start (this); +} + + +Notify_Structured_Push_Consumer::~Notify_Structured_Push_Consumer () +{ +} + + +void +Notify_Structured_Push_Consumer::_connect ( + CosNotifyChannelAdmin::ConsumerAdmin_ptr consumer_admin + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + 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_id_ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + this->proxy_ = + CosNotifyChannelAdmin::StructuredProxyPushSupplier::_narrow ( + proxysupplier.in () ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + proxy_->connect_structured_push_consumer (objref.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; +} + + +void +Notify_Structured_Push_Consumer::push_structured_event( + const CosNotification::StructuredEvent& /*event*/ + ACE_ENV_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER*/) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + if ( this->count_ == 0 ) + { + this->first_ = ACE_OS::gettimeofday(); + } + + if (this->count_ == this->expected_) + { + ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: too many events received.\n"))); + } + + //ACE_DEBUG((LM_DEBUG, "-")); + + this->count_++; + + if (this->count_ == this->expected_) + { + this->client_.consumer_done (this); + ACE_Time_Value totaltime = ( ACE_OS::gettimeofday() - this->first_ ); + double events_per_ms = static_cast<double>(this->count_) / + static_cast<double>(totaltime.msec()); + ACE_DEBUG((LM_DEBUG, "Consumer %s received %d at %.2f events/ms\n", name_.c_str(), this->count_, events_per_ms )); + } +} diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Notify_Structured_Push_Consumer.h b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Notify_Structured_Push_Consumer.h new file mode 100644 index 00000000000..cd34305133d --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Notify_Structured_Push_Consumer.h @@ -0,0 +1,50 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// TAO/orbsvcs/tests/Notify/Discarding +// +// = FILENAME +// Notify_Structured_Push_Consumer.h +// +// = DESCRIPTION +// A structured push consumer implementation. +// +// = AUTHOR +// Chad Elliott <elliott_c@ociweb.com> +// +// ========================================================================== +#ifndef TAO_NOTIFY_STRUCTURED_PUSH_CONSUMER_H +#define TAO_NOTIFY_STRUCTURED_PUSH_CONSUMER_H + +#include "Notify_StructuredPushConsumer.h" + +class Notify_Test_Client; + +class Notify_Structured_Push_Consumer : public TAO_Notify_Tests_StructuredPushConsumer +{ +public: + Notify_Structured_Push_Consumer ( + const char* name, + unsigned int expected, + Notify_Test_Client& client); + ~Notify_Structured_Push_Consumer (); + + void _connect (CosNotifyChannelAdmin::ConsumerAdmin_ptr consumer_admin + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + +private: + void push_structured_event(const CosNotification::StructuredEvent& + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + ACE_CString name_; + unsigned int expected_; + unsigned int count_; + Notify_Test_Client& client_; + ACE_Time_Value first_; +}; + +#endif /* TAO_NOTIFY_STRUCTURED_PUSH_CONSUMER_H */ diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/README b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/README new file mode 100644 index 00000000000..0d326588015 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/README @@ -0,0 +1,34 @@ +Notification Performance Test +================================ + +Description +----------- + +Usage +----- + +The test consists of a Structured_Supplier and Structured_Consumer as well +as a Sequence_Supplier and Sequence_Consumer. The usage for each as is +follows: + +$ Structured_Supplier -\? +usage: Structured_Supplier -o <iorfile> -e <# of events> + +$ Structured_Consumer -\? +usage: Structured_Consumer -k <ior> -c <# of consumers> -e <expected events> + -f + +$ Sequence_Supplier -\? +usage: Sequence_Supplier -o <iorfile> -e <# of events> + +$ Sequence_Consumer -\? +usage: Sequence_Consumer -k <ior> -c <# of consumers> -e <expected events> -f + + +To run this test, just run the run_test.pl perl script. It will run both +structured and sequence tests with each of the implemented discard policies. + + +Expected Results +---------------- +This varies between hardware. diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Consumer.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Consumer.cpp new file mode 100644 index 00000000000..8d284b588a5 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Consumer.cpp @@ -0,0 +1,225 @@ +// $Id$ + +// ****************************************************************** +// Include Section +// ****************************************************************** + +#include "ace/Get_Opt.h" + +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" +#include "Notify_Sequence_Push_Consumer.h" +#include "goC.h" +#include "tao/debug.h" +#include "ace/OS_NS_sys_time.h" + +#include "Notify_Test_Client.h" + +// ****************************************************************** +// Data Section +// ****************************************************************** + +static const char* ior = "file://supplier.ior"; +static CORBA::Boolean filter = 0; +static unsigned int consumers = 2; +static unsigned int batch_size = 10; +static unsigned int expected = 100; // 100 sets of 10 + +#define GRAMMAR "TCL" + +// ****************************************************************** +// Subroutine Section +// ****************************************************************** + +class Consumer_Client : public Notify_Test_Client +{ +public: + virtual int parse_args (int argc, char* argv[]); +}; + + +int +Consumer_Client::parse_args (int argc, char *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, "k:c:e:f"); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'k': + ior = get_opts.optarg; + break; + + case 'c': + consumers = ACE_OS::atoi (get_opts.optarg); + break; + + case 'e': + expected = ACE_OS::atoi (get_opts.optarg); + break; + + case 'f': + filter = 1; + break; + + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s " + "-k <ior> " + "-c <# of consumers> " + "-e <expected events> " + "-f " + "\n", + argv [0]), + -1); + } + // Indicates sucessful parsing of the command line + return 0; +} + + +static CosNotifyChannelAdmin::ConsumerAdmin_ptr +create_consumeradmin (CosNotifyChannelAdmin::EventChannel_ptr ec + ACE_ENV_ARG_DECL) +{ + CosNotifyChannelAdmin::AdminID adminid = 0; + CosNotifyChannelAdmin::ConsumerAdmin_var admin = + ec->new_for_consumers (CosNotifyChannelAdmin::AND_OP, + adminid + ACE_ENV_ARG_PARAMETER); + + ACE_CHECK_RETURN (0); + + if (filter) + { + ACE_DEBUG((LM_DEBUG, "\nConsumer filter enabled.\n")); + + CosNotifyFilter::FilterFactory_var ffact = + ec->default_filter_factory (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + CosNotifyFilter::Filter_var filter = + ffact->create_filter (GRAMMAR ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + CosNotifyFilter::ConstraintExpSeq constraint_list (1); + constraint_list.length (1); + + constraint_list[0].event_types.length (0); + constraint_list[0].constraint_expr = + CORBA::string_dup ("type == 'even'"); + + filter->add_constraints (constraint_list ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + admin->add_filter (filter.in () ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + } + + return CosNotifyChannelAdmin::ConsumerAdmin::_duplicate (admin.in ()); +} + + +static void +create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, + Notify_Test_Client* client + ACE_ENV_ARG_DECL) +{ + for(unsigned int i = 0; i < consumers; i++) + { + // startup the first consumer + char name[64] = ""; + ACE_OS::sprintf(name, "consumer%u", i); + Notify_Sequence_Push_Consumer* consumer; + ACE_NEW_THROW_EX (consumer, + Notify_Sequence_Push_Consumer ( + name, + expected * batch_size, + *client), + CORBA::NO_MEMORY ()); + + consumer->init (client->root_poa () ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + consumer->_connect (admin ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } +} + +// ****************************************************************** +// Main Section +// ****************************************************************** + +int main (int argc, char* argv[]) +{ + int status = 0; + ACE_TRY_NEW_ENV + { + Consumer_Client client; + + status = client.init (argc, argv ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (status == 0) + { + // If we are filtering, we will get half as many as originally + // expected + if (filter) + { + expected /= 2; + } + + CosNotifyChannelAdmin::EventChannel_var ec = + client.create_event_channel ("MyEventChannel", 1 + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + CORBA::ORB_ptr orb = client.orb (); + CORBA::Object_var object = + orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + sig_var sig = sig::_narrow (object.in () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (CORBA::is_nil (sig.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + "Object reference <%s> is nil\n", + ior), + 1); + } + + CosNotifyChannelAdmin::ConsumerAdmin_var admin = + create_consumeradmin (ec.in () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (!CORBA::is_nil (admin.in ())) + { + create_consumers(admin.in (), &client ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + // Tell the supplier to go + sig->go (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + client.ORB_run(ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + ACE_DEBUG((LM_DEBUG, "Consumer done.\n")); + + sig->done (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + } + } + ACE_CATCH (CORBA::Exception, e) + { + ACE_PRINT_EXCEPTION (e, "Error: Consumer exception: "); + status = 1; + } + ACE_ENDTRY; + + return status; +} diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Supplier.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Supplier.cpp new file mode 100644 index 00000000000..7b7df800ca5 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Supplier.cpp @@ -0,0 +1,263 @@ +// $Id$ + +// ****************************************************************** +// Include Section +// ****************************************************************** + +#include "ace/Get_Opt.h" +#include "ace/Auto_Ptr.h" + +#include "tao/ORB_Core.h" + +#include "orbsvcs/CosNotifyChannelAdminS.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" +#include "Notify_SequencePushSupplier.h" +#include "goS.h" + +#include "Notify_Test_Client.h" + +#include "ace/OS_NS_unistd.h" + +// ****************************************************************** +// Data Section +// ****************************************************************** + +static TAO_Notify_Tests_SequencePushSupplier* supplier_1 = 0; +static int max_events = 100; // 100 sets of 10 +static const CORBA::ULong amount = 10; +static const char* ior_output_file = "supplier.ior"; + +// ****************************************************************** +// Subroutine Section +// ****************************************************************** +class sig_i : public POA_sig +{ +public: + sig_i(CORBA::ORB_ptr orb) + : orb_(orb) + , started_(false) + { + } + + void go (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + started_ = true; + } + + void done (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + started_ = false; + } + + void wait_for_startup() + { + while (! started_) { + ACE_Time_Value tv(0, 100 * 1000); // 100ms + orb_->run(tv); + } + } + + void wait_for_completion() + { + while (started_) { + ACE_Time_Value tv(0, 100 * 1000); // 100ms + orb_->run(tv); + } + } + +private: + CORBA::ORB_ptr orb_; + bool started_; +}; + +class Supplier_Client : public Notify_Test_Client +{ +public: + virtual int parse_args (int argc, char* argv[]); +}; + + +int +Supplier_Client::parse_args (int argc, char *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, "o:e:"); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'e': + max_events = ACE_OS::atoi(get_opts.optarg); + break; + + case 'o': + ior_output_file = get_opts.optarg; + break; + + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s " + "-o <iorfile> -e <# of events>" + "\n", + argv [0]), + -1); + } + + // Indicates sucessful parsing of the command line + return 0; +} + + +static CosNotifyChannelAdmin::SupplierAdmin_ptr +create_supplieradmin (CosNotifyChannelAdmin::EventChannel_ptr ec + ACE_ENV_ARG_DECL) +{ + CosNotifyChannelAdmin::AdminID adminid = 0; + CosNotifyChannelAdmin::SupplierAdmin_var admin = + ec->new_for_suppliers (CosNotifyChannelAdmin::AND_OP, + adminid + ACE_ENV_ARG_PARAMETER); + + ACE_CHECK_RETURN (0); + + return CosNotifyChannelAdmin::SupplierAdmin::_duplicate (admin.in ()); +} + + +static void +SendEvents (int id ACE_ENV_ARG_DECL) +{ + ACE_UNUSED_ARG(id); + CosNotification::EventBatch events (amount); + + events.length (amount); + + for(CORBA::ULong z = 0; z < amount; z++) + { + const char* type = ( (z & 1) == 1 ? "odd" : "even" ); + events[z].header.fixed_header.event_type.domain_name = + CORBA::string_dup("Orbix 2000 Demos"); + events[z].header.fixed_header.event_type.type_name = + CORBA::string_dup("Sequence Notification Push Demo Event"); + + events[z].header.fixed_header.event_name = CORBA::string_dup("test event"); + + events[z].filterable_data.length (1); + events[z].filterable_data[0].name = CORBA::string_dup("type"); + events[z].filterable_data[0].value <<= type; + } + + ACE_TRY_NEW_ENV + { + supplier_1->send_events(events ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCH (CORBA::Exception, e) + { + ACE_PRINT_EXCEPTION (e, "Error: Supplier exception: "); + } + ACE_ENDTRY; +} + +static void +create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, + PortableServer::POA_ptr poa + ACE_ENV_ARG_DECL) +{ + // startup the first supplier + ACE_NEW_THROW_EX (supplier_1, + TAO_Notify_Tests_SequencePushSupplier (), + CORBA::NO_MEMORY ()); + + supplier_1->init (poa ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + supplier_1->connect (admin ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + + +// ****************************************************************** +// Main Section +// ****************************************************************** + +int main (int argc, char* argv[]) +{ + ACE_Auto_Ptr< sig_i > sig_impl; + int status = 0; + ACE_TRY_NEW_ENV + { + Supplier_Client client; + + status = client.init (argc, argv ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (status == 0) + { + CosNotifyChannelAdmin::EventChannel_var ec = + client.create_event_channel ("MyEventChannel", 0 + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + CORBA::ORB_ptr orb = client.orb (); + + sig_impl.reset( new sig_i( orb ) ); + sig_var sig = sig_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + CORBA::String_var ior = + orb->object_to_string (sig.in () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + // If the ior_output_file exists, output the ior to it + if (ior_output_file != 0) + { + FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); + if (output_file == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Cannot open output file for " + "writing IOR: %s", + ior_output_file), + 1); + ACE_OS::fprintf (output_file, "%s", ior.in ()); + ACE_OS::fclose (output_file); + } + + CosNotifyChannelAdmin::SupplierAdmin_var admin = + create_supplieradmin (ec.in () ACE_ENV_ARG_PARAMETER); + if (!CORBA::is_nil (admin.in ())) + { + create_suppliers(admin.in (), client.root_poa () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + sig_impl->wait_for_startup(); + + ACE_DEBUG((LM_DEBUG, " 1 supplier sending %d events...\n", (max_events*amount))); + for (int i = 0; i < max_events; ++i) + { + SendEvents (i ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_DEBUG((LM_DEBUG, "\nSupplier sent %d events.\n", (max_events*amount))); + + sig_impl->wait_for_completion(); + + ACE_OS::unlink (ior_output_file); + + ec->destroy(ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + } + } + ACE_CATCH (CORBA::Exception, e) + { + ACE_PRINT_EXCEPTION (e, "Error: Supplier exception: "); + status = 1; + } + ACE_ENDTRY; + + return status; +} diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Consumer.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Consumer.cpp new file mode 100644 index 00000000000..a45be86190f --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Consumer.cpp @@ -0,0 +1,223 @@ +// $Id$ + +// ****************************************************************** +// Include Section +// ****************************************************************** + +#include "ace/Get_Opt.h" + +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" +#include "Notify_Structured_Push_Consumer.h" +#include "goC.h" +#include "tao/debug.h" +#include "Notify_Test_Client.h" +#include "ace/OS_NS_sys_time.h" + +// ****************************************************************** +// Data Section +// ****************************************************************** + +static const char* ior = "file://supplier.ior"; +static CORBA::Boolean filter = 0; +static unsigned int consumers = 2; +static unsigned int expected = 1000; + +#define GRAMMAR "TCL" + +// ****************************************************************** +// Subroutine Section +// ****************************************************************** + +class Consumer_Client : public Notify_Test_Client +{ +public: + virtual int parse_args (int argc, char* argv[]); +}; + + +int +Consumer_Client::parse_args (int argc, char *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, "k:e:c:f"); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'k': + ior = get_opts.optarg; + break; + + case 'c': + consumers = ACE_OS::atoi (get_opts.optarg); + break; + + case 'e': + expected = ACE_OS::atoi (get_opts.optarg); + break; + + case 'f': + filter = 1; + break; + + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s " + "-k <ior> " + "-c <# of consumers> " + "-e <expected events> " + "-f " + "\n", + argv [0]), + -1); + } + // Indicates sucessful parsing of the command line + return 0; +} + + +static CosNotifyChannelAdmin::ConsumerAdmin_ptr +create_consumeradmin (CosNotifyChannelAdmin::EventChannel_ptr ec + ACE_ENV_ARG_DECL) +{ + CosNotifyChannelAdmin::AdminID adminid = 0; + CosNotifyChannelAdmin::ConsumerAdmin_var admin = + ec->new_for_consumers (CosNotifyChannelAdmin::AND_OP, + adminid + ACE_ENV_ARG_PARAMETER); + + ACE_CHECK_RETURN (0); + + if (filter) + { + // Filter Section + CosNotifyFilter::FilterFactory_var ffact = + ec->default_filter_factory (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + // One Filter + CosNotifyFilter::Filter_var filter = + ffact->create_filter (GRAMMAR ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + CosNotifyFilter::ConstraintExpSeq constraint_list (1); + constraint_list.length (1); + + constraint_list[0].event_types.length (0); + constraint_list[0].constraint_expr = + CORBA::string_dup ("type == 'even'"); + + filter->add_constraints (constraint_list ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + admin->add_filter (filter.in () ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + // End One Filter + } + + return CosNotifyChannelAdmin::ConsumerAdmin::_duplicate (admin.in ()); +} + + +static void +create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, + Notify_Test_Client* client + ACE_ENV_ARG_DECL) +{ + for(unsigned int i = 0; i < consumers; i++) + { + // startup the first consumer + char name[64] = ""; + ACE_OS::sprintf(name, "consumer%u", i); + Notify_Structured_Push_Consumer* consumer; + ACE_NEW_THROW_EX (consumer, + Notify_Structured_Push_Consumer ( + name, + expected, + *client), + CORBA::NO_MEMORY ()); + + consumer->init (client->root_poa () ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + consumer->_connect (admin ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } +} + +// ****************************************************************** +// Main Section +// ****************************************************************** + +int main (int argc, char* argv[]) +{ + int status = 0; + ACE_TRY_NEW_ENV + { + Consumer_Client client; + + status = client.init (argc, argv ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (status == 0) + { + // If we are filtering, we will get half as many as originally + // expected + if (filter) + { + expected /= 2; + } + + CosNotifyChannelAdmin::EventChannel_var ec = + client.create_event_channel ("MyEventChannel", 1 + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + CORBA::ORB_ptr orb = client.orb (); + CORBA::Object_var object = + orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + sig_var sig = sig::_narrow (object.in () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (CORBA::is_nil (sig.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + "Object reference <%s> is nil\n", + ior), + 1); + } + + CosNotifyChannelAdmin::ConsumerAdmin_var admin = + create_consumeradmin (ec.in () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (!CORBA::is_nil (admin.in ())) + { + create_consumers(admin.in (), &client ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + // Tell the supplier to go + sig->go (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + client.ORB_run( ACE_ENV_SINGLE_ARG_PARAMETER ); + ACE_TRY_CHECK; + ACE_DEBUG((LM_DEBUG, "Consumer done.\n")); + + sig->done (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + } + } + ACE_CATCH (CORBA::Exception, e) + { + ACE_PRINT_EXCEPTION (e, "Error: Consumer exception: "); + status = 1; + } + ACE_ENDTRY; + + return status; +} diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Supplier.cpp new file mode 100644 index 00000000000..f89028a58c1 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Supplier.cpp @@ -0,0 +1,257 @@ +// $Id$ + +// ****************************************************************** +// Include Section +// ****************************************************************** + +#include "ace/Get_Opt.h" +#include "ace/Auto_Ptr.h" + +#include "tao/ORB_Core.h" + +#include "orbsvcs/CosNotifyChannelAdminS.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" +#include "Notify_StructuredPushSupplier.h" +#include "goS.h" + +#include "Notify_Test_Client.h" + +#include "ace/OS_NS_unistd.h" + +// ****************************************************************** +// Data Section +// ****************************************************************** + +static TAO_Notify_Tests_StructuredPushSupplier* supplier_1 = 0; +static int max_events = 1000; +static const char* ior_output_file = "supplier.ior"; + +// ****************************************************************** +// Subroutine Section +// ****************************************************************** +class sig_i : public POA_sig +{ +public: + sig_i(CORBA::ORB_ptr orb) + : orb_(orb) + , started_(false) + { + } + + void go (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + started_ = true; + } + + void done (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + started_ = false; + } + + void wait_for_startup() + { + while (! started_) { + ACE_Time_Value tv(0, 100 * 1000); // 100ms + orb_->run(tv); + } + } + + void wait_for_completion() + { + while (started_) { + ACE_Time_Value tv(0, 100 * 1000); // 100ms + orb_->run(tv); + } + } + +private: + CORBA::ORB_ptr orb_; + bool started_; +}; + + +class Supplier_Client : public Notify_Test_Client +{ +public: + virtual int parse_args (int argc, char* argv[]); +}; + + +int +Supplier_Client::parse_args (int argc, char *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, "o:e:"); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'e': + max_events = ACE_OS::atoi(get_opts.optarg); + break; + + case 'o': + ior_output_file = get_opts.optarg; + break; + + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s " + "-o <iorfile> -e <# of events>" + "\n", + argv [0]), + -1); + } + + // Indicates sucessful parsing of the command line + return 0; +} + + +static CosNotifyChannelAdmin::SupplierAdmin_ptr +create_supplieradmin (CosNotifyChannelAdmin::EventChannel_ptr ec + ACE_ENV_ARG_DECL) +{ + CosNotifyChannelAdmin::AdminID adminid = 0; + CosNotifyChannelAdmin::SupplierAdmin_var admin = + ec->new_for_suppliers (CosNotifyChannelAdmin::AND_OP, + adminid + ACE_ENV_ARG_PARAMETER); + + ACE_CHECK_RETURN (0); + + return CosNotifyChannelAdmin::SupplierAdmin::_duplicate (admin.in ()); +} + + +static void +SendEvent (int id ACE_ENV_ARG_DECL_NOT_USED) +{ + const char* type = ( (id & 1) == 1 ? "odd" : "even" ); + CosNotification::StructuredEvent event; + + event.header.fixed_header.event_type.domain_name = + CORBA::string_dup("Orbix 2000 Demos"); + event.header.fixed_header.event_type.type_name = + CORBA::string_dup("Sequence Notification Push Demo Event"); + + event.header.fixed_header.event_name = CORBA::string_dup("test event"); + + + event.filterable_data.length (1); + event.filterable_data[0].name = CORBA::string_dup("type"); + event.filterable_data[0].value <<= type; + + ACE_TRY_NEW_ENV + { + supplier_1->send_event(event ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCH (CORBA::Exception, e) + { + ACE_PRINT_EXCEPTION (e, "Error: Supplier exception: "); + } + ACE_ENDTRY; +} + +static void +create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, + PortableServer::POA_ptr poa + ACE_ENV_ARG_DECL) +{ + // startup the first supplier + ACE_NEW_THROW_EX (supplier_1, + TAO_Notify_Tests_StructuredPushSupplier (), + CORBA::NO_MEMORY ()); + + supplier_1->init (poa ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + supplier_1->connect (admin ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + + +// ****************************************************************** +// Main Section +// ****************************************************************** + +int main (int argc, char* argv[]) +{ + ACE_Auto_Ptr< sig_i > sig_impl; + int status = 0; + ACE_TRY_NEW_ENV + { + Supplier_Client client; + status = client.init (argc, argv ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (status == 0) + { + CosNotifyChannelAdmin::EventChannel_var ec = + client.create_event_channel ("MyEventChannel", 0 + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + CORBA::ORB_ptr orb = client.orb (); + + sig_impl.reset( new sig_i( orb ) ); + sig_var sig = sig_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + CORBA::String_var ior = + orb->object_to_string (sig.in () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + // If the ior_output_file exists, output the ior to it + if (ior_output_file != 0) + { + FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); + if (output_file == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Cannot open output file for " + "writing IOR: %s", + ior_output_file), + 1); + ACE_OS::fprintf (output_file, "%s", ior.in ()); + ACE_OS::fclose (output_file); + } + + CosNotifyChannelAdmin::SupplierAdmin_var admin = + create_supplieradmin (ec.in () ACE_ENV_ARG_PARAMETER); + if (!CORBA::is_nil (admin.in ())) + { + create_suppliers(admin.in (), client.root_poa () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + sig_impl->wait_for_startup(); + + ACE_DEBUG((LM_DEBUG, "1 supplier sending %d events...\n", max_events)); + for (int i = 0; i < max_events; ++i) + { + SendEvent (i ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_DEBUG((LM_DEBUG, "\nSupplier sent %d events.\n", max_events)); + + sig_impl->wait_for_completion(); + + ACE_OS::unlink (ior_output_file); + + ec->destroy(ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + } + } + ACE_CATCH (CORBA::Exception, e) + { + ACE_PRINT_EXCEPTION (e, "Error: Supplier exception: "); + status = 1; + } + ACE_ENDTRY; + + return status; +} diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/go.idl b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/go.idl new file mode 100644 index 00000000000..e24bfd036c7 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/go.idl @@ -0,0 +1,10 @@ +// $Id$ + +interface sig +{ + // Tell the server to start + oneway void go (); + + // Tell the server the consumer is done + oneway void done (); +}; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/notify.conf b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/notify.conf new file mode 100644 index 00000000000..93af5f9d812 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/notify.conf @@ -0,0 +1,6 @@ +## $Id$ +# +## Load the static Cos Notification Service +static Notify_Default_Event_Manager_Objects_Factory "-DispatchingThreads 1" + + diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/notify.conf.xml b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/notify.conf.xml new file mode 100644 index 00000000000..f398f140957 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/notify.conf.xml @@ -0,0 +1,6 @@ +<?xml version='1.0'?> +<!-- Converted from ./orbsvcs/tests/Notify/performance-tests/Filter/notify.conf by svcconf-convert.pl --> +<ACE_Svc_Conf> + <!-- # $Id$ --> + <static id="Notify_Default_Event_Manager_Objects_Factory" params="-DispatchingThreads 1"/> +</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl new file mode 100755 index 00000000000..7d1e4ff85a7 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl @@ -0,0 +1,211 @@ +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; + +$ior = PerlACE::LocalFile ("supplier.ior"); +$namingior = PerlACE::LocalFile ("naming.ior"); +$notifyior = PerlACE::LocalFile ("notify.ior"); +$notify_conf = PerlACE::LocalFile ("notify$PerlACE::svcconf_ext"); +$status = 0; + +$port = PerlACE::uniqueid () + 10001; +$NS = new PerlACE::Process ("../../../../Naming_Service/Naming_Service", + "-ORBEndpoint iiop://localhost:$port " . + "-o $namingior"); +$TS = new PerlACE::Process ("../../../../Notify_Service/Notify_Service", + "-ORBInitRef NameService=iioploc://" . + "localhost:$port/NameService " . + "-IORoutput $notifyior -ORBSvcConf " . + "$notify_conf"); +$STS = new PerlACE::Process ("Structured_Supplier", + "-ORBInitRef NameService=iioploc://" . + "localhost:$port/NameService"); +$STC = new PerlACE::Process ("Structured_Consumer"); + +$SES = new PerlACE::Process ("Sequence_Supplier", + "-ORBInitRef NameService=iioploc://" . + "localhost:$port/NameService"); +$SEC = new PerlACE::Process ("Sequence_Consumer"); + +unlink $ior; +unlink $notifyior; +unlink $namingior; + +$client_args = "-ORBInitRef NameService=iioploc://localhost:" . + "$port/NameService"; + +$NS->Spawn (); +if (PerlACE::waitforfile_timed ($namingior, 20) == -1) { + print STDERR "ERROR: waiting for the naming service to start\n"; + $NS->Kill (); + exit 1; +} + +$TS->Spawn (); +if (PerlACE::waitforfile_timed ($notifyior, 20) == -1) { + print STDERR "ERROR: waiting for the notify service to start\n"; + $TS->Kill (); + $NS->Kill (); + exit 1; +} + +###################################################################### +print "**** Structured Supplier -> 2 Structured Consumers ****\n"; +$STS->Spawn (); +if (PerlACE::waitforfile_timed ($ior, 20) == -1) { + print STDERR "ERROR: waiting for the supplier to start\n"; + $STS->Kill (); + $TS->Kill (); + $NS->Kill (); + exit 1; +} + +$STC->Arguments($client_args); +print $STC->CommandLine ()."\n"; +$client = $STC->SpawnWaitKill (300); +print "\n"; +if ($client != 0) { + $STS->Kill (); + $TS->Kill (); + $NS->Kill (); + exit 1; +} +$server = $STS->WaitKill(5); +if ($server != 0) { + $TS->Kill (); + $NS->Kill (); + exit 1; +} + + +###################################################################### +print "**** Structured Supplier -> Structured Consumer (filtered) ****\n"; + +unlink $ior; +$STS->Spawn (); +if (PerlACE::waitforfile_timed ($ior, 20) == -1) { + print STDERR "ERROR: waiting for the supplier to start\n"; + $STS->Kill (); + $TS->Kill (); + $NS->Kill (); + exit 1; +} + +$STC->Arguments($client_args . " -f -c 1"); +$client = $STC->SpawnWaitKill (60); +print "\n"; +if ($client != 0) { + $STS->Kill (); + $TS->Kill (); + $NS->Kill (); + exit 1; +} +$server = $STS->WaitKill(5); +if ($server != 0) { + $TS->Kill (); + $NS->Kill (); + exit 1; +} + +###################################################################### +print "**** Structured Supplier -> Sequence Consumer (filtered) ****\n"; + +unlink $ior; +$STS->Spawn (); +if (PerlACE::waitforfile_timed ($ior, 20) == -1) { + print STDERR "ERROR: waiting for the supplier to start\n"; + $STS->Kill (); + $TS->Kill (); + $NS->Kill (); + exit 1; +} + +$SEC->Arguments($client_args . " -f -c 1"); +$client = $SEC->SpawnWaitKill (60); +print "\n"; +if ($client != 0) { + $STS->Kill (); + $TS->Kill (); + $NS->Kill (); + exit 1; +} +$server = $STS->WaitKill(5); +if ($server != 0) { + $TS->Kill (); + $NS->Kill (); + exit 1; +} + +###################################################################### +print "**** Sequence Supplier -> 2 Sequence Consumers ****\n"; + +unlink $ior; +$SES->Spawn (); +if (PerlACE::waitforfile_timed ($ior, 20) == -1) { + print STDERR "ERROR: waiting for the supplier to start\n"; + $SES->Kill (); + $TS->Kill (); + $NS->Kill (); + exit 1; +} + +$SEC->Arguments($client_args); +$client = $SEC->SpawnWaitKill (60); +print "\n"; +if ($client != 0) { + $SES->Kill (); + $TS->Kill (); + $NS->Kill (); + exit 1; +} +$server = $SES->WaitKill(5); +if ($server != 0) { + $TS->Kill (); + $NS->Kill (); + exit 1; +} + +###################################################################### +print "**** Sequence Supplier -> Sequence Consumer (filtered) ****\n"; + +unlink $ior; +$SES->Spawn (); +if (PerlACE::waitforfile_timed ($ior, 20) == -1) { + print STDERR "ERROR: waiting for the supplier to start\n"; + $SES->Kill (); + $TS->Kill (); + $NS->Kill (); + exit 1; +} + +$SEC->Arguments($client_args . " -f -c 1"); +$client = $SEC->SpawnWaitKill (60); +print "\n"; +if ($client != 0) { + $SES->Kill (); + $TS->Kill (); + $NS->Kill (); + exit 1; +} +$server = $SES->WaitKill(5); +if ($server != 0) { + $TS->Kill (); + $NS->Kill (); + exit 1; +} + +$TS->Kill (); +$NS->Kill (); + +unlink $ior; +unlink $notifyior; +unlink $namingior; + + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Makefile.am b/TAO/orbsvcs/tests/Notify/performance-tests/Makefile.am new file mode 100644 index 00000000000..de02210c1a5 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Makefile.am @@ -0,0 +1,15 @@ +## 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 + +SUBDIRS = \ + Filter \ + RedGreen \ + Throughput + 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> diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Makefile.am b/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Makefile.am new file mode 100644 index 00000000000..3b6efe85d86 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Makefile.am @@ -0,0 +1,73 @@ +## 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.Throughput_Ntf_Perf_Throughput.am + +if BUILD_CORBA_MESSAGING +if !BUILD_ACE_FOR_TAO +if !BUILD_MINIMUM_CORBA + +noinst_PROGRAMS = Throughput + +Throughput_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 + +Throughput_SOURCES = \ + Throughput.cpp \ + Throughput.h + +Throughput_LDADD = \ + $(TAO_BUILDDIR)/tao/libTAO_Strategies.la \ + $(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_ACE_FOR_TAO +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/Throughput/README b/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/README new file mode 100644 index 00000000000..3b27b5e847e --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/README @@ -0,0 +1,20 @@ + + Notify Throughput + +Test to measure Notify's throughput + +Command line options: +-------------------- +-collocated_ec, +-consumers [count], +-suppliers [count], +-burst_size [size], +-burst_count [count], +-burst_pause [time(uS)], +-payload [size], +-EC [Channel Name], +-ExpectedCount [count] + +e.g. +./Throughput -ORBInitRef NameService=file:///naming.ior -consumers 1 -suppliers 1 -burst_size 1000 -burst_count 1 -payload 16384 + diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.cpp new file mode 100644 index 00000000000..020b750ffa5 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.cpp @@ -0,0 +1,656 @@ +// $Id$ + +#include "Throughput.h" + +#include "ace/Arg_Shifter.h" +#include "ace/Get_Opt.h" +#include "ace/Synch.h" +#include "ace/OS.h" +#include "ace/Dynamic_Service.h" +#include "tao/Strategies/advanced_resource.h" +#include "tao/Messaging/Messaging.h" +#include "orbsvcs/Notify/Service.h" +#include "orbsvcs/Time_Utilities.h" + +ACE_RCSID (Notify_Tests, + Throughput, + "$Id$") + +/***************************************************************************/ + +Throughput_StructuredPushConsumer::Throughput_StructuredPushConsumer ( + Notify_Throughput *test_client + ) + : test_client_ (test_client), + push_count_ (0) +{ +} + +void +Throughput_StructuredPushConsumer::accumulate_into ( + ACE_Throughput_Stats &throughput + ) const +{ + throughput.accumulate (this->throughput_); +} + +void +Throughput_StructuredPushConsumer::dump_stats (const char* msg, + ACE_UINT32 gsf) +{ + this->throughput_.dump_results (msg, gsf); +} + +void +Throughput_StructuredPushConsumer::push_structured_event ( + const CosNotification::StructuredEvent & notification + ACE_ENV_ARG_DECL_NOT_USED + ) + ACE_THROW_SPEC ((CORBA::SystemException, + CosEventComm::Disconnected)) +{ + // Extract payload. + const char* msg; + CORBA::Boolean ok = (notification.remainder_of_body >>= msg); + + if (!ok) + ACE_DEBUG ((LM_DEBUG, "(%t) Error extracting message body\n")); + + TimeBase::TimeT Throughput_base_recorded; + ACE_hrtime_t Throughput_base; + + notification.filterable_data[0].value >>= Throughput_base_recorded; + + ORBSVCS_Time::TimeT_to_hrtime (Throughput_base, + Throughput_base_recorded); + + ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); + + if (this->push_count_ == 0) + { + this->throughput_start_ = ACE_OS::gethrtime (); + } + + ++this->push_count_; + + // Grab timestamp again. + ACE_hrtime_t now = ACE_OS::gethrtime (); + + // Record statistics. + this->throughput_.sample (now - this->throughput_start_, + now - Throughput_base); + + if (this->push_count_%1000 == 0) + { + ACE_DEBUG ((LM_DEBUG, + "(%P)(%t) event count = %d\n", + this->push_count_)); + } + + if (push_count_ == test_client_->perconsumer_count_) + { + ACE_DEBUG ((LM_DEBUG, + "(%t)expected count reached\n")); + test_client_->peer_done (); + } +} + +/***************************************************************************/ + +Throughput_StructuredPushSupplier::Throughput_StructuredPushSupplier ( + Notify_Throughput* test_client + ) + :test_client_ (test_client), + push_count_ (0) +{ +} + +Throughput_StructuredPushSupplier::~Throughput_StructuredPushSupplier () +{ +} + +void +Throughput_StructuredPushSupplier::accumulate_into ( + ACE_Throughput_Stats &throughput + ) const +{ + throughput.accumulate (this->throughput_); +} + +void +Throughput_StructuredPushSupplier::dump_stats (const char* msg, + ACE_UINT32 gsf) +{ + this->throughput_.dump_results (msg, gsf); +} + +int +Throughput_StructuredPushSupplier::svc (void) +{ + // Initialize a time value to pace the test. + ACE_Time_Value tv (0, test_client_->burst_pause_); + + // Operations. + CosNotification::StructuredEvent event; + + // EventHeader + + // FixedEventHeader + // EventType + // string + event.header.fixed_header.event_type.domain_name = CORBA::string_dup("*"); + // string + event.header.fixed_header.event_type.type_name = CORBA::string_dup("*"); + // string + event.header.fixed_header.event_name = CORBA::string_dup("myevent"); + + // OptionalHeaderFields + // PropertySeq + // sequence<Property>: string name, any value + CosNotification::PropertySeq& qos = event.header.variable_header; + qos.length (0); // put nothing here + + // FilterableEventBody + // PropertySeq + // sequence<Property>: string name, any value + event.filterable_data.length (1); + event.filterable_data[0].name = CORBA::string_dup("Throughput_base"); + + event.remainder_of_body <<= test_client_->payload_; + + ACE_DECLARE_NEW_CORBA_ENV; + + this->throughput_start_ = ACE_OS::gethrtime (); + + for (int i = 0; i < test_client_->burst_count_; ++i) + { + for (int j = 0; j < test_client_->burst_size_; ++j) + { + // Record current time. + ACE_hrtime_t start = ACE_OS::gethrtime (); + TimeBase::TimeT Throughput_base; + ORBSVCS_Time::hrtime_to_TimeT (Throughput_base, + start); + // Any. + event.filterable_data[0].value <<= Throughput_base; + + this->proxy_->push_structured_event (event + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + + ACE_hrtime_t end = ACE_OS::gethrtime (); + this->throughput_.sample (end - this->throughput_start_, + end - start); + } + + ACE_OS::sleep (tv); + } + + ACE_DEBUG ((LM_DEBUG, "(%P) (%t) Supplier done\n")); + test_client_->peer_done (); + return 0; +} + +/***************************************************************************/ +Notify_Throughput::Notify_Throughput (void) + : collocated_ec_ (0), + burst_count_ (1), + burst_pause_ (10000), + burst_size_ (1000), + payload_size_ (1024), + payload_ (0), + consumer_count_ (1), + supplier_count_ (1), + perconsumer_count_ (burst_size_*burst_count_*supplier_count_), + consumers_ (0), + suppliers_ (0), + nthreads_ (1), + peer_done_count_ (consumer_count_ + supplier_count_), + condition_ (lock_) +{ +} + +Notify_Throughput::~Notify_Throughput () +{ + ACE_DECLARE_NEW_CORBA_ENV; + this->orb_->shutdown (0 + ACE_ENV_ARG_PARAMETER); + + delete payload_; +} + +int +Notify_Throughput::init (int argc, char* argv [] ACE_ENV_ARG_DECL) +{ + // Initialize base class. + Notify_Test_Client::init_ORB (argc, + argv + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + +#if (TAO_HAS_CORBA_MESSAGING == 1) + CORBA::Object_var manager_object = + orb_->resolve_initial_references ("ORBPolicyManager" + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + + CORBA::PolicyManager_var policy_manager = + CORBA::PolicyManager::_narrow (manager_object.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + + CORBA::Any sync_scope; + sync_scope <<= Messaging::SYNC_WITH_TARGET; + + CORBA::PolicyList policy_list (1); + policy_list.length (1); + policy_list[0] = + orb_->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE, + sync_scope + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + policy_manager->set_policy_overrides (policy_list, + CORBA::SET_OVERRIDE + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); +#else + ACE_DEBUG ((LM_DEBUG, + "CORBA Messaging disabled in this configuration," + " test may not be optimally configured\n")); +#endif /* TAO_HAS_MESSAGING */ + + 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")); + } + + // Create all participents ... + this->create_EC (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + + CosNotifyChannelAdmin::AdminID adminid; + + supplier_admin_ = + ec_->new_for_suppliers (this->ifgop_, adminid ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + + ACE_ASSERT (!CORBA::is_nil (supplier_admin_.in ())); + + consumer_admin_ = + ec_->new_for_consumers (this->ifgop_, adminid ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + + ACE_ASSERT (!CORBA::is_nil (consumer_admin_.in ())); + + ACE_NEW_RETURN (consumers_, + Throughput_StructuredPushConsumer*[this->consumer_count_], + -1); + ACE_NEW_RETURN (suppliers_, + Throughput_StructuredPushSupplier*[this->supplier_count_], + -1); + + // ---- + + int i = 0; + + for (i = 0; i < this->consumer_count_; ++i) + { + ACE_NEW_RETURN (consumers_[i], + Throughput_StructuredPushConsumer (this), + -1); + consumers_[i]->init (root_poa_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + + consumers_[i]->connect (this->consumer_admin_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + } + + for (i = 0; i < this->supplier_count_; ++i) + { + ACE_NEW_RETURN (suppliers_[i], + Throughput_StructuredPushSupplier (this), + -1); + suppliers_[i]->TAO_Notify_Tests_StructuredPushSupplier::init ( + root_poa_.in () + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK_RETURN (-1); + suppliers_[i]->connect (this->supplier_admin_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + } + + return 0; +} + +int +Notify_Throughput::parse_args(int argc, char *argv[]) +{ + ACE_Arg_Shifter arg_shifter (argc, argv); + + const ACE_TCHAR* current_arg = 0; + while (arg_shifter.is_anything_left ()) + { + if (arg_shifter.cur_arg_strncasecmp ("-collocated_ec") == 0) + { + this->collocated_ec_ = 1; + arg_shifter.consume_arg (); + } + else if ((current_arg = arg_shifter.get_the_parameter ("-consumers"))) + { + this->consumer_count_ = ACE_OS::atoi (current_arg); + // The number of events to send/receive. + arg_shifter.consume_arg (); + } + else if ((current_arg = arg_shifter.get_the_parameter ("-suppliers"))) + { + this->supplier_count_ = ACE_OS::atoi (current_arg); + // The number of events to send/receive. + arg_shifter.consume_arg (); + } + else if ((current_arg = arg_shifter.get_the_parameter ("-burst_size"))) + { + this->burst_size_ = ACE_OS::atoi (current_arg); + // The number of events to send/receive. + arg_shifter.consume_arg (); + } + else if ((current_arg = arg_shifter.get_the_parameter ("-burst_count"))) + { + this->burst_count_ = ACE_OS::atoi (current_arg); + // + arg_shifter.consume_arg (); + } + else if ((current_arg = arg_shifter.get_the_parameter ("-burst_pause"))) + { + this->burst_pause_ = ACE_OS::atoi (current_arg); + // + arg_shifter.consume_arg (); + } + else if ((current_arg = arg_shifter.get_the_parameter ("-payload"))) + { + this->payload_size_ = ACE_OS::atoi (current_arg); + ACE_NEW_RETURN (this->payload_, + char [this->payload_size_], + -1); + // + arg_shifter.consume_arg (); + } + else if ((current_arg = arg_shifter.get_the_parameter ("-EC"))) + { + this->ec_name_ = current_arg; + // + arg_shifter.consume_arg (); + } + else if ((current_arg = + arg_shifter.get_the_parameter ("-ExpectedCount"))) + { + this->perconsumer_count_ = ACE_OS::atoi (current_arg); + // + arg_shifter.consume_arg (); + } + else if (arg_shifter.cur_arg_strncasecmp ("-?") == 0) + { + ACE_DEBUG((LM_DEBUG, + "usage: %s " + "-collocated_ec, " + "-consumers [count], " + "-suppliers [count], " + "-burst_size [size], " + "-burst_count [count], " + "-burst_pause [time(uS)], " + "-payload [size]" + "-EC [Channel Name]" + "-ExpectedCount [count]\n", + argv[0], argv[0])); + + arg_shifter.consume_arg (); + + return -1; + } + else + { + arg_shifter.ignore_arg (); + } + } + // Recalculate. + peer_done_count_ = consumer_count_ + supplier_count_; + return 0; +} + +void +Notify_Throughput::create_EC (ACE_ENV_SINGLE_ARG_DECL) +{ + if (this->collocated_ec_ == 1) + { + TAO_Notify_Service* notify_service = ACE_Dynamic_Service<TAO_Notify_Service>::instance (TAO_NOTIFICATION_SERVICE_NAME); + + if (notify_service == 0) + { + ACE_DEBUG ((LM_DEBUG, "Service not found! check conf. file\n")); + return; + } + + // Activate the factory + this->notify_factory_ = + notify_service->create (this->root_poa_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + ACE_ASSERT (!CORBA::is_nil (this->notify_factory_.in ())); + } + else + { + this->resolve_naming_service (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + this->resolve_Notify_factory (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + // A channel name was specified, use that to resolve the service. + if (this->ec_name_.length () != 0) + { + CosNaming::Name name (1); + name.length (1); + name[0].id = CORBA::string_dup (ec_name_.c_str ()); + + CORBA::Object_var obj = + this->naming_context_->resolve (name + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + this->ec_ = + CosNotifyChannelAdmin::EventChannel::_narrow (obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } +else + { + CosNotifyChannelAdmin::ChannelID id; + + ec_ = notify_factory_->create_channel (initial_qos_, + initial_admin_, + id + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + ACE_ASSERT (!CORBA::is_nil (ec_.in ())); +} + +void +Notify_Throughput::run_test (ACE_ENV_SINGLE_ARG_DECL) +{ + + ACE_DEBUG ((LM_DEBUG, "collocated_ec_ %d ," + "burst_count_ %d, " + "burst_pause_ %d, " + "burst_size_ %d, " + "payload_size_ %d, " + "consumer_count_ %d, " + "supplier_count_ %d " + "expected count %d\n", + collocated_ec_, + burst_count_ , + burst_pause_ , + burst_size_ , + payload_size_, + consumer_count_ , + supplier_count_ , + perconsumer_count_)); + + for (int i = 0; i < this->supplier_count_; ++i) + { + suppliers_[i]-> + TAO_Notify_Tests_StructuredPushSupplier::init (root_poa_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + if (suppliers_[i]->ACE_Task_Base::activate (THR_NEW_LWP | THR_JOINABLE) != 0) + { + ACE_ERROR ((LM_ERROR, + "Cannot activate client threads\n")); + } + } + + // Wait till we're signalled done. + { + ACE_DEBUG ((LM_DEBUG, "(%t)Waiting for shutdown signal in main..\n")); + ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, lock_); + + while (this->peer_done_count_ != 0) + { + condition_.wait (); + } + } + + if (this->ec_name_.length () == 0) // we are not using a global EC + { + // Destroy the ec. + this->ec_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + // Signal the workers. + this->worker_.done_ = 1; +} + +void +Notify_Throughput::peer_done (void) +{ + ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, lock_); + + if (--this->peer_done_count_ == 0) + { + ACE_DEBUG ((LM_DEBUG, "calling shutdown\n")); + condition_.broadcast (); + } +} + +void +Notify_Throughput::dump_results (void) +{ + ACE_Throughput_Stats throughput; + ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); + char buf[BUFSIZ]; + + for (int j = 0; j < this->consumer_count_; ++j) + { + ACE_OS::sprintf (buf, "Consumer [%02d]", j); + + this->consumers_[j]->dump_stats (buf, gsf); + this->consumers_[j]->accumulate_into (throughput); + } + + ACE_DEBUG ((LM_DEBUG, "\n")); + + ACE_Throughput_Stats suppliers; + + for (int i = 0; i < this->supplier_count_; ++i) + { + ACE_OS::sprintf (buf, "Supplier [%02d]", i); + + this->suppliers_[i]->dump_stats (buf, gsf); + this->suppliers_[i]->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); +} + +/***************************************************************************/ + +int +main (int argc, char* argv[]) +{ + ACE_High_Res_Timer::calibrate (); + + Notify_Throughput events; + + if (events.parse_args (argc, argv) == -1) + { + return 1; + } + + ACE_TRY_NEW_ENV + { + events.init (argc, argv + ACE_ENV_ARG_PARAMETER); //Init the Client + ACE_TRY_CHECK; + + events.run_test (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + ACE_DEBUG ((LM_DEBUG, "Waiting for threads to exit...\n")); + ACE_Thread_Manager::instance ()->wait (); + events.dump_results(); + + ACE_DEBUG ((LM_DEBUG, "ending main...\n")); + + } + ACE_CATCH (CORBA::Exception, se) + { + ACE_PRINT_EXCEPTION (se, "Error: "); + return 1; + } + ACE_ENDTRY; + + return 0; +} + + +// **************************************************************** + +Worker::Worker (void) +:done_ (0) +{ +} + +void +Worker::orb (CORBA::ORB_ptr orb) +{ + orb_ = CORBA::ORB::_duplicate (orb); +} + +int +Worker::svc (void) +{ + ACE_Time_Value tv(5); + + do + { + this->orb_->run (tv); + }while (!this->done_); + + ACE_DEBUG ((LM_DEBUG, "(%P) (%t) done\n")); + + return 0; +} diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.h b/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.h new file mode 100644 index 00000000000..802054bd6cf --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.h @@ -0,0 +1,228 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = FILENAME +// Throughput.h +// +// = DESCRIPTION +// +// = AUTHOR +// Pradeep Gore <pradeep@cs.wustl.edu> +// +// ========================================================================== + +#ifndef NOTIFY_Throughput_H +#define NOTIFY_Throughput_H + +#include "Notify_Test_Client.h" +#include "Notify_StructuredPushConsumer.h" +#include "Notify_StructuredPushSupplier.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 Worker : public ACE_Task_Base +{ + // = TITLE + // Run a server thread + // + // = DESCRIPTION + // Use the ACE_Task_Base class to run server threads + // +public: + Worker (void); + // ctor + + void orb (CORBA::ORB_ptr orb); + + virtual int svc (void); + // The thread entry point. + + int done_; + +private: + CORBA::ORB_var orb_; + // The orb +}; + +/***************************************************************************/ + +class Notify_Throughput; + +class Throughput_StructuredPushConsumer + : public TAO_Notify_Tests_StructuredPushConsumer +{ +public: + Throughput_StructuredPushConsumer (Notify_Throughput *test_client); + // Contructor. + + // = StructuredPushSupplier methods + virtual void push_structured_event ( + const CosNotification::StructuredEvent & notification + ACE_ENV_ARG_DECL + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosEventComm::Disconnected + )); + + 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: + Notify_Throughput * test_client_; + + TAO_SYNCH_MUTEX lock_; + // Protect internal state + + ACE_hrtime_t throughput_start_; + // The timestamp for the first message received + + ACE_Throughput_Stats throughput_; + // Used for reporting stats + + int push_count_; + // The number of push() calls +}; + +/***************************************************************************/ + +class Throughput_StructuredPushSupplier + : public TAO_Notify_Tests_StructuredPushSupplier, + public ACE_Task_Base +{ +public: + Throughput_StructuredPushSupplier (Notify_Throughput * test_client); + // Constructor. + + virtual ~Throughput_StructuredPushSupplier (); + // Destructor. + + // = The ACE_Task_Base methods.... + virtual int svc (void); + + 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: + Notify_Throughput* test_client_; + + int push_count_; + // Count the number of push() calls + + ACE_hrtime_t throughput_start_; + // The time for the first event sent + + ACE_Throughput_Stats throughput_; + // Measure the elapsed time spent while sending the events. +}; + +/***************************************************************************/ + +class Notify_Throughput : public Notify_Test_Client +{ +public: + // Initialization and termination code + Notify_Throughput (void); + virtual ~Notify_Throughput (); + + int parse_args(int argc, char *argv[]) ; + + int init (int argc, char *argv [] ACE_ENV_ARG_DECL); + // initialization. + + void run_test (ACE_ENV_SINGLE_ARG_DECL); + // Run the test. + + void peer_done (void); + // Peers call this when done. + + void dump_results (void); + // check if we got the expected results. + + Worker worker_; +protected: + void create_EC (ACE_ENV_SINGLE_ARG_DECL); + // Create participants. + + CORBA::Boolean collocated_ec_; + // is the ec collocated. + + int burst_count_; + // How many bursts we will send from each supplier. + + int burst_pause_; + // The time between each event burst, in microseconds. + + int burst_size_; + // Number of events to send per supplier in every burst + + int payload_size_; + // data size to transmit. + + char *payload_; + // the payload. + + int consumer_count_; + // Consumer count + + int supplier_count_; + // Supplier count + + int perconsumer_count_; + // Number of events received that each consumer expects to see. + + ACE_CString ec_name_; + // The name of the EC to resolve. + + CosNotifyChannelAdmin::EventChannel_var ec_; + // The one channel that we create using the factory. + + CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin_; + // The consumer admin used by consumers. + + CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin_; + // The supplier admin used by suppliers. + + Throughput_StructuredPushConsumer** consumers_; + // Consumers + + Throughput_StructuredPushSupplier** suppliers_; + // Suppliers + + int nthreads_; + + // = Helpers to signal done. + int peer_done_count_; + // how many peers are done. + + TAO_SYNCH_MUTEX lock_; + // The lock to serialize access to members. + + TAO_SYNCH_CONDITION condition_; + // exit wait condition +private: + friend class Throughput_StructuredPushSupplier; + friend class Throughput_StructuredPushConsumer; +}; + +/***************************************************************************/ + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#endif /* NOTIFY_TESTS_EventS_H */ diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.mpc b/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.mpc new file mode 100644 index 00000000000..b16923c43da --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.mpc @@ -0,0 +1,6 @@ +// -*- MPC -*- +// $Id$ + +project(*Ntf Perf Throughput): notifytest, strategies, messaging, minimum_corba { + exename = Throughput +} diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_0/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_0/supplier.conf new file mode 100644 index 00000000000..81477a4a545 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_0/supplier.conf @@ -0,0 +1,31 @@ +## $Id$ +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 2 -Lane 0 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 0 -Iter 50000 -Load 0 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_10/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_10/supplier.conf new file mode 100644 index 00000000000..9a4ca3d23f7 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_10/supplier.conf @@ -0,0 +1,31 @@ +## $Id$ +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 2 -Lane 0 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 0 -Iter 50000 -Load 10 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_15/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_15/supplier.conf new file mode 100644 index 00000000000..5a3ca3273ec --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_15/supplier.conf @@ -0,0 +1,31 @@ +## $Id$ +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 2 -Lane 0 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 0 -Iter 50000 -Load 15 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_20/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_20/supplier.conf new file mode 100644 index 00000000000..353afa04682 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_20/supplier.conf @@ -0,0 +1,31 @@ +## $Id$ +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 2 -Lane 0 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 0 -Iter 50000 -Load 20 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_25/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_25/supplier.conf new file mode 100644 index 00000000000..9a8d150acab --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_25/supplier.conf @@ -0,0 +1,31 @@ +## $Id$ +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 2 -Lane 0 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 0 -Iter 50000 -Load 25 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_30/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_30/supplier.conf new file mode 100644 index 00000000000..011249c3b88 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_30/supplier.conf @@ -0,0 +1,31 @@ +## $Id$ +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 2 -Lane 0 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 0 -Iter 50000 -Load 30 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_35/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_35/supplier.conf new file mode 100644 index 00000000000..26514354e70 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_35/supplier.conf @@ -0,0 +1,31 @@ +## $Id$ +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 2 -Lane 0 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 0 -Iter 50000 -Load 35 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_40/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_40/supplier.conf new file mode 100644 index 00000000000..213334fb39e --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_40/supplier.conf @@ -0,0 +1,31 @@ +## $Id$ +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 2 -Lane 0 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 0 -Iter 50000 -Load 40 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_45/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_45/supplier.conf new file mode 100644 index 00000000000..70eaaf4a6b5 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_45/supplier.conf @@ -0,0 +1,31 @@ +## $Id$ +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 2 -Lane 0 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 0 -Iter 50000 -Load 45 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_5/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_5/supplier.conf new file mode 100644 index 00000000000..fa3586d0188 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_5/supplier.conf @@ -0,0 +1,31 @@ +## $Id$ +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 2 -Lane 0 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 0 -Iter 50000 -Load 5 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_50/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_50/supplier.conf new file mode 100644 index 00000000000..f44743cf7c2 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/Load_50/supplier.conf @@ -0,0 +1,31 @@ +## $Id$ +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 2 -Lane 0 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 0 -Iter 50000 -Load 50 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/README b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/README new file mode 100644 index 00000000000..ddf54440055 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/README @@ -0,0 +1,37 @@ +## $Id$ + +1 Path : Load vs Throughput experiment with period=0 +==================================================== + +In this test we setup a Path (In a Path, a single supplier sends +events to a consumer and only that consumer) at High Priority. + +The consumer performs CPU work according to the load supplied to it. + +We increase the load and measure the throughput recorded. + + +Running the experiment: +====================== + +Run the "run_all.pl" script in this directory to run the test using RT-Notification. +as "run_all.pl --rt" + +If you want to generate results using the CosNotification, run as +"run_all.pl --cos" + +To generate the data for both cases run as "run_all.pl --all" + +The RT-Notification results are generated in the Load_X/rt_output directory. +The CosNotification results are generated in the Load_X/cos_output directory. + +e.g., Load_0/rt_output/c_high.dat would contain the statistics +recorded for the consumer when the Load is 0. + + +Expected Results: +================ + +As the load increases the throughput for the consumer should fall. +This helps us determine the load at which the system is operating at +full capacity. diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/consumer.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/consumer.conf new file mode 100644 index 00000000000..07249b105c8 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/consumer.conf @@ -0,0 +1,31 @@ +## $Id$ +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +dynamic TAO_Notify_Tests_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_POA_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 1 -Lanes 2 -Lane 0 1 0 -Lane 3 1 0" +# +##--------- Consumer Admin 1 ------------- +static Command_Builder "ConsumerAdmin -Create ca1 ec1 -AND_OP" +# +##--------- Consumer , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_high -Admin ca1 -POA poa_1" +static Command_Builder "PeriodicConsumer -Subscription c_high +H" +# +##------- Run--------- +static Command_Builder "Application -SignalPeer" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/cos_notify.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/cos_notify.conf new file mode 100644 index 00000000000..0515ecbd0db --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/cos_notify.conf @@ -0,0 +1,2 @@ +dynamic TAO_Notify_Factory Service_Object * TAO_CosNotification_Serv:_make_TAO_Notify_Default_Factory () "" +dynamic TAO_Notify_Service Service_Object * TAO_CosNotification_Serv:_make_TAO_CosNotify_Service () "" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/rt_notify.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/rt_notify.conf new file mode 100644 index 00000000000..a747c353448 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/rt_notify.conf @@ -0,0 +1,3 @@ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +dynamic TAO_Notify_Factory Service_Object * TAO_CosNotification_Serv:_make_TAO_Notify_Default_Factory () "" +dynamic TAO_Notify_Service Service_Object * TAO_RT_Notification:_make_TAO_RT_Notify_Service () "" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/run_all.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/run_all.pl new file mode 100755 index 00000000000..8f1a38c778e --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/run_all.pl @@ -0,0 +1,58 @@ +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; +use File::Copy; +use Getopt::Long; + +GetOptions ("rt" => \$rt, + "cos" => \$cos, + "all" => \$all); + +@list=("Load_0", "Load_5", "Load_10","Load_15","Load_20","Load_25","Load_30","Load_35","Load_40","Load_45","Load_50"); + +for $file (@list) +{ + # default to rt + if (!$all && !$rt && !$cos) + { + $rt = 1; + } + + if (-d $file) + { + if ($all || $rt) + { + print STDERR "Running $file test with RT Notification\n"; + + $cmd = "run_test.pl -n rt_notify.conf -s $file/supplier.conf -c consumer.conf -o $file/rt_output"; + + $status = system ("perl $cmd"); + + if ($status != 0) + { + print STDERR "ERROR: $file test returned $status\n"; + } + } + + + if ($all || $cos) + { + print STDERR "Running $file test with COS Notification\n"; + + $cmd = "run_test.pl -n cos_notify.conf -s $file/supplier.conf -c consumer.conf -o $file/cos_output"; + + $status = system ("perl $cmd"); + + if ($status != 0) + { + print STDERR "ERROR: $file test returned $status\n"; + } + } + } +} diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/run_test.pl new file mode 100755 index 00000000000..faa104133ca --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/run_test.pl @@ -0,0 +1,167 @@ +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; +use File::Copy; +use Getopt::Std; + +# -n notify.conf -s supplier.conf -c consumer.conf -o output_dir -h +getopts ("n:s:c:o:h"); + +if ($opt_h) +{ + print STDERR "-n notify.conf -s supplier.conf -c consumer.conf -o output_dir -h\n"; + exit 0; +} + +$experiment_timeout = 240; +$startup_timeout = 120; + +if ($opt_n) +{ + $notify_conf = PerlACE::LocalFile ($opt_n); + +}else +{ + $notify_conf = PerlACE::LocalFile ("notify.conf"); +} + +if ($opt_s) +{ + $supplier_conf = PerlACE::LocalFile ($opt_s); + +}else +{ + $supplier_conf = PerlACE::LocalFile ("supplier.conf"); +} + +if ($opt_c) +{ + $consumer_conf = PerlACE::LocalFile ($opt_c); + +}else +{ + $consumer_conf = PerlACE::LocalFile ("consumer.conf"); +} + +$notify_ior = PerlACE::LocalFile ("notify.ior"); + +$naming_ior = PerlACE::LocalFile ("naming.ior"); + +$supplier_ior = PerlACE::LocalFile ("supplier.ior"); + +@list=glob("*.dat"); +for $file (@list) +{ + unlink $file or die "Could not delete $file"; +} + +$status = 0; + +$Naming = new PerlACE::Process ("../../../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Notification = new PerlACE::Process ("../../../../../Notify_Service/Notify_Service"); + +#$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf -ORBDebugLevel 1"; + +$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf"; + +$Supplier = new PerlACE::Process ("../../../Driver/Notify_Tests_Driver"); + +$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf"; + +#$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf -ORBDebugLevel 1"; + +$Consumer = new PerlACE::Process ("../../../Driver/Notify_Tests_Driver"); + +$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf"; + +#$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf -ORBDebugLevel 1"; + +unlink $naming_ior; +$Naming->Spawn (); + +if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the naming service to start\n"; + $Naming->Kill (); + exit 1; +} + +unlink $notify_ior; +$Notification->Arguments ($Notify_Args); +$args = $Notification->Arguments (); +print STDERR "Running Notification with arguments: $args\n"; +$Notification->Spawn (); + +if (PerlACE::waitforfile_timed ($notify_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the notify service to start\n"; + $Notification->Kill (); + $Naming->Kill (); + exit 1; +} + +unlink $supplier_ior; +$Supplier->Arguments ($Supplier_Args); +$args = $Supplier->Arguments (); +print STDERR "Running Supplier with arguments: $args\n"; +$Supplier->Spawn (); + +if (PerlACE::waitforfile_timed ($supplier_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the supplier to start\n"; + $Supplier->Kill (); + $Notification->Kill (); + $Naming->Kill (); + exit 1; +} + +unlink $consumer_ior; +$Consumer->Arguments ($Consumer_Args); +$args = $Consumer->Arguments (); +print STDERR "Running Consumer with arguments: $args\n"; +$status = $Consumer->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Consumer returned $status\n"; + $Supplier->Kill (); + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + +unlink $consumer_ior; + +$Supplier->Wait (); +unlink $supplier_ior; + +$Notification->Kill (); +unlink $notify_ior; + +$Naming->Kill (); +unlink $naming_ior; + +if ($opt_o) + { + $results_directory = PerlACE::LocalFile ($opt_o); + + if (! -e $results_directory) + { + mkdir $results_directory, 0777; + } + + print STDERR "Saving results to $results_directory\n"; + + @list=glob("*.dat"); + for $file (@list) + { + move ("$file", "$results_directory/$file"); + } + } + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_0/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_0/supplier.conf new file mode 100644 index 00000000000..92db23547f9 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_0/supplier.conf @@ -0,0 +1,38 @@ +## $Id$ +## +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s1 connected to sa1. ----- +static Command_Builder "PeriodicSupplier -Create s_low -Admin sa1 -EventType L -Priority 1 -Period 10000 -Iter 50000 -Load 0 -RunTime 15" +# +### --- Create Supplier s2 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_med -Admin sa1 -EventType M -Priority 2 -Period 10000 -Iter 50000 -Load 0 -RunTime 15" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 4000 -Iter 50000 -Load 0 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats -Samples" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_10/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_10/supplier.conf new file mode 100644 index 00000000000..38ac8442cec --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_10/supplier.conf @@ -0,0 +1,38 @@ +## $Id$ +## +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s1 connected to sa1. ----- +static Command_Builder "PeriodicSupplier -Create s_low -Admin sa1 -EventType L -Priority 1 -Period 10000 -Iter 50000 -Load 10 -RunTime 15" +# +### --- Create Supplier s2 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_med -Admin sa1 -EventType M -Priority 2 -Period 10000 -Iter 50000 -Load 10 -RunTime 15" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 10000 -Iter 50000 -Load 10 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_15/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_15/supplier.conf new file mode 100644 index 00000000000..f7656f36930 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_15/supplier.conf @@ -0,0 +1,38 @@ +## $Id$ +## +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s1 connected to sa1. ----- +static Command_Builder "PeriodicSupplier -Create s_low -Admin sa1 -EventType L -Priority 1 -Period 10000 -Iter 50000 -Load 15 -RunTime 15" +# +### --- Create Supplier s2 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_med -Admin sa1 -EventType M -Priority 2 -Period 10000 -Iter 50000 -Load 15 -RunTime 15" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 10000 -Iter 50000 -Load 15 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_20/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_20/supplier.conf new file mode 100644 index 00000000000..14074a2f482 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_20/supplier.conf @@ -0,0 +1,38 @@ +## $Id$ +## +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s1 connected to sa1. ----- +static Command_Builder "PeriodicSupplier -Create s_low -Admin sa1 -EventType L -Priority 1 -Period 10000 -Iter 50000 -Load 20 -RunTime 15" +# +### --- Create Supplier s2 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_med -Admin sa1 -EventType M -Priority 2 -Period 10000 -Iter 50000 -Load 20 -RunTime 15" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 10000 -Iter 50000 -Load 20 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_25/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_25/supplier.conf new file mode 100644 index 00000000000..b4954b4fd87 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_25/supplier.conf @@ -0,0 +1,38 @@ +## $Id$ +## +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s1 connected to sa1. ----- +static Command_Builder "PeriodicSupplier -Create s_low -Admin sa1 -EventType L -Priority 1 -Period 10000 -Iter 50000 -Load 25 -RunTime 15" +# +### --- Create Supplier s2 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_med -Admin sa1 -EventType M -Priority 2 -Period 10000 -Iter 50000 -Load 25 -RunTime 15" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 10000 -Iter 50000 -Load 25 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_30/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_30/supplier.conf new file mode 100644 index 00000000000..034fad03e3c --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_30/supplier.conf @@ -0,0 +1,38 @@ +## $Id$ +## +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s1 connected to sa1. ----- +static Command_Builder "PeriodicSupplier -Create s_low -Admin sa1 -EventType L -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +# +### --- Create Supplier s2 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_med -Admin sa1 -EventType M -Priority 2 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_35/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_35/supplier.conf new file mode 100644 index 00000000000..69dfaecb51a --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_35/supplier.conf @@ -0,0 +1,38 @@ +## $Id$ +## +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s1 connected to sa1. ----- +static Command_Builder "PeriodicSupplier -Create s_low -Admin sa1 -EventType L -Priority 1 -Period 10000 -Iter 50000 -Load 35 -RunTime 15" +# +### --- Create Supplier s2 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_med -Admin sa1 -EventType M -Priority 2 -Period 10000 -Iter 50000 -Load 35 -RunTime 15" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 10000 -Iter 50000 -Load 35 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_40/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_40/supplier.conf new file mode 100644 index 00000000000..f84fd889d57 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_40/supplier.conf @@ -0,0 +1,38 @@ +## $Id$ +## +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s1 connected to sa1. ----- +static Command_Builder "PeriodicSupplier -Create s_low -Admin sa1 -EventType L -Priority 1 -Period 10000 -Iter 50000 -Load 40 -RunTime 15" +# +### --- Create Supplier s2 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_med -Admin sa1 -EventType M -Priority 2 -Period 10000 -Iter 50000 -Load 40 -RunTime 15" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 10000 -Iter 50000 -Load 40 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_45/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_45/supplier.conf new file mode 100644 index 00000000000..37d1090a90f --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_45/supplier.conf @@ -0,0 +1,38 @@ +## $Id$ +## +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s1 connected to sa1. ----- +static Command_Builder "PeriodicSupplier -Create s_low -Admin sa1 -EventType L -Priority 1 -Period 10000 -Iter 50000 -Load 45 -RunTime 15" +# +### --- Create Supplier s2 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_med -Admin sa1 -EventType M -Priority 2 -Period 10000 -Iter 50000 -Load 45 -RunTime 15" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 10000 -Iter 50000 -Load 45 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_5/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_5/supplier.conf new file mode 100644 index 00000000000..1403c8b429e --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_5/supplier.conf @@ -0,0 +1,38 @@ +## $Id$ +## +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s1 connected to sa1. ----- +static Command_Builder "PeriodicSupplier -Create s_low -Admin sa1 -EventType L -Priority 1 -Period 10000 -Iter 50000 -Load 5 -RunTime 15" +# +### --- Create Supplier s2 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_med -Admin sa1 -EventType M -Priority 2 -Period 10000 -Iter 50000 -Load 5 -RunTime 15" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 10000 -Iter 50000 -Load 5 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_50/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_50/supplier.conf new file mode 100644 index 00000000000..d6d1c14e7d8 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/Load_50/supplier.conf @@ -0,0 +1,38 @@ +## $Id$ +## +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s1 connected to sa1. ----- +static Command_Builder "PeriodicSupplier -Create s_low -Admin sa1 -EventType L -Priority 1 -Period 10000 -Iter 50000 -Load 50 -RunTime 15" +# +### --- Create Supplier s2 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_med -Admin sa1 -EventType M -Priority 2 -Period 10000 -Iter 50000 -Load 50 -RunTime 15" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 3 -Period 10000 -Iter 50000 -Load 50 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/README b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/README new file mode 100644 index 00000000000..55e2003fc75 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/README @@ -0,0 +1,41 @@ +## $Id$ + +3 Paths : Load vs Throughput experiment with period=10ms +======================================================== + +In this test we setup 3 Paths (In a Path, a single supplier sends +events to a consumer and only that consumer) at High, Medium and Low Priority. + +Each Supplier tries to send an event every 10ms (100Hz). +Each consumer performs CPU work according to the load supplied to it. + +We increase the load and measure the throughput recorded. + + +Running the experiment: +====================== + +Run the "run_all.pl" script in this directory to run the test using RT-Notification. +as "run_all.pl --rt" + +If you want to generate results using the CosNotification, run as +"run_all.pl --cos" + +To generate the data for both cases run as "run_all.pl --all" + +The RT-Notification results are generated in the Load_X/rt_output directory. +The CosNotification results are generated in the Load_X/cos_output directory. + +e.g., Load_0/rt_output/c_high.dat would contain the statistics +recorded for the consumer when the Load is 0. + + +Expected Results: +================ + +RT-Notification : As the load increases the throughput for the consumers should fall +however the high priority path should be least affected followed by +the medium and then the low priority. + +CosNotification : As the CosNotification is unable to communicate +priorities, the throughput of all 3 paths will fall in tandem. diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/consumer.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/consumer.conf new file mode 100644 index 00000000000..5639b258ca4 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/consumer.conf @@ -0,0 +1,43 @@ +## $Id$ +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +dynamic TAO_Notify_Tests_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_POA_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 1 -Lanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" +# +##--------- Consumer Admin 1 ------------- +static Command_Builder "ConsumerAdmin -Create ca1 ec1 -AND_OP" +# +##--------- Consumer 1 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_low -Admin ca1 -POA poa_1" +static Command_Builder "PeriodicConsumer -Subscription c_low +L" +# +##--------- Consumer 2 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_med -Admin ca1 -POA poa_1" +static Command_Builder "PeriodicConsumer -Subscription c_med +M" +# +##--------- Consumer 3 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_high -Admin ca1 -POA poa_1" +static Command_Builder "PeriodicConsumer -Subscription c_high +H" +# +##------- Run--------- +static Command_Builder "Application -SignalPeer" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +# +# Use the -Samples option if you want to dump each sample recorded. +#static Command_Builder "Application -DumpStats -Samples" +# +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/cos_notify.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/cos_notify.conf new file mode 100644 index 00000000000..0515ecbd0db --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/cos_notify.conf @@ -0,0 +1,2 @@ +dynamic TAO_Notify_Factory Service_Object * TAO_CosNotification_Serv:_make_TAO_Notify_Default_Factory () "" +dynamic TAO_Notify_Service Service_Object * TAO_CosNotification_Serv:_make_TAO_CosNotify_Service () "" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/rt_notify.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/rt_notify.conf new file mode 100644 index 00000000000..a747c353448 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/rt_notify.conf @@ -0,0 +1,3 @@ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +dynamic TAO_Notify_Factory Service_Object * TAO_CosNotification_Serv:_make_TAO_Notify_Default_Factory () "" +dynamic TAO_Notify_Service Service_Object * TAO_RT_Notification:_make_TAO_RT_Notify_Service () "" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/run_all.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/run_all.pl new file mode 100755 index 00000000000..8f1a38c778e --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/run_all.pl @@ -0,0 +1,58 @@ +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; +use File::Copy; +use Getopt::Long; + +GetOptions ("rt" => \$rt, + "cos" => \$cos, + "all" => \$all); + +@list=("Load_0", "Load_5", "Load_10","Load_15","Load_20","Load_25","Load_30","Load_35","Load_40","Load_45","Load_50"); + +for $file (@list) +{ + # default to rt + if (!$all && !$rt && !$cos) + { + $rt = 1; + } + + if (-d $file) + { + if ($all || $rt) + { + print STDERR "Running $file test with RT Notification\n"; + + $cmd = "run_test.pl -n rt_notify.conf -s $file/supplier.conf -c consumer.conf -o $file/rt_output"; + + $status = system ("perl $cmd"); + + if ($status != 0) + { + print STDERR "ERROR: $file test returned $status\n"; + } + } + + + if ($all || $cos) + { + print STDERR "Running $file test with COS Notification\n"; + + $cmd = "run_test.pl -n cos_notify.conf -s $file/supplier.conf -c consumer.conf -o $file/cos_output"; + + $status = system ("perl $cmd"); + + if ($status != 0) + { + print STDERR "ERROR: $file test returned $status\n"; + } + } + } +} diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/run_test.pl new file mode 100755 index 00000000000..d23c002277c --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/run_test.pl @@ -0,0 +1,165 @@ +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; +use File::Copy; +use Getopt::Std; + +# -n notify.conf -s supplier.conf -c consumer.conf -o output_dir -h +getopts ("n:s:c:o:h"); + +if ($opt_h) +{ + print STDERR "-n notify.conf -s supplier.conf -c consumer.conf -o output_dir -h\n"; + exit 0; +} + +$experiment_timeout = 120; +$startup_timeout = 120; + +if ($opt_n) +{ + $notify_conf = PerlACE::LocalFile ($opt_n); + +}else +{ + $notify_conf = PerlACE::LocalFile ("notify.conf"); +} + +if ($opt_s) +{ + $supplier_conf = PerlACE::LocalFile ($opt_s); + +}else +{ + $supplier_conf = PerlACE::LocalFile ("supplier.conf"); +} + +if ($opt_c) +{ + $consumer_conf = PerlACE::LocalFile ($opt_c); + +}else +{ + $consumer_conf = PerlACE::LocalFile ("consumer.conf"); +} + +$notify_ior = PerlACE::LocalFile ("notify.ior"); + +$naming_ior = PerlACE::LocalFile ("naming.ior"); + +$supplier_ior = PerlACE::LocalFile ("supplier.ior"); + +@list=glob("*.dat"); +for $file (@list) +{ + unlink $file or die "Could not delete $file"; +} + +$status = 0; + +$Naming = new PerlACE::Process ("../../../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Notification = new PerlACE::Process ("../../../../../Notify_Service/Notify_Service"); + +#$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf -ORBDebugLevel 1"; + +$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf"; + +$Supplier = new PerlACE::Process ("../../../Driver/Notify_Tests_Driver"); + +$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf"; + +$Consumer = new PerlACE::Process ("../../../Driver/Notify_Tests_Driver"); + +$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf"; + +#$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf -ORBDebugLevel 1"; + +unlink $naming_ior; +$Naming->Spawn (); + +if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the naming service to start\n"; + $Naming->Kill (); + exit 1; +} + +unlink $notify_ior; +$Notification->Arguments ($Notify_Args); +$args = $Notification->Arguments (); +print STDERR "Running Notification with arguments: $args\n"; +$Notification->Spawn (); + +if (PerlACE::waitforfile_timed ($notify_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the notify service to start\n"; + $Notification->Kill (); + $Naming->Kill (); + exit 1; +} + +unlink $supplier_ior; +$Supplier->Arguments ($Supplier_Args); +$args = $Supplier->Arguments (); +print STDERR "Running Supplier with arguments: $args\n"; +$Supplier->Spawn (); + +if (PerlACE::waitforfile_timed ($supplier_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the supplier to start\n"; + $Supplier->Kill (); + $Notification->Kill (); + $Naming->Kill (); + exit 1; +} + +unlink $consumer_ior; +$Consumer->Arguments ($Consumer_Args); +$args = $Consumer->Arguments (); +print STDERR "Running Consumer with arguments: $args\n"; +$status = $Consumer->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Consumer returned $status\n"; + $Supplier->Kill (); + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + +unlink $consumer_ior; + +$Supplier->Wait (); +unlink $supplier_ior; + +$Notification->Kill (); +unlink $notify_ior; + +$Naming->Kill (); +unlink $naming_ior; + +if ($opt_o) + { + $results_directory = PerlACE::LocalFile ($opt_o); + + if (! -e $results_directory) + { + mkdir $results_directory, 0777; + } + + print STDERR "Saving results to $results_directory\n"; + + @list=glob("*.dat"); + for $file (@list) + { + move ("$file", "$results_directory/$file"); + } + } + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops/consumer.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops/consumer.conf new file mode 100644 index 00000000000..0f95a246f56 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops/consumer.conf @@ -0,0 +1,24 @@ +## $Id$ +# +# Note that this test is not portable because it does not use RTCORBA. +# All priority values are for Linux +# +##---- Load the Factories------ +dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##--------- Consumer 3 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_high -Direct" +# +##------- Run--------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops/run_test.pl new file mode 100755 index 00000000000..01ccf03a55d --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops/run_test.pl @@ -0,0 +1,94 @@ +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; +use File::Copy; + +$experiment_timeout = 600; +$startup_timeout = 600; +$naming_ior = PerlACE::LocalFile ("naming.ior"); +$consumer_ior = PerlACE::LocalFile ("consumer.ior"); +$supplier_conf = PerlACE::LocalFile ("supplier.conf"); +$consumer_conf = PerlACE::LocalFile ("consumer.conf"); +$status = 0; + +$Naming = new PerlACE::Process ("../../../../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Supplier = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$consumer_ior -ORBSvcConf $supplier_conf -Skip_Priority_Levels_Check"; + +$Consumer = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +#$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $consumer_ior -ORBSvcConf $consumer_conf -ORBDebugLevel 1"; +$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $consumer_ior -ORBSvcConf $consumer_conf -Skip_Priority_Levels_Check"; + +unlink $naming_ior; +$Naming->Spawn (); + +if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the naming service to start\n"; + $Naming->Kill (); + exit 1; +} + +unlink $consumer_ior; +$Consumer->Arguments ($Consumer_Args); +$args = $Consumer->Arguments (); +print STDERR "Running Consumer with arguments: $args\n"; +$status = $Consumer->Spawn (); + +if (PerlACE::waitforfile_timed ($consumer_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the consumer to start\n"; + $Naming->Kill (); + exit 1; +} + +$Supplier->Arguments ($Supplier_Args); +$args = $Supplier->Arguments (); +print STDERR "Running Supplier with arguments: $args\n"; +$Supplier->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Supplier returned $status\n"; + $Supplier->Kill (); + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + + +$Consumer->Wait (); +unlink $consumer_ior; + +$Naming->Kill (); +unlink $naming_ior; + +if ($#ARGV > -1) + { + $results_directory = $ARGV[0]; + print STDERR "Saving results to $results_directory\n"; + + mkdir $results_directory, 0777; + + @list=glob("*.dat"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + + @list=glob("*.conf"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + } + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops/supplier.conf new file mode 100644 index 00000000000..fef4d975c5d --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops/supplier.conf @@ -0,0 +1,25 @@ +## $Id$ +# +# Note that this test is not portable because it does not use RTCORBA. +# All priority values are for Linux +# +# +##---- Load the Factories------ +dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +### --- Create Supplier connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Direct c_high -EventType H -Priority 2 -Period 0 -Iter 50000 -Load 0 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -SignalPeer" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops_RTCORBA/consumer.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops_RTCORBA/consumer.conf new file mode 100644 index 00000000000..d7b6d405f92 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops_RTCORBA/consumer.conf @@ -0,0 +1,27 @@ +## $Id$ +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +dynamic TAO_Notify_Tests_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_POA_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 1 -Lanes 2 -Lane 0 1 0 -Lane 1 1 0" +# +##--------- Consumer 3 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_high -Direct -POA poa_1" +# +##------- Run--------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops_RTCORBA/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops_RTCORBA/run_test.pl new file mode 100755 index 00000000000..d9eb350d2e9 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops_RTCORBA/run_test.pl @@ -0,0 +1,94 @@ +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; +use File::Copy; + +$experiment_timeout = 600; +$startup_timeout = 600; +$naming_ior = PerlACE::LocalFile ("naming.ior"); +$consumer_ior = PerlACE::LocalFile ("consumer.ior"); +$supplier_conf = PerlACE::LocalFile ("supplier.conf"); +$consumer_conf = PerlACE::LocalFile ("consumer.conf"); +$status = 0; + +$Naming = new PerlACE::Process ("../../../../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Supplier = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$consumer_ior -ORBSvcConf $supplier_conf"; + +$Consumer = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +#$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $consumer_ior -ORBSvcConf $consumer_conf -ORBDebugLevel 1"; +$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $consumer_ior -ORBSvcConf $consumer_conf"; + +unlink $naming_ior; +$Naming->Spawn (); + +if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the naming service to start\n"; + $Naming->Kill (); + exit 1; +} + +unlink $consumer_ior; +$Consumer->Arguments ($Consumer_Args); +$args = $Consumer->Arguments (); +print STDERR "Running Consumer with arguments: $args\n"; +$status = $Consumer->Spawn (); + +if (PerlACE::waitforfile_timed ($consumer_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the consumer to start\n"; + $Naming->Kill (); + exit 1; +} + +$Supplier->Arguments ($Supplier_Args); +$args = $Supplier->Arguments (); +print STDERR "Running Supplier with arguments: $args\n"; +$Supplier->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Supplier returned $status\n"; + $Supplier->Kill (); + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + + +$Consumer->Wait (); +unlink $consumer_ior; + +$Naming->Kill (); +unlink $naming_ior; + +if ($#ARGV > -1) + { + $results_directory = $ARGV[0]; + print STDERR "Saving results to $results_directory\n"; + + mkdir $results_directory, 0777; + + @list=glob("*.dat"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + + @list=glob("*.conf"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + } + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops_RTCORBA/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops_RTCORBA/supplier.conf new file mode 100644 index 00000000000..3b7a027668c --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops_RTCORBA/supplier.conf @@ -0,0 +1,25 @@ +## $Id$ +## +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +### --- Create Supplier connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Direct c_high -EventType H -Priority 1 -Period 0 -Iter 50000 -Load 0 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -SignalPeer" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops/consumer.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops/consumer.conf new file mode 100644 index 00000000000..8bfc893a7a9 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops/consumer.conf @@ -0,0 +1,26 @@ +## $Id$ +## +# +# Note that this test is not portable because it does not use RTCORBA. +# All priority values are for Linux +# +##---- Load the Factories------ +# +dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##--------- Consumer 3 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_high -Direct" +# +##------- Run--------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops/relay.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops/relay.conf new file mode 100644 index 00000000000..de27feabe08 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops/relay.conf @@ -0,0 +1,27 @@ +## $Id$ +## +# +# Note that this test is not portable because it does not use RTCORBA. +# All priority values are for Linux +# +##---- Load the Factories------ +# +dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##--------- Consumer 3 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_high_relay -Relay c_high" +# +##------- Run--------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -SignalPeer" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops/run_test.pl new file mode 100755 index 00000000000..ef4585df832 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops/run_test.pl @@ -0,0 +1,117 @@ +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; +use File::Copy; + +$experiment_timeout = 60; +$startup_timeout = 60; +$naming_ior = PerlACE::LocalFile ("naming.ior"); +$consumer_ior = PerlACE::LocalFile ("consumer.ior"); +$relay_ior = PerlACE::LocalFile ("relay.ior"); + +$supplier_conf = PerlACE::LocalFile ("supplier.conf"); +$consumer_conf = PerlACE::LocalFile ("consumer.conf"); +$relay_conf = PerlACE::LocalFile ("relay.conf"); + +$status = 0; + +$Naming = new PerlACE::Process ("../../../../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Supplier = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$relay_ior -ORBSvcConf $supplier_conf -Skip_Priority_Levels_Check"; + +$Consumer = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $consumer_ior -ORBSvcConf $consumer_conf -Skip_Priority_Levels_Check"; + +$Relay = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +$Relay_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $relay_ior -IORinput file://$consumer_ior -ORBSvcConf $relay_conf -Skip_Priority_Levels_Check"; + +unlink $naming_ior; +$Naming->Spawn (); + +if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the naming service to start\n"; + $Naming->Kill (); + exit 1; +} + +unlink $consumer_ior; +$Consumer->Arguments ($Consumer_Args); +$args = $Consumer->Arguments (); +print STDERR "Running Consumer with arguments: $args\n"; +$status = $Consumer->Spawn (); + +if (PerlACE::waitforfile_timed ($consumer_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the consumer to start\n"; + $Naming->Kill (); + exit 1; +} + +unlink $relay_ior; +$Relay->Arguments ($Relay_Args); +$args = $Relay->Arguments (); +print STDERR "Running Relay with arguments: $args\n"; +$status = $Relay->Spawn (); + +if (PerlACE::waitforfile_timed ($relay_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the Relay to start\n"; + $Consumer->Kill (); + $Naming->Kill (); + exit 1; +} + +$Supplier->Arguments ($Supplier_Args); +$args = $Supplier->Arguments (); +print STDERR "Running Supplier with arguments: $args\n"; +$Supplier->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Supplier returned $status\n"; + $Supplier->Kill (); + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + +$Supplier->Kill (); +$Consumer->Kill (); +$Relay->Kill (); + +unlink $consumer_ior; +unlink $relay_ior; + +$Naming->Kill (); +unlink $naming_ior; + +if ($#ARGV > -1) + { + $results_directory = $ARGV[0]; + print STDERR "Saving results to $results_directory\n"; + + mkdir $results_directory, 0777; + + @list=glob("*.dat"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + + @list=glob("*.conf"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + } + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops/supplier.conf new file mode 100644 index 00000000000..2cdad84a16a --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops/supplier.conf @@ -0,0 +1,25 @@ +## $Id$ +## +# +# Note that this test is not portable because it does not use RTCORBA. +# All priority values are for Linux +# +##---- Load the Factories------ +dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Direct c_high_relay -EventType H -Priority 2 -Period 0 -Iter 50000 -Load 0 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -SignalPeer" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops_RTCORBA/consumer.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops_RTCORBA/consumer.conf new file mode 100644 index 00000000000..d7b6d405f92 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops_RTCORBA/consumer.conf @@ -0,0 +1,27 @@ +## $Id$ +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +dynamic TAO_Notify_Tests_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_POA_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 1 -Lanes 2 -Lane 0 1 0 -Lane 1 1 0" +# +##--------- Consumer 3 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_high -Direct -POA poa_1" +# +##------- Run--------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops_RTCORBA/relay.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops_RTCORBA/relay.conf new file mode 100644 index 00000000000..15313407835 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops_RTCORBA/relay.conf @@ -0,0 +1,28 @@ +## $Id$ +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +dynamic TAO_Notify_Tests_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_POA_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 1 -Lanes 2 -Lane 0 1 0 -Lane 1 1 0" +# +##--------- Consumer 3 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_high_relay -Relay c_high -POA poa_1" +# +##------- Run--------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -SignalPeer" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops_RTCORBA/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops_RTCORBA/run_test.pl new file mode 100755 index 00000000000..3fc76f501a0 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops_RTCORBA/run_test.pl @@ -0,0 +1,117 @@ +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; +use File::Copy; + +$experiment_timeout = 60; +$startup_timeout = 60; +$naming_ior = PerlACE::LocalFile ("naming.ior"); +$consumer_ior = PerlACE::LocalFile ("consumer.ior"); +$relay_ior = PerlACE::LocalFile ("relay.ior"); + +$supplier_conf = PerlACE::LocalFile ("supplier.conf"); +$consumer_conf = PerlACE::LocalFile ("consumer.conf"); +$relay_conf = PerlACE::LocalFile ("relay.conf"); + +$status = 0; + +$Naming = new PerlACE::Process ("../../../../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Supplier = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$relay_ior -ORBSvcConf $supplier_conf"; + +$Consumer = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $consumer_ior -ORBSvcConf $consumer_conf"; + +$Relay = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +$Relay_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $relay_ior -IORinput file://$consumer_ior -ORBSvcConf $relay_conf"; + +unlink $naming_ior; +$Naming->Spawn (); + +if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the naming service to start\n"; + $Naming->Kill (); + exit 1; +} + +unlink $consumer_ior; +$Consumer->Arguments ($Consumer_Args); +$args = $Consumer->Arguments (); +print STDERR "Running Consumer with arguments: $args\n"; +$status = $Consumer->Spawn (); + +if (PerlACE::waitforfile_timed ($consumer_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the consumer to start\n"; + $Naming->Kill (); + exit 1; +} + +unlink $relay_ior; +$Relay->Arguments ($Relay_Args); +$args = $Relay->Arguments (); +print STDERR "Running Relay with arguments: $args\n"; +$status = $Relay->Spawn (); + +if (PerlACE::waitforfile_timed ($relay_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the Relay to start\n"; + $Consumer->Kill (); + $Naming->Kill (); + exit 1; +} + +$Supplier->Arguments ($Supplier_Args); +$args = $Supplier->Arguments (); +print STDERR "Running Supplier with arguments: $args\n"; +$Supplier->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Supplier returned $status\n"; + $Supplier->Kill (); + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + +$Supplier->Kill (); +$Consumer->Kill (); +$Relay->Kill (); + +unlink $consumer_ior; +unlink $relay_ior; + +$Naming->Kill (); +unlink $naming_ior; + +if ($#ARGV > -1) + { + $results_directory = $ARGV[0]; + print STDERR "Saving results to $results_directory\n"; + + mkdir $results_directory, 0777; + + @list=glob("*.dat"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + + @list=glob("*.conf"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + } + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops_RTCORBA/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops_RTCORBA/supplier.conf new file mode 100644 index 00000000000..e9c9452944a --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops_RTCORBA/supplier.conf @@ -0,0 +1,26 @@ +## $Id$ +## This file has the following configuration: +## +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Direct c_high_relay -EventType H -Priority 1 -Period 0 -Iter 50000 -Load 0 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -SignalPeer" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Colocated/colocated.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Colocated/colocated.conf new file mode 100644 index 00000000000..26063b38c14 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Colocated/colocated.conf @@ -0,0 +1,48 @@ +#$Id$ +# +# Note that this test is not portable because it does not use RTCORBA. +# All priority values are for Linux +# +dynamic TAO_Notify_Service Service_Object * TAO_CosNotification_Serv:_make_TAO_CosNotify_Service () "" +# +##---- Load the Factories------ +# +dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +# +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory COLLOCATED" +# +### +### Configure Supplier and Consumer for the High Priority Path +### +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa_high ec1 -AND_OP" +# +### --- Create Supplier s_high connected to sa_high ----- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa_high -EventType H -Priority 2 -Iter 50000 -Load 0 -RunTime 15" +# +##--------- Consumer Admin 1 ------------- +static Command_Builder "ConsumerAdmin -Create ca_high ec1 -AND_OP" +# +##--------- Consumer 1 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_high -Admin ca_high" +static Command_Builder "PeriodicConsumer -Subscription c_high +H" +# +##--------- Run ------------- +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Colocated/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Colocated/run_test.pl new file mode 100755 index 00000000000..3e171a8e216 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Colocated/run_test.pl @@ -0,0 +1,69 @@ +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 = 600; +$startup_timeout = 60; +$naming_ior = PerlACE::LocalFile ("naming.ior"); +$collocated_conf = PerlACE::LocalFile ("colocated.conf"); +$status = 0; + +$Naming = new PerlACE::Process ("../../../../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Collocated = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +$Collocated_Args = "-ORBInitRef NameService=file://$naming_ior -ORBSvcConf $collocated_conf -Skip_Priority_Levels_Check"; + +unlink $naming_ior; +$Naming->Spawn (); + +if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the naming service to start\n"; + $Naming->Kill (); + exit 1; +} + +$Collocated->Arguments ($Collocated_Args); +$args = $Collocated->Arguments (); +print STDERR "Running Collocated with arguments: $args\n"; +$status = $Collocated->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Collocated returned $status\n"; + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + +$Naming->Kill (); +unlink $naming_ior; + +if ($#ARGV > -1) + { + $results_directory = $ARGV[0]; + print STDERR "Saving results to $results_directory\n"; + + mkdir $results_directory, 0777; + + @list=glob("*.dat"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + + @list=glob("*.conf"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + } + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Colocated_RTCORBA/colocated.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Colocated_RTCORBA/colocated.conf new file mode 100644 index 00000000000..18976ea0ad2 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Colocated_RTCORBA/colocated.conf @@ -0,0 +1,55 @@ +#$Id$ +# +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Factory Service_Object * TAO_CosNotification_Serv:_make_TAO_Notify_Default_Factory () "" +# +dynamic TAO_Notify_Service Service_Object * TAO_RT_Notification:_make_TAO_RT_Notify_Service () "" +# +##---- Load the Factories------ +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +# +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +dynamic TAO_Notify_Tests_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_POA_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory COLLOCATED" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 2 -Lane 0 1 0 -Lane 1 1 0" +# +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 1 -Lanes 2 -Lane 0 1 0 -Lane 1 1 0" +# +### +### Configure Supplier and Consumer for the High Priority Path +### +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa_high ec1 -AND_OP" +# +### --- Create Supplier s_high connected to sa_high ----- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa_high -EventType H -Priority 1 -Iter 50000 -Load 0 -RunTime 15" +# +##--------- Consumer Admin 1 ------------- +static Command_Builder "ConsumerAdmin -Create ca_high ec1 -AND_OP" +# +##--------- Consumer 1 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_high -Admin ca_high -POA poa_1" +static Command_Builder "PeriodicConsumer -Subscription c_high +H" +# +##--------- Run ------------- +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Colocated_RTCORBA/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Colocated_RTCORBA/run_test.pl new file mode 100755 index 00000000000..c24ea4c7cbe --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Colocated_RTCORBA/run_test.pl @@ -0,0 +1,69 @@ +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 = 600; +$startup_timeout = 60; +$naming_ior = PerlACE::LocalFile ("naming.ior"); +$collocated_conf = PerlACE::LocalFile ("colocated.conf"); +$status = 0; + +$Naming = new PerlACE::Process ("../../../../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Collocated = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +$Collocated_Args = "-ORBInitRef NameService=file://$naming_ior -ORBSvcConf $collocated_conf"; + +unlink $naming_ior; +$Naming->Spawn (); + +if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the naming service to start\n"; + $Naming->Kill (); + exit 1; +} + +$Collocated->Arguments ($Collocated_Args); +$args = $Collocated->Arguments (); +print STDERR "Running Collocated with arguments: $args\n"; +$status = $Collocated->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Collocated returned $status\n"; + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + +$Naming->Kill (); +unlink $naming_ior; + +if ($#ARGV > -1) + { + $results_directory = $ARGV[0]; + print STDERR "Saving results to $results_directory\n"; + + mkdir $results_directory, 0777; + + @list=glob("*.dat"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + + @list=glob("*.conf"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + } + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify/consumer.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify/consumer.conf new file mode 100644 index 00000000000..4bedda340f5 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify/consumer.conf @@ -0,0 +1,28 @@ +## $Id$ +# +# Note that this test is not portable because it does not use RTCORBA. +# All priority values are for Linux +# +##---- Load the Factories------ +dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##--------- Consumer Admin 1 ------------- +static Command_Builder "ConsumerAdmin -Create ca1 ec1 -AND_OP" +# +##--------- Consumer , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_high -Admin ca1" +static Command_Builder "PeriodicConsumer -Subscription c_high +H" +# +##------- Run--------- +static Command_Builder "Application -SignalPeer" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify/notify.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify/notify.conf new file mode 100644 index 00000000000..61456d1a199 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify/notify.conf @@ -0,0 +1,2 @@ +dynamic TAO_Notify_Service Service_Object * TAO_CosNotification_Serv:_make_TAO_CosNotify_Service () "" + diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify/run_test.pl new file mode 100755 index 00000000000..4240b4f2c2a --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify/run_test.pl @@ -0,0 +1,167 @@ +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; +use File::Copy; +use Getopt::Std; + +# -n notify.conf -s supplier.conf -c consumer.conf -o output_dir -h +getopts ("n:s:c:o:h"); + +if ($opt_h) +{ + print STDERR "-n notify.conf -s supplier.conf -c consumer.conf -o output_dir -h\n"; + exit 0; +} + +$experiment_timeout = 120; +$startup_timeout = 120; + +if ($opt_n) +{ + $notify_conf = PerlACE::LocalFile ($opt_n); + +}else +{ + $notify_conf = PerlACE::LocalFile ("notify.conf"); +} + +if ($opt_s) +{ + $supplier_conf = PerlACE::LocalFile ($opt_s); + +}else +{ + $supplier_conf = PerlACE::LocalFile ("supplier.conf"); +} + +if ($opt_c) +{ + $consumer_conf = PerlACE::LocalFile ($opt_c); + +}else +{ + $consumer_conf = PerlACE::LocalFile ("consumer.conf"); +} + +$notify_ior = PerlACE::LocalFile ("notify.ior"); + +$naming_ior = PerlACE::LocalFile ("naming.ior"); + +$supplier_ior = PerlACE::LocalFile ("supplier.ior"); + +@list=glob("*.dat"); +for $file (@list) +{ + unlink $file or die "Could not delete $file"; +} + +$status = 0; + +$Naming = new PerlACE::Process ("../../../../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Notification = new PerlACE::Process ("../../../../../../Notify_Service/Notify_Service"); + +$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf"; + +$Supplier = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf -Skip_Priority_Levels_Check"; + +$Consumer = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf -Skip_Priority_Levels_Check"; + +unlink $naming_ior; +$Naming->Spawn (); + +if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the naming service to start\n"; + $Naming->Kill (); + exit 1; +} + +unlink $notify_ior; +$Notification->Arguments ($Notify_Args); +$args = $Notification->Arguments (); +print STDERR "Running Notification with arguments: $args\n"; +$Notification->Spawn (); + +if (PerlACE::waitforfile_timed ($notify_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the notify service to start\n"; + $Notification->Kill (); + $Naming->Kill (); + exit 1; +} + +unlink $supplier_ior; +$Supplier->Arguments ($Supplier_Args); +$args = $Supplier->Arguments (); +print STDERR "Running Supplier with arguments: $args\n"; +$Supplier->Spawn (); + +if (PerlACE::waitforfile_timed ($supplier_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the supplier to start\n"; + $Supplier->Kill (); + $Notification->Kill (); + $Naming->Kill (); + exit 1; +} + +unlink $consumer_ior; +$Consumer->Arguments ($Consumer_Args); +$args = $Consumer->Arguments (); +print STDERR "Running Consumer with arguments: $args\n"; +$status = $Consumer->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Consumer returned $status\n"; + $Supplier->Kill (); + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + +unlink $consumer_ior; + +$Supplier->Kill (); +unlink $supplier_ior; + +$Notification->Kill (); +unlink $notify_ior; + +$Naming->Kill (); +unlink $naming_ior; + +if ($opt_o) + { + $results_directory = PerlACE::LocalFile ($opt_o); + + if (! -e $results_directory) + { + mkdir $results_directory, 0777; + } + + print STDERR "Saving results to $results_directory\n"; + + @list=glob("*.dat"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + + @list=glob("*.conf"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + } + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify/supplier.conf new file mode 100644 index 00000000000..7a59c06f755 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify/supplier.conf @@ -0,0 +1,33 @@ +## $Id$ +## +# +# Note that this test is not portable because it does not use RTCORBA. +# All priority values are for Linux +# +##---- Load the Factories------ +dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +# +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 2 -Period 0 -Iter 50000 -Load 0 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify_RTCORBA/consumer.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify_RTCORBA/consumer.conf new file mode 100644 index 00000000000..9b515bcb52c --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify_RTCORBA/consumer.conf @@ -0,0 +1,31 @@ +## $Id$ +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +dynamic TAO_Notify_Tests_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_POA_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 1 -Lanes 2 -Lane 0 1 0 -Lane 1 1 0" +# +##--------- Consumer Admin 1 ------------- +static Command_Builder "ConsumerAdmin -Create ca1 ec1 -AND_OP" +# +##--------- Consumer 3 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_high -Admin ca1 -POA poa_1" +static Command_Builder "PeriodicConsumer -Subscription c_high +H" +# +##------- Run--------- +static Command_Builder "Application -SignalPeer" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify_RTCORBA/notify.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify_RTCORBA/notify.conf new file mode 100644 index 00000000000..a747c353448 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify_RTCORBA/notify.conf @@ -0,0 +1,3 @@ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +dynamic TAO_Notify_Factory Service_Object * TAO_CosNotification_Serv:_make_TAO_Notify_Default_Factory () "" +dynamic TAO_Notify_Service Service_Object * TAO_RT_Notification:_make_TAO_RT_Notify_Service () "" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify_RTCORBA/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify_RTCORBA/run_test.pl new file mode 100755 index 00000000000..2e9bbf4d9fb --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify_RTCORBA/run_test.pl @@ -0,0 +1,170 @@ +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; +use File::Copy; +use Getopt::Std; + +# -n notify.conf -s supplier.conf -c consumer.conf -o output_dir -h +getopts ("n:s:c:o:h"); + +if ($opt_h) +{ + print STDERR "-n notify.conf -s supplier.conf -c consumer.conf -o output_dir -h\n"; + exit 0; +} + +$experiment_timeout = 120; +$startup_timeout = 120; + +if ($opt_n) +{ + $notify_conf = PerlACE::LocalFile ($opt_n); + +}else +{ + $notify_conf = PerlACE::LocalFile ("notify.conf"); +} + +if ($opt_s) +{ + $supplier_conf = PerlACE::LocalFile ($opt_s); + +}else +{ + $supplier_conf = PerlACE::LocalFile ("supplier.conf"); +} + +if ($opt_c) +{ + $consumer_conf = PerlACE::LocalFile ($opt_c); + +}else +{ + $consumer_conf = PerlACE::LocalFile ("consumer.conf"); +} + +$notify_ior = PerlACE::LocalFile ("notify.ior"); + +$naming_ior = PerlACE::LocalFile ("naming.ior"); + +$supplier_ior = PerlACE::LocalFile ("supplier.ior"); + +@list=glob("*.dat"); +for $file (@list) +{ + unlink $file or die "Could not delete $file"; +} + +$status = 0; + +$Naming = new PerlACE::Process ("../../../../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Notification = new PerlACE::Process ("../../../../../../Notify_Service/Notify_Service"); + +#$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf -ORBDebugLevel 1"; + +$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf"; + +$Supplier = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +$Supplier_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $supplier_ior -ORBSvcConf $supplier_conf"; + +$Consumer = new PerlACE::Process ("../../../../Driver/Notify_Tests_Driver"); + +$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf"; +#$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_ior -ORBSvcConf $consumer_conf -ORBDebugLevel 1"; + +unlink $naming_ior; +$Naming->Spawn (); + +if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the naming service to start\n"; + $Naming->Kill (); + exit 1; +} + +unlink $notify_ior; +$Notification->Arguments ($Notify_Args); +$args = $Notification->Arguments (); +print STDERR "Running Notification with arguments: $args\n"; +$Notification->Spawn (); + +if (PerlACE::waitforfile_timed ($notify_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the notify service to start\n"; + $Notification->Kill (); + $Naming->Kill (); + exit 1; +} + +unlink $supplier_ior; +$Supplier->Arguments ($Supplier_Args); +$args = $Supplier->Arguments (); +print STDERR "Running Supplier with arguments: $args\n"; +$Supplier->Spawn (); + +if (PerlACE::waitforfile_timed ($supplier_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the supplier to start\n"; + $Supplier->Kill (); + $Notification->Kill (); + $Naming->Kill (); + exit 1; +} + +unlink $consumer_ior; +$Consumer->Arguments ($Consumer_Args); +$args = $Consumer->Arguments (); +print STDERR "Running Consumer with arguments: $args\n"; +$status = $Consumer->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Consumer returned $status\n"; + $Supplier->Kill (); + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + +unlink $consumer_ior; + +$Supplier->Kill (); +unlink $supplier_ior; + +$Notification->Kill (); +unlink $notify_ior; + +$Naming->Kill (); +unlink $naming_ior; + +if ($opt_o) + { + $results_directory = PerlACE::LocalFile ($opt_o); + + if (! -e $results_directory) + { + mkdir $results_directory, 0777; + } + + print STDERR "Saving results to $results_directory\n"; + + @list=glob("*.dat"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + + @list=glob("*.conf"); + for $file (@list) + { + copy ("$file", "$results_directory/$file"); + } + } + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify_RTCORBA/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify_RTCORBA/supplier.conf new file mode 100644 index 00000000000..81836c43a5c --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify_RTCORBA/supplier.conf @@ -0,0 +1,32 @@ +## $Id$ +## +# +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 2 -Lane 0 1 0 -Lane 1 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa1 ec1 -AND_OP" +# +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa1 -EventType H -Priority 1 -Period 0 -Iter 50000 -Load 0 -RunTime 15" +# +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/README b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/README new file mode 100644 index 00000000000..1bdb2e76d15 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/README @@ -0,0 +1,33 @@ +//$Id$ + +Max Throughput of various configurations: +========================================= + +To calculate the Maximum throughput possible, a supplier thread sends +events in a burst to a consumer. + +This test runs the following configurations*: + +1. 2 Hops : A supplier sends events directly to a consumer. +2. 3 Hops : A supplier sends events to a relay consumer + onto the final consummer. +3. Notify : A supplier sends events via Cos Notification to a consumer. + +4. Collocated: A supplier sends events via a collocated + RT Notification to a consumer. + +[* Note that the payload is identical in all configurations. +Also beware that the priority values in these tests are for Linux. +These cannot be made portable as they do not use RTCORBA.] + +The RTCORBA enabled versions of these tests are: + +2_Hops_RTCORBA +3_Hops_RTCORBA +Notify_RTCORBA +Colocated_RTCORBA + +Running the tests: +================= + +Simply execute "perl run_all.pl" in this directory. diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/run_all.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/run_all.pl new file mode 100755 index 00000000000..412bd93717b --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/run_all.pl @@ -0,0 +1,34 @@ +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; +use File::Copy; +use Getopt::Std; + +@list= ("2_Hops","2_Hops_RTCORBA","3_Hops","3_Hops_RTCORBA","Colocated","Colocated_RTCORBA","Notify","Notify_RTCORBA"); + +for $file (@list) +{ + if (-d $file) + { + print STDERR "Running $file test\n"; + + $cmd = "run_test.pl"; + + chdir $file or die "Could not chdir to $file"; + + $status = system ("perl $cmd"); + + if ($status != 0) + { + print STDERR "ERROR: $file test returned $status\n"; + } + + chdir "../"; + } +} diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_1/other_paths.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_1/other_paths.conf new file mode 100644 index 00000000000..92cead2565b --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_1/other_paths.conf @@ -0,0 +1,42 @@ +## $Id$ +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +dynamic TAO_Notify_Tests_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_POA_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa_oth ec1 -AND_OP" +# +### --- Create Supplier 1 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_oth_1 -Admin sa_oth -EventType O -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +# +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_oth -PriorityModel CLIENT 1 -Lanes 2 -Lane 0 1 0 -Lane 1 1 0" +# +##--------- Consumer Admin ------------- +static Command_Builder "ConsumerAdmin -Create ca_oth ec1 -AND_OP" +# +##--------- Consumer High , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_oth -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth +O" +# +##------- Run--------- +static Command_Builder "Application -SignalPeer" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_10/other_paths.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_10/other_paths.conf new file mode 100644 index 00000000000..f79dccd419b --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_10/other_paths.conf @@ -0,0 +1,85 @@ +## $Id$ +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +# +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +dynamic TAO_Notify_Tests_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_POA_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +#static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +#static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 3 -Lane 0 1 0 -Lane 1 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa_oth ec1 -AND_OP" +# +### --- Create Supplier 1 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_oth_1 -Admin sa_oth -EventType o1 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_2 -Admin sa_oth -EventType o2 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_3 -Admin sa_oth -EventType o3 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_4 -Admin sa_oth -EventType o4 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_5 -Admin sa_oth -EventType o5 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_6 -Admin sa_oth -EventType o6 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_7 -Admin sa_oth -EventType o7 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_8 -Admin sa_oth -EventType o8 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_9 -Admin sa_oth -EventType o9 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_10 -Admin sa_oth -EventType o10 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +# +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_oth -PriorityModel CLIENT 1 -Lanes 2 -Lane 0 1 0 -Lane 1 1 0" +# +##--------- Consumer Admin ------------- +static Command_Builder "ConsumerAdmin -Create ca_oth ec1 -AND_OP" +# +##--------- Consumer High , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_oth_1 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_1 +o1" +# +static Command_Builder "PeriodicConsumer -Create c_oth_2 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_2 +o2" +# +static Command_Builder "PeriodicConsumer -Create c_oth_3 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_3 +o3" +# +static Command_Builder "PeriodicConsumer -Create c_oth_4 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_4 +o4" +# +static Command_Builder "PeriodicConsumer -Create c_oth_5 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_5 +o5" +# +static Command_Builder "PeriodicConsumer -Create c_oth_6 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_6 +o6" +# +static Command_Builder "PeriodicConsumer -Create c_oth_7 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_7 +o7" +# +static Command_Builder "PeriodicConsumer -Create c_oth_8 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_8 +o8" +# +static Command_Builder "PeriodicConsumer -Create c_oth_9 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_9 +o9" +# +static Command_Builder "PeriodicConsumer -Create c_oth_10 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_10 +o10" +# +##------- Run--------- +static Command_Builder "Application -SignalPeer" +#static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats -Samples" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_20/other_paths.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_20/other_paths.conf new file mode 100644 index 00000000000..e6de590526f --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_20/other_paths.conf @@ -0,0 +1,125 @@ +## $Id$ +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +# +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +dynamic TAO_Notify_Tests_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_POA_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +#static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +#static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 3 -Lane 0 1 0 -Lane 1 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa_oth ec1 -AND_OP" +# +### --- Create Supplier 1 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_oth_1 -Admin sa_oth -EventType o1 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_2 -Admin sa_oth -EventType o2 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_3 -Admin sa_oth -EventType o3 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_4 -Admin sa_oth -EventType o4 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_5 -Admin sa_oth -EventType o5 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_6 -Admin sa_oth -EventType o6 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_7 -Admin sa_oth -EventType o7 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_8 -Admin sa_oth -EventType o8 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_9 -Admin sa_oth -EventType o9 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_10 -Admin sa_oth -EventType o10 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_11 -Admin sa_oth -EventType o11 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_12 -Admin sa_oth -EventType o12 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_13 -Admin sa_oth -EventType o13 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_14 -Admin sa_oth -EventType o14 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_15 -Admin sa_oth -EventType o15 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_16 -Admin sa_oth -EventType o16 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_17 -Admin sa_oth -EventType o17 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_18 -Admin sa_oth -EventType o18 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_19 -Admin sa_oth -EventType o19 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_20 -Admin sa_oth -EventType o20 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +# +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_oth -PriorityModel CLIENT 1 -Lanes 2 -Lane 0 1 0 -Lane 1 1 0" +# +##--------- Consumer Admin ------------- +static Command_Builder "ConsumerAdmin -Create ca_oth ec1 -AND_OP" +# +##--------- Consumer High , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_oth_1 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_1 +o1" +# +static Command_Builder "PeriodicConsumer -Create c_oth_2 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_2 +o2" +# +static Command_Builder "PeriodicConsumer -Create c_oth_3 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_3 +o3" +# +static Command_Builder "PeriodicConsumer -Create c_oth_4 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_4 +o4" +# +static Command_Builder "PeriodicConsumer -Create c_oth_5 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_5 +o5" +# +static Command_Builder "PeriodicConsumer -Create c_oth_6 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_6 +o6" +# +static Command_Builder "PeriodicConsumer -Create c_oth_7 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_7 +o7" +# +static Command_Builder "PeriodicConsumer -Create c_oth_8 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_8 +o8" +# +static Command_Builder "PeriodicConsumer -Create c_oth_9 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_9 +o9" +# +static Command_Builder "PeriodicConsumer -Create c_oth_10 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_10 +o10" +# +static Command_Builder "PeriodicConsumer -Create c_oth_11 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_11 +o11" +# +static Command_Builder "PeriodicConsumer -Create c_oth_12 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_12 +o12" +# +static Command_Builder "PeriodicConsumer -Create c_oth_13 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_13 +o13" +# +static Command_Builder "PeriodicConsumer -Create c_oth_14 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_14 +o14" +# +static Command_Builder "PeriodicConsumer -Create c_oth_15 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_15 +o15" +# +static Command_Builder "PeriodicConsumer -Create c_oth_16 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_16 +o16" +# +static Command_Builder "PeriodicConsumer -Create c_oth_17 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_17 +o17" +# +static Command_Builder "PeriodicConsumer -Create c_oth_18 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_18 +o18" +# +static Command_Builder "PeriodicConsumer -Create c_oth_19 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_19 +o19" +# +static Command_Builder "PeriodicConsumer -Create c_oth_20 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_20 +o20" +# +##------- Run--------- +static Command_Builder "Application -SignalPeer" +#static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats -Samples" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_3/other_paths.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_3/other_paths.conf new file mode 100644 index 00000000000..4d53387c72f --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_3/other_paths.conf @@ -0,0 +1,57 @@ +## $Id$ +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +# +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +dynamic TAO_Notify_Tests_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_POA_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +#static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +#static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 3 -Lane 0 1 0 -Lane 1 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa_oth ec1 -AND_OP" +# +### --- Create Supplier 1 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_oth_1 -Admin sa_oth -EventType O1 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_2 -Admin sa_oth -EventType O2 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_3 -Admin sa_oth -EventType O3 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +# +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_oth -PriorityModel CLIENT 1 -Lanes 2 -Lane 0 1 0 -Lane 1 1 0" +# +##--------- Consumer Admin ------------- +static Command_Builder "ConsumerAdmin -Create ca_oth ec1 -AND_OP" +# +##--------- Consumer High , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_oth_1 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_1 +O1" +# +static Command_Builder "PeriodicConsumer -Create c_oth_2 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_2 +O2" +# +static Command_Builder "PeriodicConsumer -Create c_oth_3 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_3 +O3" +# +##------- Run--------- +static Command_Builder "Application -SignalPeer" +#static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats -Samples" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_5/other_paths.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_5/other_paths.conf new file mode 100644 index 00000000000..b3eed2c65d4 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/Paths_5/other_paths.conf @@ -0,0 +1,65 @@ +## $Id$ +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +# +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" +# +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" +# +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" +# +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" +# +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" +# +dynamic TAO_Notify_Tests_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_POA_Command_Factory () "" +# +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" +# +##------- Create Event Channel --------------- +#static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +#static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 3 -Lane 0 1 0 -Lane 1 1 0 -Lane 3 1 0" +# +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa_oth ec1 -AND_OP" +# +### --- Create Supplier 1 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_oth_1 -Admin sa_oth -EventType O1 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_2 -Admin sa_oth -EventType O2 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_3 -Admin sa_oth -EventType O3 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_4 -Admin sa_oth -EventType O4 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +static Command_Builder "PeriodicSupplier -Create s_oth_5 -Admin sa_oth -EventType O5 -Priority 1 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" +# +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_oth -PriorityModel CLIENT 1 -Lanes 2 -Lane 0 1 0 -Lane 1 1 0" +# +##--------- Consumer Admin ------------- +static Command_Builder "ConsumerAdmin -Create ca_oth ec1 -AND_OP" +# +##--------- Consumer High , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_oth_1 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_1 +O1" +# +static Command_Builder "PeriodicConsumer -Create c_oth_2 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_2 +O2" +# +static Command_Builder "PeriodicConsumer -Create c_oth_3 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_3 +O3" +# +static Command_Builder "PeriodicConsumer -Create c_oth_4 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_4 +O4" +# +static Command_Builder "PeriodicConsumer -Create c_oth_5 -Admin ca_oth -POA poa_oth" +static Command_Builder "PeriodicConsumer -Subscription c_oth_5 +O5" +# +##------- Run--------- +static Command_Builder "Application -SignalPeer" +#static Command_Builder "Application -WaitToStart" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats -Samples" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/README b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/README new file mode 100644 index 00000000000..fdae31ca91a --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/README @@ -0,0 +1,37 @@ +# $Id$ + +Number of Paths vs Throughput of High Priority Path with period = 10ms +and Load = 30 +======================================================================= + +In this experiment we have 1 high priority path and several low +priority paths sending events over the Notification Service. + +We increase the number of low priority paths as 1, 5, 10 and 20 and +measure the throughput. + +Running the experiment: +====================== + +Run the "run_all.pl" script in this directory to run the test using RT-Notification. +as "run_all.pl --rt" + +If you want to generate results using the CosNotification, run as +"run_all.pl --cos" + +To generate the data for both cases run as "run_all.pl --all" + +The RT-Notification results are generated in the Paths_X/rt_output directory. +The CosNotification results are generated in the Paths_X/cos_output directory. + +e.g., Paths_5/rt_output/c_oth_1.dat would contain the statistics +recorded for consumer #1 of the set of 5 paths. + + +Expected Results: +================ + +For RT-Notification: The Throughput of the high priority task should remain at 100Hz. while +the remaining paths should share the remainder of the capacity. + +For CosNotification: The throughput of *all* the paths is shared.
\ No newline at end of file diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/cos_notify.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/cos_notify.conf new file mode 100644 index 00000000000..0515ecbd0db --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/cos_notify.conf @@ -0,0 +1,2 @@ +dynamic TAO_Notify_Factory Service_Object * TAO_CosNotification_Serv:_make_TAO_Notify_Default_Factory () "" +dynamic TAO_Notify_Service Service_Object * TAO_CosNotification_Serv:_make_TAO_CosNotify_Service () "" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/high_path.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/high_path.conf new file mode 100644 index 00000000000..093a1f720c7 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/high_path.conf @@ -0,0 +1,49 @@ +## $Id$ +##---- Load the Factories------ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" + +dynamic TAO_Notify_Tests_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_Application_Command_Factory () "" +##dynamic TAO_Notify_Tests_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_Notify_Tests_Application_Command_Factory () "" + +dynamic TAO_Notify_Tests_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_EventChannel_Command_Factory () "" + +dynamic TAO_Notify_Tests_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_SupplierAdmin_Command_Factory () "" + +dynamic TAO_Notify_Tests_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Supplier_Command_Factory () "" + +dynamic TAO_Notify_Tests_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_Notify_Tests_ConsumerAdmin_Command_Factory () "" + +dynamic TAO_Notify_Tests_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_Notify_Tests_Periodic_Consumer_Command_Factory () "" + +dynamic TAO_Notify_Tests_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_Notify_Tests_RT_POA_Command_Factory () "" + +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" + +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory" +static Command_Builder "EventChannel -Set_QoS ec1 -Lanes 3 -Lane 0 1 0 -Lane 1 1 0 -Lane 3 1 0" + +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa_high ec1 -AND_OP" + +### --- Create Supplier High connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high -Admin sa_high -EventType H -Priority 3 -Period 10000 -Iter 50000 -Load 30 -RunTime 15" + +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 1 -Lanes 2 -Lane 0 1 0 -Lane 3 1 0" + +##--------- Consumer Admin 1 ------------- +static Command_Builder "ConsumerAdmin -Create ca_high ec1 -AND_OP" + +##--------- Consumer High , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_high -Admin ca_high -POA poa_1" +static Command_Builder "PeriodicConsumer -Subscription c_high +H" + +##--------- Run ------------- +static Command_Builder "Application -WaitToStart" +#static Command_Builder "Application -SignalPeer" +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats -Samples" +static Command_Builder "Application -Shutdown" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/rt_notify.conf b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/rt_notify.conf new file mode 100644 index 00000000000..a747c353448 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/rt_notify.conf @@ -0,0 +1,3 @@ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +dynamic TAO_Notify_Factory Service_Object * TAO_CosNotification_Serv:_make_TAO_Notify_Default_Factory () "" +dynamic TAO_Notify_Service Service_Object * TAO_RT_Notification:_make_TAO_RT_Notify_Service () "" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_all.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_all.pl new file mode 100755 index 00000000000..58a38971c4d --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_all.pl @@ -0,0 +1,58 @@ +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; +use File::Copy; +use Getopt::Long; + +GetOptions ("rt" => \$rt, + "cos" => \$cos, + "all" => \$all); + +@list=("Paths_1", "Paths_3","Paths_5","Paths_10","Paths_20"); + +for $file (@list) +{ + # default to rt + if (!$all && !$rt && !$cos) + { + $rt = 1; + } + + if (-d $file) + { + if ($all || $rt) + { + print STDERR "Running $file test with RT Notification\n"; + + $cmd = "run_test.pl -n rt_notify.conf -s high_path.conf -c $file/other_paths.conf -o $file/rt_output"; + + $status = system ("perl $cmd"); + + if ($status != 0) + { + print STDERR "ERROR: $file test returned $status\n"; + } + } + + + if ($all || $cos) + { + print STDERR "Running $file test with COS Notification\n"; + + $cmd = "run_test.pl -n cos_notify.conf -s high_path.conf -c $file/other_paths.conf -o $file/cos_output"; + + $status = system ("perl $cmd"); + + if ($status != 0) + { + print STDERR "ERROR: $file test returned $status\n"; + } + } + } +} diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_high_path.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_high_path.pl new file mode 100755 index 00000000000..494971e3f9b --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_high_path.pl @@ -0,0 +1,109 @@ +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; +use File::Copy; +use Getopt::Std; + +# -n notify.conf -s high_path.conf -c other_paths.conf -o output_dir -h +getopts ("n:s:c:o:h"); + +if ($opt_h) +{ + print STDERR "-n notify.conf -s high_path.conf -c other_paths.conf -o output_dir -h\n"; + exit 0; +} + +$experiment_timeout = 120; +$startup_timeout = 120; + +if ($opt_n) +{ + $notify_conf = PerlACE::LocalFile ($opt_n); + +}else +{ + $notify_conf = PerlACE::LocalFile ("notify.conf"); +} + +if ($opt_s) +{ + $high_path_conf = PerlACE::LocalFile ($opt_s); + +}else +{ + $high_path_conf = PerlACE::LocalFile ("high_path.conf"); +} + +if ($opt_c) +{ + $other_paths_conf = PerlACE::LocalFile ($opt_c); + +}else +{ + $other_paths_conf = PerlACE::LocalFile ("other_paths.conf"); +} + +$notify_ior = PerlACE::LocalFile ("notify.ior"); + +$naming_ior = PerlACE::LocalFile ("naming.ior"); + +$high_path_ior = PerlACE::LocalFile ("high_path.ior"); + +@list=glob("*.dat"); +for $file (@list) +{ + unlink $file or die "Could not delete $file"; +} + +$status = 0; + + +$High_path = new PerlACE::Process ("../../../Driver/Notify_Tests_Driver"); + +$High_path_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $high_path_ior -ORBSvcConf $high_path_conf"; + + +if (PerlACE::waitforfile_timed ($notify_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the notify service to start\n"; + exit 1; +} + +unlink $high_path_ior; +$High_path->Arguments ($High_path_Args); +$args = $High_path->Arguments (); +print STDERR "Running High_path with arguments: $args\n"; +$status = $High_path->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Other_paths returned $status\n"; + $High_path->Kill (); + + exit 1; + } + +if ($opt_o) + { + $results_directory = PerlACE::LocalFile ($opt_o); + + if (! -e $results_directory) + { + mkdir $results_directory, 0777; + } + + print STDERR "Saving results to $results_directory\n"; + + @list=glob("*.dat"); + for $file (@list) + { + move ("$file", "$results_directory/$file"); + } + } + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_notify.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_notify.pl new file mode 100755 index 00000000000..7d7537fe0f2 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_notify.pl @@ -0,0 +1,98 @@ +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; +use File::Copy; +use Getopt::Std; + +# -n notify.conf -s high_path.conf -c other_paths.conf -o output_dir -h +getopts ("n:s:c:o:h"); + +if ($opt_h) +{ + print STDERR "-n notify.conf -s high_path.conf -c other_paths.conf -o output_dir -h\n"; + exit 0; +} + +$experiment_timeout = 600; +$startup_timeout = 120; + +if ($opt_n) +{ + $notify_conf = PerlACE::LocalFile ($opt_n); + +}else +{ + $notify_conf = PerlACE::LocalFile ("notify.conf"); +} + +if ($opt_s) +{ + $high_path_conf = PerlACE::LocalFile ($opt_s); + +}else +{ + $high_path_conf = PerlACE::LocalFile ("high_path.conf"); +} + +if ($opt_c) +{ + $other_paths_conf = PerlACE::LocalFile ($opt_c); + +}else +{ + $other_paths_conf = PerlACE::LocalFile ("other_paths.conf"); +} + +$notify_ior = PerlACE::LocalFile ("notify.ior"); + +$naming_ior = PerlACE::LocalFile ("naming.ior"); + +$high_path_ior = PerlACE::LocalFile ("high_path.ior"); + +@list=glob("*.dat"); +for $file (@list) +{ + unlink $file or die "Could not delete $file"; +} + +$status = 0; + +$Naming = new PerlACE::Process ("../../../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Notification = new PerlACE::Process ("../../../../../Notify_Service/Notify_Service"); + +#$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf -ORBDebugLevel 1"; + +$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf"; + +unlink $naming_ior; +$Naming->Spawn (); + +if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the naming service to start\n"; + $Naming->Kill (); + exit 1; +} + +unlink $notify_ior; +$Notification->Arguments ($Notify_Args); +$args = $Notification->Arguments (); +print STDERR "Running Notification with arguments: $args\n"; +$status = $Notification->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Other_paths returned $status\n"; + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_other_paths.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_other_paths.pl new file mode 100755 index 00000000000..4fabf89d8e5 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_other_paths.pl @@ -0,0 +1,111 @@ +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; +use File::Copy; +use Getopt::Std; + +# -n notify.conf -s high_path.conf -c other_paths.conf -o output_dir -h +getopts ("n:s:c:o:h"); + +if ($opt_h) +{ + print STDERR "-n notify.conf -s high_path.conf -c other_paths.conf -o output_dir -h\n"; + exit 0; +} + +$experiment_timeout = 120; +$startup_timeout = 120; + +if ($opt_n) +{ + $notify_conf = PerlACE::LocalFile ($opt_n); + +}else +{ + $notify_conf = PerlACE::LocalFile ("notify.conf"); +} + +if ($opt_s) +{ + $high_path_conf = PerlACE::LocalFile ($opt_s); + +}else +{ + $high_path_conf = PerlACE::LocalFile ("high_path.conf"); +} + +if ($opt_c) +{ + $other_paths_conf = PerlACE::LocalFile ($opt_c); + +}else +{ + $other_paths_conf = PerlACE::LocalFile ("other_paths.conf"); +} + +$notify_ior = PerlACE::LocalFile ("notify.ior"); + +$naming_ior = PerlACE::LocalFile ("naming.ior"); + +$high_path_ior = PerlACE::LocalFile ("high_path.ior"); + +@list=glob("*.dat"); +for $file (@list) +{ + unlink $file or die "Could not delete $file"; +} + +$status = 0; + +$Other_paths = new PerlACE::Process ("../../../Driver/Notify_Tests_Driver"); + +$Other_paths_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$high_path_ior -ORBSvcConf $other_paths_conf"; + +#$Other_paths_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$high_path_ior -ORBSvcConf $other_paths_conf -ORBDebugLevel 1"; + +if (PerlACE::waitforfile_timed ($high_path_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the high_path to start\n"; + + exit 1; +} + +unlink $other_paths_ior; +$Other_paths->Arguments ($Other_paths_Args); +$args = $Other_paths->Arguments (); +print STDERR "Running Other_paths with arguments: $args\n"; +$status = $Other_paths->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Other_paths returned $status\n"; + + exit 1; + } + +unlink $other_paths_ior; + +if ($opt_o) + { + $results_directory = PerlACE::LocalFile ($opt_o); + + if (! -e $results_directory) + { + mkdir $results_directory, 0777; + } + + print STDERR "Saving results to $results_directory\n"; + + @list=glob("*.dat"); + for $file (@list) + { + move ("$file", "$results_directory/$file"); + } + } + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_test.pl new file mode 100755 index 00000000000..c2024550025 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_test.pl @@ -0,0 +1,167 @@ +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; +use File::Copy; +use Getopt::Std; + +# -n notify.conf -s high_path.conf -c other_paths.conf -o output_dir -h +getopts ("n:s:c:o:h"); + +if ($opt_h) +{ + print STDERR "-n notify.conf -s high_path.conf -c other_paths.conf -o output_dir -h -d\n"; + exit 0; +} + +$experiment_timeout = 300; +$startup_timeout = 300; +$debug = ""; + +if ($opt_d) +{ + $debug = "-ORBDebugLevel 1" +} + +if ($opt_n) +{ + $notify_conf = PerlACE::LocalFile ($opt_n); + +}else +{ + $notify_conf = PerlACE::LocalFile ("notify.conf"); +} + +if ($opt_s) +{ + $high_path_conf = PerlACE::LocalFile ($opt_s); + +}else +{ + $high_path_conf = PerlACE::LocalFile ("high_path.conf"); +} + +if ($opt_c) +{ + $other_paths_conf = PerlACE::LocalFile ($opt_c); + +}else +{ + $other_paths_conf = PerlACE::LocalFile ("other_paths.conf"); +} + +$notify_ior = PerlACE::LocalFile ("notify.ior"); + +$naming_ior = PerlACE::LocalFile ("naming.ior"); + +$high_path_ior = PerlACE::LocalFile ("high_path.ior"); + +@list=glob("*.dat"); +for $file (@list) +{ + unlink $file or die "Could not delete $file"; +} + +$status = 0; + +$Naming = new PerlACE::Process ("../../../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Notification = new PerlACE::Process ("../../../../../Notify_Service/Notify_Service"); + +$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf $debug"; + +$High_path = new PerlACE::Process ("../../../Driver/Notify_Tests_Driver"); + +$High_path_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $high_path_ior -ORBSvcConf $high_path_conf $debug"; + +$Other_paths = new PerlACE::Process ("../../../Driver/Notify_Tests_Driver"); + +$Other_paths_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$high_path_ior -ORBSvcConf $other_paths_conf $debug"; + +unlink $naming_ior; +$Naming->Spawn (); + +if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the naming service to start\n"; + $Naming->Kill (); + exit 1; +} + +unlink $notify_ior; +$Notification->Arguments ($Notify_Args); +$args = $Notification->Arguments (); +print STDERR "Running Notification with arguments: $args\n"; +$Notification->Spawn (); + +if (PerlACE::waitforfile_timed ($notify_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the notify service to start\n"; + $Notification->Kill (); + $Naming->Kill (); + exit 1; +} + +unlink $high_path_ior; +$High_path->Arguments ($High_path_Args); +$args = $High_path->Arguments (); +print STDERR "Running High_path with arguments: $args\n"; +$High_path->Spawn (); + +if (PerlACE::waitforfile_timed ($high_path_ior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the high_path to start\n"; + $High_path->Kill (); + $Notification->Kill (); + $Naming->Kill (); + exit 1; +} + +unlink $other_paths_ior; +$Other_paths->Arguments ($Other_paths_Args); +$args = $Other_paths->Arguments (); +print STDERR "Running Other_paths with arguments: $args\n"; +$status = $Other_paths->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Other_paths returned $status\n"; + $High_path->Kill (); + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + +unlink $other_paths_ior; + +$High_path->Wait (); +unlink $high_path_ior; + +$Notification->Kill (); +unlink $notify_ior; + +$Naming->Kill (); +unlink $naming_ior; + +if ($opt_o) + { + $results_directory = PerlACE::LocalFile ($opt_o); + + if (! -e $results_directory) + { + mkdir $results_directory, 0777; + } + + print STDERR "Saving results to $results_directory\n"; + + @list=glob("*.dat"); + for $file (@list) + { + move ("$file", "$results_directory/$file"); + } + } + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/README b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/README new file mode 100644 index 00000000000..916cae33bba --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/README @@ -0,0 +1,12 @@ + +This directory contains various experiments for the RT-Notification +and CosNotification Service. + +The experiments are specified in terms of directives to Service +Objects in a .conf file. The $TAO_ROOT/orbsvcs/tests/Notify/lib +directory contains the library that specifies various Service Objects +to configure the experiments. + +Running the tests: + +simple say "run_all.pl" in this directory to run all the experiments.
\ No newline at end of file diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/run_all.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/run_all.pl new file mode 100755 index 00000000000..07e8de0f78a --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/run_all.pl @@ -0,0 +1,50 @@ +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; +use Getopt::Std; + +@list= ( + { + dir_name => "1_Path_Period_0_Lanes", + cmd => "perl run_all.pl --all", + }, + { + dir_name => "3_Path_Period_10ms_Lanes", + cmd => "perl run_all.pl --all", + }, + { + dir_name => "Paths_vs_Throughput", + cmd => "perl run_all.pl --all", + }, + { + dir_name => "Max_Throughput", + cmd => "perl run_all.pl", + }, + ); + +for $test (@list) +{ + if (-d $test->{dir_name}) + { + print STDERR "Running $test->{dir_name} test\n"; + + $cmd = "run_test.pl"; + + chdir $test->{dir_name} or die "Could not chdir to $test->{dir_name}"; + + $status = system ("$test->{cmd}"); + + if ($status != 0) + { + print STDERR "ERROR: $test->{dir_name} test returned $status\n"; + } + + chdir "../"; + } +} |