diff options
author | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-29 20:37:12 +0000 |
---|---|---|
committer | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-29 20:37:12 +0000 |
commit | 6e5a5aafb63337042010a5871065813234b18c31 (patch) | |
tree | d405ce02960cd1302c543f8cb50e3061a4cdbaf4 | |
parent | 34f66769bf55173aa3bba9ee5dbfd2626e7bedef (diff) | |
download | ATCD-6e5a5aafb63337042010a5871065813234b18c31.tar.gz |
*** empty log message ***
13 files changed, 568 insertions, 30 deletions
diff --git a/TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.cpp b/TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.cpp index c5060d38b42..0f18a7bcec5 100644 --- a/TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.cpp @@ -8,8 +8,11 @@ ACE_RCSID(lib, TAO_EventChannel_Command, "$id$") #include "LookupManager.h" #include "Name.h" #include "Options_Parser.h" +#include "ace/Dynamic_Service.h" +#include "../../../orbsvcs/Notify/Service.h" TAO_NS_EventChannel_Command::TAO_NS_EventChannel_Command (void) + : colocated_ (0) { } @@ -34,7 +37,7 @@ TAO_NS_EventChannel_Command::init (ACE_Arg_Shifter& arg_shifter) { if (arg_shifter.is_anything_left ()) { - if (arg_shifter.cur_arg_strncasecmp ("-Create") == 0) // -Create ec_name factory_name + if (arg_shifter.cur_arg_strncasecmp ("-Create") == 0) // -Create ec_name factory_name [COLOCATED] { this->command_ = CREATE; @@ -45,6 +48,11 @@ TAO_NS_EventChannel_Command::init (ACE_Arg_Shifter& arg_shifter) this->factory_ = arg_shifter.get_current (); arg_shifter.consume_arg (); + + if (arg_shifter.cur_arg_strncasecmp ("COLOCATED") == 0) + { + this->colocated_ = 1; + } } else if (arg_shifter.cur_arg_strncasecmp ("-Destroy") == 0) // -Destroy ec_name { @@ -73,8 +81,70 @@ TAO_NS_EventChannel_Command::init (ACE_Arg_Shifter& arg_shifter) } void +TAO_NS_EventChannel_Command::create_colocated_ecf (ACE_ENV_SINGLE_ARG_DECL) +{ + CosNotifyChannelAdmin::EventChannelFactory_var notify_factory; + + // The Service Object. + TAO_Notify_Service* notify_service; + + notify_service = ACE_Dynamic_Service<TAO_Notify_Service>::instance (TAO_NS_NOTIFICATION_SERVICE_NAME); + + if (notify_service == 0) + { + notify_service = ACE_Dynamic_Service<TAO_Notify_Service>::instance (TAO_NOTIFY_DEF_EMO_FACTORY_NAME); + } + + if (notify_service == 0) + { + ACE_DEBUG ((LM_DEBUG, "Service not found! check conf. file\n")); + return; + } + + // Resolve some helpers. + CORBA::ORB_var orb; + PortableServer::POA_var poa; + CosNaming::NamingContextExt_var naming; + + LOOKUP_MANAGER->resolve (orb ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + LOOKUP_MANAGER->resolve (poa ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + LOOKUP_MANAGER->resolve (naming ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + notify_service->init (orb.in () ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + // Activate the factory + notify_factory = + notify_service->create (poa.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + // Register with the Naming Service + CosNaming::Name_var name = + naming->to_name (TAO_NS_Name::event_channel_factory + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + naming->rebind (name.in (), + notify_factory.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +void TAO_NS_EventChannel_Command::handle_create (ACE_ENV_SINGLE_ARG_DECL) { + if (this->colocated_ == 1) + { + this->create_colocated_ecf (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + CosNotifyChannelAdmin::EventChannelFactory_var ec_factory; LOOKUP_MANAGER->resolve (ec_factory , TAO_NS_Name::event_channel_factory ACE_ENV_ARG_PARAMETER); @@ -83,7 +153,7 @@ TAO_NS_EventChannel_Command::handle_create (ACE_ENV_SINGLE_ARG_DECL) CosNotification::QoSProperties qos; CosNotification::AdminProperties admin; - // create an event channel + // Create an event channel CosNotifyChannelAdmin::EventChannel_var ec = ec_factory->create_channel (qos, admin, diff --git a/TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.h b/TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.h index 7a9472a3ec1..3f2c7720121 100644 --- a/TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.h +++ b/TAO/orbsvcs/tests/Notify/lib/EventChannel_Command.h @@ -22,6 +22,9 @@ #include "ace/SString.h" #include "orbsvcs/CosNotifyChannelAdminC.h" #include "Command.h" +#include "../../../orbsvcs/Notify/CosNotify_Initializer.h" + +class TAO_Notify_Service; /** * @class TAO_NS_EventChannel_Command @@ -73,6 +76,12 @@ protected: CosNotification::AdminProperties admin_; + /// Flag to tell if the Channel Factory should be colocated. + CORBA::Boolean colocated_; + + /// Helper method to create a colocated ECF. + void create_colocated_ecf (ACE_ENV_SINGLE_ARG_DECL); + /// = Handlers void handle_create (ACE_ENV_SINGLE_ARG_DECL); void handle_destroy (ACE_ENV_SINGLE_ARG_DECL); diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp index f66b90d9e14..2c974ab3de6 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp @@ -15,7 +15,7 @@ ACE_RCSID(RT_Notify, TAO_NS_Periodic_Consumer, "$id$") TAO_NS_Periodic_Consumer::TAO_NS_Periodic_Consumer (void) - :count_ (0), max_count_ (-1), client_ (0), check_priority_ (0) + :count_ (-1), max_count_ (-1), client_ (0), check_priority_ (0) { } @@ -124,40 +124,47 @@ TAO_NS_Periodic_Consumer::push_structured_event (const CosNotification::Structur CORBA::INTERNAL ()); ACE_CHECK; - if (TAO_debug_level > 0) + if (this->count_ == -1) { - ACE_DEBUG ((LM_DEBUG, "(%P, %t)Consumer %s received %d event type (%s,%s) \n", this->name_.c_str (), this->count_, - notification.header.fixed_header.event_type.domain_name.in(), - notification.header.fixed_header.event_type.type_name.in())); - } + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "(%P, %t)Consumer %s received inital (-1)th event \n", this->name_.c_str ())); - if (this->count_ == 0) - { - const CosNotification::PropertySeq& prop_seq = notification.header.variable_header; + const CosNotification::PropertySeq& prop_seq = notification.header.variable_header; - for (CORBA::ULong i = 0; i < prop_seq.length (); ++i) - { - if (ACE_OS::strcmp (prop_seq[i].name.in (), "BaseTime") == 0) + for (CORBA::ULong i = 0; i < prop_seq.length (); ++i) { - TimeBase::TimeT base_time; - ACE_hrtime_t base_time_hrtime; + if (ACE_OS::strcmp (prop_seq[i].name.in (), "BaseTime") == 0) + { + TimeBase::TimeT base_time; + ACE_hrtime_t base_time_hrtime; - prop_seq[i].value >>= base_time; + prop_seq[i].value >>= base_time; - ORBSVCS_Time::TimeT_to_hrtime (base_time_hrtime, base_time); - stats_.base_time (base_time_hrtime); - } // if max_count has not been already specified, get it from the supplier. - else if (this->max_count_ == -1 && ACE_OS::strcmp (prop_seq[i].name.in (), "MaxCount") == 0) - { - prop_seq[i].value >>= this->max_count_; + ORBSVCS_Time::TimeT_to_hrtime (base_time_hrtime, base_time); + stats_.base_time (base_time_hrtime); + } // if max_count has not been already specified, get it from the supplier. + else if (this->max_count_ == -1 && ACE_OS::strcmp (prop_seq[i].name.in (), "MaxCount") == 0) + { + prop_seq[i].value >>= this->max_count_; - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, "(%P, %t) Setting Maxcount = %d\n", this->max_count_)); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "(%P, %t) Setting Maxcount = %d\n", this->max_count_)); + } } + + this->stats_.init (this->max_count_); + + this->count_ = 0; + + return; } - this->stats_.init (this->max_count_); - } + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, "(%P, %t)Consumer %s received %d event type (%s,%s) \n", this->name_.c_str (), this->count_, + notification.header.fixed_header.event_type.domain_name.in(), + notification.header.fixed_header.event_type.type_name.in())); + } if (this->check_priority_) { diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.cpp b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.cpp index 27730da8f56..8d039012dd0 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.cpp @@ -73,6 +73,7 @@ TAO_NS_Periodic_Supplier::init_state (ACE_Arg_Shifter& arg_shifter) else if ((current_arg = arg_shifter.get_the_parameter ("-EventType"))) { this->event_.type ("*", current_arg) ; + zeroth_event.type ("*", current_arg) ; arg_shifter.consume_arg (); } else if (arg_shifter.cur_arg_strncasecmp ("-FilterLongData") == 0) // -FilterLongData name value @@ -206,6 +207,9 @@ TAO_NS_Periodic_Supplier::svc (void) ACE_hrtime_t before, after; + // This event is special. its not counted to make the performance stats. + //TAO_NS_StructuredEvent zeroth_event; + // populate event. // send the base time and max count. TimeBase::TimeT base_time; @@ -214,10 +218,34 @@ TAO_NS_Periodic_Supplier::svc (void) CORBA::Any buffer; buffer <<= base_time; - this->event_.opt_header ("BaseTime", buffer); + zeroth_event.opt_header ("BaseTime", buffer); buffer <<= this->iter_; - this->event_.opt_header ("MaxCount", buffer); + zeroth_event.opt_header ("MaxCount", buffer); + + ACE_DECLARE_NEW_CORBA_ENV; + + ACE_TRY + { + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "(%P, %t) Supplier (%s) sending event 0th event\n")); + + this->send_event (zeroth_event.event () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCH (CORBA::UserException, ue) + { + ACE_PRINT_EXCEPTION (ue, + "Periodic supplier: error sending event. "); + break; + } + ACE_CATCH (CORBA::SystemException, se) + { + ACE_PRINT_EXCEPTION (se, + "Periodic supplier: error sending event. "); + break; + } + ACE_ENDTRY; for (int i = 0; i < iter_ ; ++i) { @@ -231,7 +259,7 @@ TAO_NS_Periodic_Supplier::svc (void) this->event_.payload (buffer); - ACE_TRY_NEW_ENV + ACE_TRY { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "(%P, %t) Supplier (%s) sending event #%d\n", diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.h b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.h index f492038635d..2b3e6b26105 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.h +++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Supplier.h @@ -80,6 +80,8 @@ protected: /// The event to send. TAO_NS_StructuredEvent event_; + TAO_NS_StructuredEvent zeroth_event; + /// The priority of this task. CORBA::Short priority_; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Colocated/colocated.conf b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Colocated/colocated.conf new file mode 100644 index 00000000000..b27ae7553f4 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Colocated/colocated.conf @@ -0,0 +1,88 @@ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +dynamic TAO_NS_Factory Service_Object * TAO_CosNotification:_make_TAO_NS_Default_Factory () "" +dynamic TAO_Notify_Service Service_Object * TAO_RT_Notification:_make_TAO_RT_Notify_Service () "" + +##---- Load the Factories------ + +dynamic TAO_NS_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_NS_RT_Application_Command_Factory () "" +##dynamic TAO_NS_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_NS_Application_Command_Factory () "" +dynamic TAO_NS_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_NS_EventChannel_Command_Factory () "" + +dynamic TAO_NS_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_SupplierAdmin_Command_Factory () "" + +dynamic TAO_NS_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_Periodic_Supplier_Command_Factory () "" + +dynamic TAO_NS_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_NS_ConsumerAdmin_Command_Factory () "" + +dynamic TAO_NS_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_Periodic_Consumer_Command_Factory () "" + +dynamic TAO_NS_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_NS_RT_POA_Command_Factory () "" + +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" + +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory COLOCATED" +static Command_Builder "EventChannel -Set_QoS ec1 -ThreadPoolLanes 4 -Lane 0 1 0 -Lane 1 1 0 -Lane 2 1 0 -Lane 3 1 0" + +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 3 -ThreadPoolLanes 2 -Lane 0 1 0 -Lane 3 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 sa_high -Proxy s_high_proxy -EventType H -Priority 3 -Iter 500 -Load 100 " + +##--------- 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 ca_high -POA poa_1 -Proxy c_high_proxy -MaxCount 500" +static Command_Builder "PeriodicConsumer -Subscription c_high +H" + +### +### Configure Supplier and Consumer for the Medium Priority Path +### +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa_medium ec1 -AND_OP" + +### --- Create Supplier s_medium connected to sa_medium ----- +static Command_Builder "PeriodicSupplier -Create s_medium sa_medium -Proxy s_medium_proxy -EventType M -Priority 2 -Iter 500 -Load 100 " + +##--------- Consumer Admin 1 ------------- +static Command_Builder "ConsumerAdmin -Create ca_medium ec1 -AND_OP" + +##--------- Consumer 1 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_medium ca_medium -POA poa_1 -Proxy c_medium_proxy -MaxCount 500" +static Command_Builder "PeriodicConsumer -Subscription c_medium +M" + + + +### +### Configure Supplier and Consumer for the Low Priority Path +### +### --- Create Supplier Admin 1 ---- +static Command_Builder "SupplierAdmin -Create sa_low ec1 -AND_OP" + +### --- Create Supplier s_low connected to sa_low ----- +static Command_Builder "PeriodicSupplier -Create s_low sa_low -Proxy s_low_proxy -EventType L -Priority 1 -Iter 500 -Load 100" + +##--------- Consumer Admin 1 ------------- +static Command_Builder "ConsumerAdmin -Create ca_low ec1 -AND_OP" + +##--------- Consumer 1 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_low ca_low -POA poa_1 -Proxy c_low_proxy -MaxCount 500" +static Command_Builder "PeriodicConsumer -Subscription c_low +L" + + + +##--------- Run ------------- +static Command_Builder "Application -Run" +static Command_Builder "Application -WaitForEvents" +static Command_Builder "Application -DumpStats" +static Command_Builder "Application -Shutdown"
\ No newline at end of file diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Colocated/colocated.pl b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Colocated/colocated.pl new file mode 100644 index 00000000000..43df227f6b9 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Colocated/colocated.pl @@ -0,0 +1,49 @@ +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"); +$colocated_conf = PerlACE::LocalFile ("colocated.conf"); +$status = 0; + +$Naming = new PerlACE::Process ("../../../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Colocated = new PerlACE::Process ("../../../Driver/Notify_Tests_Driver"); + +$Colocated_Args = "-ORBInitRef NameService=file://$naming_ior -ORBSvcConf $colocated_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; +} + +$Colocated->Arguments ($Colocated_Args); +$args = $Colocated->Arguments (); +print STDERR "Running Colocated with arguments: $args\n"; +$status = $Colocated->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Colocated returned $status\n"; + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + +$Naming->Kill (); +unlink $naming_ior; + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/colocated.conf b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/colocated.conf new file mode 100644 index 00000000000..aa25d56b98e --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/colocated.conf @@ -0,0 +1,48 @@ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +dynamic TAO_NS_Factory Service_Object * TAO_CosNotification:_make_TAO_NS_Default_Factory () "" +dynamic TAO_Notify_Service Service_Object * TAO_RT_Notification:_make_TAO_RT_Notify_Service () "" + +##---- Load the Factories------ + +dynamic TAO_NS_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_NS_RT_Application_Command_Factory () "" +##dynamic TAO_NS_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_NS_Application_Command_Factory () "" +dynamic TAO_NS_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_NS_EventChannel_Command_Factory () "" + +dynamic TAO_NS_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_SupplierAdmin_Command_Factory () "" + +dynamic TAO_NS_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_Periodic_Supplier_Command_Factory () "" + +dynamic TAO_NS_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_NS_ConsumerAdmin_Command_Factory () "" + +dynamic TAO_NS_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_Periodic_Consumer_Command_Factory () "" + +dynamic TAO_NS_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_NS_RT_POA_Command_Factory () "" + +##------- Init the Application Object ---------- +static Command_Builder "Application -Init" + +##------- Create Event Channel --------------- +static Command_Builder "EventChannel -Create ec1 NotifyEventChannelFactory COLOCATED" +static Command_Builder "EventChannel -Set_QoS ec1 -ThreadPoolLanes 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 sa_high ec1 -AND_OP" + +### --- Create Supplier s_high connected to sa_high ----- +static Command_Builder "PeriodicSupplier -Create s_high sa_high -Proxy s_high_proxy -EventType H -Priority 3 -Iter 5000 -Load 100 " + +##----------- Create an RT POA to host local consumer objects----------- +static Command_Builder "POA -Create poa_1 -PriorityModel CLIENT 3 -ThreadPoolLanes 2 -Lane 0 1 0 -Lane 3 1 0" + +##--------- 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 ca_high -POA poa_1 -Proxy c_high_proxy -MaxCount 5000" +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"
\ No newline at end of file diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/colocated.pl b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/colocated.pl new file mode 100644 index 00000000000..346ebfa3aea --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/colocated.pl @@ -0,0 +1,51 @@ +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"); +$colocated_conf = PerlACE::LocalFile ("colocated.conf"); +$status = 0; + +$Naming = new PerlACE::Process ("../../../../../Naming_Service/Naming_Service", + "-o $naming_ior"); + +$Colocated = new PerlACE::Process ("../../../Driver/Notify_Tests_Driver"); + +$Colocated_Args = "-ORBInitRef NameService=file://$naming_ior -ORBSvcConf $colocated_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; +} + +$Colocated->Arguments ($Colocated_Args); +$args = $Colocated->Arguments (); +print STDERR "Running Colocated with arguments: $args\n"; +$status = $Colocated->SpawnWaitKill ($experiment_timeout); + +if ($status != 0) + { + print STDERR "ERROR: Colocated returned $status\n"; + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + +unlink $notify_ior; + +$Naming->Kill (); +unlink $naming_ior; + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/consumer.conf b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/consumer.conf new file mode 100644 index 00000000000..22a49bce910 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/consumer.conf @@ -0,0 +1,39 @@ +## $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_NS_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_NS_RT_Application_Command_Factory () "" +##dynamic TAO_NS_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_NS_Application_Command_Factory () "" +dynamic TAO_NS_ConsumerAdmin_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_NS_ConsumerAdmin_Command_Factory () "" + +dynamic TAO_NS_Periodic_Consumer_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_Periodic_Consumer_Command_Factory () "" + +dynamic TAO_NS_RT_POA_Command_Factory Service_Object* TAO_RT_NotifyTests:_make_TAO_NS_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 -ThreadPoolLanes 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 ca1 -POA poa_1 -Proxy c_low_proxy -MaxCount 500" +static Command_Builder "PeriodicConsumer -Subscription c_low +L" + +##--------- Consumer 2 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_med ca1 -POA poa_1 -Proxy c_med_proxy -MaxCount 500" +static Command_Builder "PeriodicConsumer -Subscription c_med +M" + +##--------- Consumer 3 , connected to CA 1 -------- +static Command_Builder "PeriodicConsumer -Create c_high ca1 -POA poa_1 -Proxy c_high_proxy -MaxCount 500" +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/Priority/Single_Host/notify.conf b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/notify.conf new file mode 100644 index 00000000000..761cbfdf7ea --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/notify.conf @@ -0,0 +1,4 @@ +dynamic TAO_RT_ORB_Loader Service_Object *TAO_RTCORBA:_make_TAO_RT_ORB_Loader () "-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy PROCESS -ORBPriorityMapping continuous" +dynamic TAO_NS_Factory Service_Object * TAO_CosNotification:_make_TAO_NS_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/Priority/Single_Host/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/run_test.pl new file mode 100644 index 00000000000..3bcbd9cc974 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/run_test.pl @@ -0,0 +1,95 @@ +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; +$notify_conf = PerlACE::LocalFile ("notify.conf"); +$notify_ior = PerlACE::LocalFile ("notify.ior"); +$naming_ior = PerlACE::LocalFile ("naming.ior"); +$supplier_ior = PerlACE::LocalFile ("supplier.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"); + +$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"; + +$Consumer = new PerlACE::Process ("../../../Driver/Notify_Tests_Driver"); + +$Consumer_Args = "-ORBInitRef NameService=file://$naming_ior -IORinput file://$supplier_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 $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; +} + +$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; + } + +$Supplier->Kill (); +unlink $supplier_ior; + +$Notification->Kill (); +unlink $notify_ior; + +$Naming->Kill (); +unlink $naming_ior; + +exit $status; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/supplier.conf b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/supplier.conf new file mode 100644 index 00000000000..9e4a9185c62 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Priority/Single_Host/supplier.conf @@ -0,0 +1,48 @@ +## $Id$ +## This file has the following configuration: +## EventChannel ec1 with 1 Thread +## SupplierAdmim sa1 with 1 Thread +## SupplierAdmin sa2 +## +## Supplier s1 has 1 Thread and is connected to sa1 +## Supplier s2 is connected to sa1 +## +## Supplier s3 is connected to sa2 +## + +##---- 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_NS_RT_Application_Command_Factory Service_Object * TAO_RT_NotifyTests:_make_TAO_NS_RT_Application_Command_Factory () "" +##dynamic TAO_NS_Application_Command_Factory Service_Object * TAO_NotifyTests:_make_TAO_NS_Application_Command_Factory () "" +dynamic TAO_NS_EventChannel_Command_Factory Service_Object *TAO_NotifyTests:_make_TAO_NS_EventChannel_Command_Factory () "" +dynamic TAO_NS_SupplierAdmin_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_SupplierAdmin_Command_Factory () "" + +dynamic TAO_NS_Periodic_Supplier_Command_Factory Service_Object* TAO_NotifyTests:_make_TAO_NS_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 -ThreadPoolLanes 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 sa1 -Proxy s_low_proxy -EventType L -Priority 1 -Iter 500 -Load 0 " + +### --- Create Supplier s2 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_med sa1 -Proxy s_med_proxy -EventType M -Priority 2 -Iter 500 -Load 0 " + +### --- Create Supplier s3 connected to sa1 ---- +static Command_Builder "PeriodicSupplier -Create s_high sa1 -Proxy s_high_proxy -EventType H -Priority 3 -Iter 500 -Load 0 " + +##--------- 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" + |