diff options
-rw-r--r-- | TAO/ChangeLog-98c | 21 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp | 315 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h | 70 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp | 308 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h | 91 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.cpp | 9 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.h | 34 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp | 352 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h | 68 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp | 357 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h | 92 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp | 515 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h | 112 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/Makefile | 660 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/README | 36 |
15 files changed, 1608 insertions, 1432 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index ee5a92fe40e..e0144180dad 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,24 @@ +Tue Dec 15 10:40:03 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * orbsvcs/tests/EC_Throughput/Makefile: + * orbsvcs/tests/EC_Throughput/ECT_Driver.h: + * orbsvcs/tests/EC_Throughput/ECT_Driver.cpp: + Base class for the test drivers. + + * orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h: + * orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp: + * orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h: + * orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp: + * orbsvcs/tests/EC_Throughput/ECT_Supplier.h: + * orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp: + * orbsvcs/tests/EC_Throughput/ECT_Consumer.h: + * orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp: + Moved the non-collocated test drivers to separate files. + + * orbsvcs/tests/EC_Throughput/ECT_Throughput.h: + * orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp: + This is a collocated version of the Event Channel Throughput + test. Mon Dec 14 20:38:54 1998 Nanbor Wang <nanbor@cs.wustl.edu> * TAO_IDL/be/be_codegen.cpp: diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp index 5af83662d10..09f2d0c7ddb 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp @@ -9,307 +9,11 @@ #include "orbsvcs/Event_Service_Constants.h" #include "orbsvcs/Scheduler_Factory.h" #include "orbsvcs/Time_Utilities.h" -#include "orbsvcs/Sched/Config_Scheduler.h" -#include "orbsvcs/Event/Event_Channel.h" #include "ECT_Consumer.h" ACE_RCSID(EC_Throughput, ECT_Consumer, "$Id$") -int -main (int argc, char *argv []) -{ - Driver driver; - return driver.run (argc, argv); -} - -// **************************************************************** - -Driver::Driver (void) - : n_consumers_ (1), - n_suppliers_ (1), - event_a_ (ACE_ES_EVENT_UNDEFINED), - event_b_ (ACE_ES_EVENT_UNDEFINED + 1), - pid_file_name_ (0), - active_count_ (0) -{ -} - - - -int -Driver::run (int argc, char* argv[]) -{ - TAO_TRY - { - this->orb_ = - CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - this->orb_->resolve_initial_references("RootPOA"); - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->parse_args (argc, argv)) - return 1; - - ACE_DEBUG ((LM_DEBUG, - "Execution parameters:\n" - " consumers = <%d>\n" - " suppliers = <%d>\n" - " supplier Event A = <%d>\n" - " supplier Event B = <%d>\n" - " pid file name = <%s>\n", - - this->n_consumers_, - this->n_suppliers_, - this->event_a_, - this->event_b_, - - this->pid_file_name_?this->pid_file_name_:"nil") ); - - if (this->pid_file_name_ != 0) - { - FILE* pid = ACE_OS::fopen (this->pid_file_name_, "w"); - if (pid != 0) - { - ACE_OS::fprintf (pid, "%d\n", ACE_OS::getpid ()); - ACE_OS::fclose (pid); - } - } - - int min_priority = - ACE_Sched_Params::priority_min (ACE_SCHED_FIFO); - // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. - - if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, - min_priority, - ACE_SCOPE_PROCESS)) != 0) - { - if (ACE_OS::last_error () == EPERM) - ACE_DEBUG ((LM_DEBUG, - "%s: user is not superuser, " - "so remain in time-sharing class\n", argv[0])); - else - ACE_ERROR ((LM_ERROR, - "%s: ACE_OS::sched_params failed\n", argv[0])); - } - - if (ACE_OS::thr_setprio (min_priority) == -1) - { - ACE_ERROR ((LM_ERROR, "(%P|%t) main thr_setprio failed," - "no real-time features\n")); - } - - CORBA::Object_var naming_obj = - this->orb_->resolve_initial_references ("NameService"); - if (CORBA::is_nil (naming_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to get the Naming Service.\n"), - 1); - - CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (ACE_Scheduler_Factory::use_config (naming_context.in ()) == -1) - return -1; - - CosNaming::Name name (1); - name.length (1); - name[0].id = CORBA::string_dup ("EventService"); - - CORBA::Object_var ec_obj = - naming_context->resolve (name, TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventChannelAdmin::EventChannel_var channel; - if (CORBA::is_nil (ec_obj.in ())) - channel = RtecEventChannelAdmin::EventChannel::_nil (); - else - channel = RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - poa_manager->activate (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->connect_consumers (channel.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "connected consumer(s)\n")); - - ACE_DEBUG ((LM_DEBUG, "running the test\n")); - if (this->orb_->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); - ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); - - this->dump_results (); - - this->disconnect_consumers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - channel->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("NON SYS EX"); - } - TAO_ENDTRY; - return 0; -} - -void -Driver::shutdown_consumer (void*, - CORBA::Environment &) -{ - // int ID = - // (ACE_reinterpret_cast(Test_Consumer**,consumer_cookie) - // - this->consumers_); - // - // ACE_DEBUG ((LM_DEBUG, "(%t) events received by consumer %d\n", ID)); - - ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); - this->active_count_--; - if (this->active_count_ <= 0) - this->orb_->shutdown (); -} - -void -Driver::connect_consumers (RtecEventChannelAdmin::EventChannel_ptr channel, - CORBA::Environment &_env) -{ - { - ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); - this->active_count_ = this->n_consumers_; - } - for (int i = 0; i < this->n_consumers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "consumer_%02.2d", i); - - ACE_NEW (this->consumers_[i], - Test_Consumer (this, - this->consumers_ + i, - this->n_suppliers_)); - - this->consumers_[i]->connect (buf, - this->event_a_, - this->event_b_, - channel, - _env); - if (_env.exception () != 0) return; - } -} - -void -Driver::dump_results (void) -{ - for (int i = 0; i < this->n_consumers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "consumer_%02.2d", i); - - this->consumers_[i]->dump_results (buf); - } -} - -void -Driver::disconnect_consumers (CORBA::Environment &_env) -{ - for (int i = 0; i < this->n_consumers_; ++i) - { - this->consumers_[i]->disconnect (_env); - if (_env.exception () != 0) return; - } -} - -int -Driver::parse_args (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "dc:s:h:p:"); - int opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 'c': - this->n_consumers_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 's': - this->n_suppliers_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'h': - { - char* aux; - char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); - - this->event_a_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->event_b_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - } - break; - - case 'p': - this->pid_file_name_ = get_opt.optarg; - break; - - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - "[ORB options] " - "-c <n_consumers> " - "-s <n_suppliers> " - "-h <event_a,event_b> " - "-p <pid file name> " - "\n", - argv[0])); - return -1; - } - } - - if (this->n_suppliers_ <= 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s: number of suppliers (%d) is out of range, " - "reset to default (%d)\n", - argv[0], this->n_suppliers_, - 1)); - this->n_suppliers_ = 1; - } - - if (this->n_consumers_ <= 0) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "%s: number of consumers or " - "suppliers out of range\n", argv[0]), -1); - } - - return 0; -} - -// **************************************************************** - -Test_Consumer::Test_Consumer (Driver *driver, +Test_Consumer::Test_Consumer (ECT_Driver *driver, void *cookie, int n_suppliers) : driver_ (driver), @@ -382,7 +86,18 @@ Test_Consumer::disconnect (CORBA::Environment &_env) this->supplier_proxy_->disconnect_push_supplier (_env); if (_env.exception () != 0) return; - this->supplier_proxy_ = 0; + this->supplier_proxy_ = + RtecEventChannelAdmin::ProxyPushSupplier::_nil (); + + // Deactivate the servant + PortableServer::POA_var poa = + this->_default_POA (_env); + TAO_CHECK_ENV_RETURN_VOID (_env); + PortableServer::ObjectId_var id = + poa->servant_to_id (this, _env); + TAO_CHECK_ENV_RETURN_VOID (_env); + poa->deactivate_object (id.in (), _env); + TAO_CHECK_ENV_RETURN_VOID (_env); } void @@ -438,8 +153,8 @@ Test_Consumer::push (const RtecEventComm::EventSet& events, if (e.data.payload.mb () == 0) { - ACE_DEBUG ((LM_DEBUG, "No data in event[%d]\n", i)); - continue; + // ACE_DEBUG ((LM_DEBUG, "No data in event[%d]\n", i)); + // continue; } if (events[i].header.type == ACE_ES_EVENT_SHUTDOWN) { diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h index 7e9b3537519..f4d0b13d97c 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h @@ -22,7 +22,7 @@ #include "ace/High_Res_Timer.h" #include "orbsvcs/Channel_Clients_T.h" -class Driver; +#include "ECT_Driver.h" class Test_Consumer : public POA_RtecEventComm::PushConsumer { @@ -32,7 +32,8 @@ class Test_Consumer : public POA_RtecEventComm::PushConsumer // // = DESCRIPTION public: - Test_Consumer (Driver* driver, void* cookie, + Test_Consumer (ECT_Driver* driver, + void* cookie, int n_suppliers); void connect (const char* name, @@ -54,7 +55,7 @@ public: // The skeleton methods. private: - Driver* driver_; + ECT_Driver* driver_; // The main driver for the test. void* cookie_; @@ -77,67 +78,4 @@ private: // How many shutdown events we have received. }; -class Driver -{ - // - // = TITLE - // - // = DESCRIPTION - // -public: - Driver (void); - - enum { - MAX_CONSUMERS = 16 - // Maximum number of consumers. - }; - - int run (int argc, char* argv[]); - // Execute the test. - - void shutdown_consumer (void* consumer_cookie, - CORBA::Environment&); - // Callback method for consumers, each consumer will call this - // method once it receives all the shutdown events from the - // suppliers. - -private: - int parse_args (int argc, char* argv[]); - // parse the command line args - - void connect_consumers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); - void disconnect_consumers (CORBA::Environment &_env); - // Connect and disconnect the consumers. - - void dump_results (void); - // Print out the results - -private: - Test_Consumer* consumers_[Driver::MAX_CONSUMERS]; - // The consumer array. - - int n_consumers_; - // The number of consumers. - - int n_suppliers_; - // How many suppliers are sending events, used for shutdown, each - // supplier sends a shutdown message after it finishes, the consumer - // finishes when all the suppliers do. - - int event_a_; - int event_b_; - // We send two types of events, with different contents. - - const char* pid_file_name_; - // The name of a file where the process stores its pid - - CORBA::ORB_var orb_; - // A reference to the ORB, to shut it down properly. - - ACE_SYNCH_MUTEX lock_; - int active_count_; - // How many consumers are still receiving events. -}; - #endif /* ECT_CONSUMER_H */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp new file mode 100644 index 00000000000..d8a3f98bf68 --- /dev/null +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp @@ -0,0 +1,308 @@ +// $Id$ + +#include "ace/Get_Opt.h" +#include "ace/Auto_Ptr.h" +#include "ace/Sched_Params.h" + +#include "tao/Timeprobe.h" +#include "orbsvcs/Event_Utilities.h" +#include "orbsvcs/Event_Service_Constants.h" +#include "orbsvcs/Scheduler_Factory.h" +#include "orbsvcs/Time_Utilities.h" +#include "ECT_Consumer_Driver.h" + +ACE_RCSID(EC_Throughput, ECT_Consumer_Driver, "$Id$") + +int +main (int argc, char *argv []) +{ + ECT_Consumer_Driver driver; + return driver.run (argc, argv); +} + +// **************************************************************** + +ECT_Consumer_Driver::ECT_Consumer_Driver (void) + : n_consumers_ (1), + n_suppliers_ (1), + event_a_ (ACE_ES_EVENT_UNDEFINED), + event_b_ (ACE_ES_EVENT_UNDEFINED + 1), + pid_file_name_ (0), + active_count_ (0) +{ +} + +ECT_Consumer_Driver::~ECT_Consumer_Driver (void) +{ +} + +int +ECT_Consumer_Driver::run (int argc, char* argv[]) +{ + TAO_TRY + { + this->orb_ = + CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV); + TAO_CHECK_ENV; + + CORBA::Object_var poa_object = + this->orb_->resolve_initial_references("RootPOA"); + if (CORBA::is_nil (poa_object.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); + + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + + PortableServer::POAManager_var poa_manager = + root_poa->the_POAManager (TAO_TRY_ENV); + TAO_CHECK_ENV; + + if (this->parse_args (argc, argv)) + return 1; + + ACE_DEBUG ((LM_DEBUG, + "Execution parameters:\n" + " consumers = <%d>\n" + " suppliers = <%d>\n" + " supplier Event A = <%d>\n" + " supplier Event B = <%d>\n" + " pid file name = <%s>\n", + + this->n_consumers_, + this->n_suppliers_, + this->event_a_, + this->event_b_, + + this->pid_file_name_?this->pid_file_name_:"nil") ); + + if (this->pid_file_name_ != 0) + { + FILE* pid = ACE_OS::fopen (this->pid_file_name_, "w"); + if (pid != 0) + { + ACE_OS::fprintf (pid, "%d\n", ACE_OS::getpid ()); + ACE_OS::fclose (pid); + } + } + + int min_priority = + ACE_Sched_Params::priority_min (ACE_SCHED_FIFO); + // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. + + if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, + min_priority, + ACE_SCOPE_PROCESS)) != 0) + { + if (ACE_OS::last_error () == EPERM) + ACE_DEBUG ((LM_DEBUG, + "%s: user is not superuser, " + "so remain in time-sharing class\n", argv[0])); + else + ACE_ERROR ((LM_ERROR, + "%s: ACE_OS::sched_params failed\n", argv[0])); + } + + if (ACE_OS::thr_setprio (min_priority) == -1) + { + ACE_ERROR ((LM_ERROR, "(%P|%t) main thr_setprio failed," + "no real-time features\n")); + } + + CORBA::Object_var naming_obj = + this->orb_->resolve_initial_references ("NameService"); + if (CORBA::is_nil (naming_obj.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to get the Naming Service.\n"), + 1); + + CosNaming::NamingContext_var naming_context = + CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + + if (ACE_Scheduler_Factory::use_config (naming_context.in ()) == -1) + return -1; + + CosNaming::Name name (1); + name.length (1); + name[0].id = CORBA::string_dup ("EventService"); + + CORBA::Object_var ec_obj = + naming_context->resolve (name, TAO_TRY_ENV); + TAO_CHECK_ENV; + + RtecEventChannelAdmin::EventChannel_var channel; + if (CORBA::is_nil (ec_obj.in ())) + channel = RtecEventChannelAdmin::EventChannel::_nil (); + else + channel = RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in (), + TAO_TRY_ENV); + TAO_CHECK_ENV; + + poa_manager->activate (TAO_TRY_ENV); + TAO_CHECK_ENV; + + this->connect_consumers (channel.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + + ACE_DEBUG ((LM_DEBUG, "connected consumer(s)\n")); + + ACE_DEBUG ((LM_DEBUG, "running the test\n")); + if (this->orb_->run () == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); + + this->dump_results (); + + this->disconnect_consumers (TAO_TRY_ENV); + TAO_CHECK_ENV; + + channel->destroy (TAO_TRY_ENV); + TAO_CHECK_ENV; + } + TAO_CATCH (CORBA::SystemException, sys_ex) + { + TAO_TRY_ENV.print_exception ("SYS_EX"); + } + TAO_CATCHANY + { + TAO_TRY_ENV.print_exception ("NON SYS EX"); + } + TAO_ENDTRY; + return 0; +} + +void +ECT_Consumer_Driver::shutdown_consumer (void*, + CORBA::Environment &) +{ + // int ID = + // (ACE_reinterpret_cast(Test_Consumer**,consumer_cookie) + // - this->consumers_); + // + // ACE_DEBUG ((LM_DEBUG, "(%t) events received by consumer %d\n", ID)); + + ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); + this->active_count_--; + if (this->active_count_ <= 0) + this->orb_->shutdown (); +} + +void +ECT_Consumer_Driver::connect_consumers (RtecEventChannelAdmin::EventChannel_ptr channel, + CORBA::Environment &_env) +{ + { + ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); + this->active_count_ = this->n_consumers_; + } + for (int i = 0; i < this->n_consumers_; ++i) + { + char buf[BUFSIZ]; + ACE_OS::sprintf (buf, "consumer_%02.2d", i); + + ACE_NEW (this->consumers_[i], + Test_Consumer (this, + this->consumers_ + i, + this->n_suppliers_)); + + this->consumers_[i]->connect (buf, + this->event_a_, + this->event_b_, + channel, + _env); + if (_env.exception () != 0) return; + } +} + +void +ECT_Consumer_Driver::dump_results (void) +{ + for (int i = 0; i < this->n_consumers_; ++i) + { + char buf[BUFSIZ]; + ACE_OS::sprintf (buf, "consumer_%02.2d", i); + + this->consumers_[i]->dump_results (buf); + } +} + +void +ECT_Consumer_Driver::disconnect_consumers (CORBA::Environment &_env) +{ + for (int i = 0; i < this->n_consumers_; ++i) + { + this->consumers_[i]->disconnect (_env); + if (_env.exception () != 0) return; + } +} + +int +ECT_Consumer_Driver::parse_args (int argc, char *argv []) +{ + ACE_Get_Opt get_opt (argc, argv, "dc:s:h:p:"); + int opt; + + while ((opt = get_opt ()) != EOF) + { + switch (opt) + { + case 'c': + this->n_consumers_ = ACE_OS::atoi (get_opt.optarg); + break; + + case 's': + this->n_suppliers_ = ACE_OS::atoi (get_opt.optarg); + break; + + case 'h': + { + char* aux; + char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); + + this->event_a_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); + arg = ACE_OS::strtok_r (0, ",", &aux); + this->event_b_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); + } + break; + + case 'p': + this->pid_file_name_ = get_opt.optarg; + break; + + case '?': + default: + ACE_DEBUG ((LM_DEBUG, + "Usage: %s " + "[ORB options] " + "-c <n_consumers> " + "-s <n_suppliers> " + "-h <event_a,event_b> " + "-p <pid file name> " + "\n", + argv[0])); + return -1; + } + } + + if (this->n_suppliers_ <= 0) + { + ACE_DEBUG ((LM_DEBUG, + "%s: number of suppliers (%d) is out of range, " + "reset to default (%d)\n", + argv[0], this->n_suppliers_, + 1)); + this->n_suppliers_ = 1; + } + + if (this->n_consumers_ <= 0) + { + ACE_ERROR_RETURN ((LM_DEBUG, + "%s: number of consumers or " + "suppliers out of range\n", argv[0]), -1); + } + + return 0; +} diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h new file mode 100644 index 00000000000..ddd20cee0ae --- /dev/null +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h @@ -0,0 +1,91 @@ +/* -*- C++ -*- */ +// $Id$ +// +// ============================================================================ +// +// = DESCRIPTION +// This test to measure how many events per minute can the EC +// process, it also serves as an example how how to encode complex +// data types in a octet sequence. +// +// ============================================================================ + +#ifndef ECT_CONSUMER_DRIVER_H +#define ECT_CONSUMER_DRIVER_H + +#include "ace/Task.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/High_Res_Timer.h" +#include "orbsvcs/Channel_Clients_T.h" +#include "ECT_Driver.h" +#include "ECT_Consumer.h" + +class ECT_Consumer_Driver : public ECT_Driver +{ + // + // = TITLE + // + // = DESCRIPTION + // +public: + ECT_Consumer_Driver (void); + virtual ~ECT_Consumer_Driver (void); + + enum { + MAX_CONSUMERS = 16 + // Maximum number of consumers. + }; + + int run (int argc, char* argv[]); + // Execute the test. + + virtual void shutdown_consumer (void* consumer_cookie, + CORBA::Environment&); + // Callback method for consumers, each consumer will call this + // method once it receives all the shutdown events from the + // suppliers. + +private: + int parse_args (int argc, char* argv[]); + // parse the command line args + + void connect_consumers (RtecEventChannelAdmin::EventChannel_ptr local_ec, + CORBA::Environment &_env); + void disconnect_consumers (CORBA::Environment &_env); + // Connect and disconnect the consumers. + + void dump_results (void); + // Print out the results + +private: + Test_Consumer* consumers_[ECT_Consumer_Driver::MAX_CONSUMERS]; + // The consumer array. + + int n_consumers_; + // The number of consumers. + + int n_suppliers_; + // How many suppliers are sending events, used for shutdown, each + // supplier sends a shutdown message after it finishes, the consumer + // finishes when all the suppliers do. + + int event_a_; + int event_b_; + // We send two types of events, with different contents. + + const char* pid_file_name_; + // The name of a file where the process stores its pid + + CORBA::ORB_var orb_; + // A reference to the ORB, to shut it down properly. + + ACE_SYNCH_MUTEX lock_; + int active_count_; + // How many consumers are still receiving events. +}; + +#endif /* ECT_CONSUMER_DRIVER_H */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.cpp new file mode 100644 index 00000000000..011ee2fca57 --- /dev/null +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.cpp @@ -0,0 +1,9 @@ +// $Id$ + +#include "ECT_Driver.h" + +ACE_RCSID(EC_Throughput, ECT_Driver, "$Id$") + +ECT_Driver::~ECT_Driver (void) +{ +} diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.h new file mode 100644 index 00000000000..bb918848c17 --- /dev/null +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.h @@ -0,0 +1,34 @@ +/* -*- C++ -*- */ +// $Id$ +// +// ============================================================================ +// +// = DESCRIPTION +// Abstract base class for the test driver, this let us implement a +// collocated and a non-collocated test. +// +// ============================================================================ + +#ifndef ECT_DRIVER_H +#define ECT_DRIVER_H + +#include "tao/corba.h" + +class ECT_Driver +{ + // + // = TITLE + // + // = DESCRIPTION + // +public: + virtual ~ECT_Driver (void); + + virtual void shutdown_consumer (void* consumer_cookie, + CORBA::Environment&) = 0; + // Callback method for consumers, each consumer will call this + // method once it receives all the shutdown events from the + // suppliers. +}; + +#endif /* ECT_CONSUMER_H */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp index 1a9f4fa634c..500f6f679a1 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp @@ -9,350 +9,11 @@ #include "orbsvcs/Event_Service_Constants.h" #include "orbsvcs/Scheduler_Factory.h" #include "orbsvcs/Time_Utilities.h" -#include "orbsvcs/Sched/Config_Scheduler.h" -#include "orbsvcs/Event/Event_Channel.h" #include "ECT_Supplier.h" ACE_RCSID(EC_Throughput, ECT_Supplier, "$Id$") -int -main (int argc, char *argv []) -{ - ECTS_Driver driver; - return driver.run (argc, argv); -} - -// **************************************************************** - -ECTS_Driver::ECTS_Driver (void) - : n_suppliers_ (1), - burst_count_ (10), - burst_size_ (100), - event_size_ (128), - burst_pause_ (100), - event_a_ (ACE_ES_EVENT_UNDEFINED), - event_b_ (ACE_ES_EVENT_UNDEFINED + 1), - pid_file_name_ (0) -{ -} - - - -int -ECTS_Driver::run (int argc, char* argv[]) -{ - TAO_TRY - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA"); - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->parse_args (argc, argv)) - return 1; - - ACE_DEBUG ((LM_DEBUG, - "Execution parameters:\n" - " suppliers = <%d>\n" - " burst count = <%d>\n" - " burst size = <%d>\n" - " event size = <%d>\n" - " burst size = <%d>\n" - " supplier Event A = <%d>\n" - " supplier Event B = <%d>\n" - " pid file name = <%s>\n", - - this->n_suppliers_, - this->burst_count_, - this->burst_size_, - this->event_size_, - this->burst_pause_, - this->event_a_, - this->event_b_, - - this->pid_file_name_?this->pid_file_name_:"nil") ); - - if (this->pid_file_name_ != 0) - { - FILE* pid = ACE_OS::fopen (this->pid_file_name_, "w"); - if (pid != 0) - { - ACE_OS::fprintf (pid, "%d\n", ACE_OS::getpid ()); - ACE_OS::fclose (pid); - } - } - - int min_priority = - ACE_Sched_Params::priority_min (ACE_SCHED_FIFO); - // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. - - if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, - min_priority, - ACE_SCOPE_PROCESS)) != 0) - { - if (ACE_OS::last_error () == EPERM) - ACE_DEBUG ((LM_DEBUG, - "%s: user is not superuser, " - "so remain in time-sharing class\n", argv[0])); - else - ACE_ERROR ((LM_ERROR, - "%s: ACE_OS::sched_params failed\n", argv[0])); - } - - if (ACE_OS::thr_setprio (min_priority) == -1) - { - ACE_ERROR ((LM_ERROR, "(%P|%t) main thr_setprio failed," - "no real-time features\n")); - } - - CORBA::Object_var naming_obj = - orb->resolve_initial_references ("NameService"); - if (CORBA::is_nil (naming_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to get the Naming Service.\n"), - 1); - - CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (ACE_Scheduler_Factory::use_config (naming_context.in ()) == -1) - return -1; - - CosNaming::Name name (1); - name.length (1); - name[0].id = CORBA::string_dup ("EventService"); - - CORBA::Object_var ec_obj = - naming_context->resolve (name, TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventChannelAdmin::EventChannel_var channel; - if (CORBA::is_nil (ec_obj.in ())) - channel = RtecEventChannelAdmin::EventChannel::_nil (); - else - channel = RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - poa_manager->activate (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->connect_suppliers (channel.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "connected supplier(s)\n")); - - this->activate_suppliers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "suppliers are active\n")); - - // Wait for the supplier threads... - if (ACE_Thread_Manager::instance ()->wait () == -1) - { - ACE_ERROR ((LM_ERROR, "Thread_Manager wait failed\n")); - return 1; - } - - ACE_DEBUG ((LM_DEBUG, "suppliers finished\n")); - - this->dump_results (); - - this->disconnect_suppliers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // @@ Deactivate the suppliers (as CORBA Objects?) - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("NON SYS EX"); - } - TAO_ENDTRY; - return 0; -} - -void -ECTS_Driver::connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr channel, - CORBA::Environment &_env) -{ - for (int i = 0; i < this->n_suppliers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "supplier_%02.2d", i); - - ACE_NEW (this->suppliers_[i], Test_Supplier (this)); - - this->suppliers_[i]->connect (buf, - this->burst_count_, - this->burst_size_, - this->event_size_, - this->burst_pause_, - this->event_a_, - this->event_b_, - channel, - _env); - if (_env.exception () != 0) return; - } -} - -void -ECTS_Driver::activate_suppliers (CORBA::Environment &) -{ - for (int i = 0; i < this->n_suppliers_; ++i) - { - this->suppliers_[i]->activate (); - } -} - -void -ECTS_Driver::disconnect_suppliers (CORBA::Environment &_env) -{ - for (int i = 0; i < this->n_suppliers_; ++i) - { - this->suppliers_[i]->disconnect (_env); - if (_env.exception () != 0) return; - } -} - -void -ECTS_Driver::dump_results (void) -{ - for (int i = 0; i < this->n_suppliers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "supplier_%02.2d", i); - - this->suppliers_[i]->dump_results (buf); - } -} - -int -ECTS_Driver::parse_args (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "ds:u:n:t:b:h:p:"); - int opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 's': - this->n_suppliers_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'u': - this->burst_count_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'n': - this->burst_size_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'b': - this->event_size_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 't': - this->burst_pause_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'h': - { - char* aux; - char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); - - this->event_a_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->event_b_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - } - break; - - case 'p': - this->pid_file_name_ = get_opt.optarg; - break; - - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - "[ORB options] " - "-s <nsuppliers> " - "-u <burst count> " - "-n <burst size> " - "-b <event payload size> " - "-T <burst pause (usecs)> " - "-h <eventa,eventb> " - "-p <pid file name> " - "\n", - argv[0])); - return -1; - } - } - - if (this->burst_count_ <= 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s: burst count (%d) is out of range, " - "reset to default (%d)\n", - argv[0], this->burst_count_, - 100)); - this->burst_count_ = 100; - } - - if (this->burst_size_ <= 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s: burst size (%d) is out of range, " - "reset to default (%d)\n", - argv[0], this->burst_size_, - 10)); - this->burst_size_ = 10; - } - - if (this->event_size_ < 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s: event size (%d) is out of range, " - "reseting to default (%d)\n", - argv[0], this->event_size_, - 128)); - this->event_size_ = 128; - } - - if (this->n_suppliers_ <= 0) - { - this->n_suppliers_ = 1; - ACE_ERROR_RETURN ((LM_DEBUG, - "%s: number of suppliers out of range, " - "reset to default (%d)\n", - argv[0], 1), -1); - } - - return 0; -} - -// **************************************************************** - -Test_Supplier::Test_Supplier (ECTS_Driver *driver) +Test_Supplier::Test_Supplier (ECT_Driver *driver) : driver_ (driver), supplier_ (this), burst_count_ (0), @@ -452,6 +113,17 @@ Test_Supplier::disconnect (CORBA::Environment &_env) this->consumer_proxy_ = RtecEventChannelAdmin::ProxyPushConsumer::_nil (); + + // Deactivate the servant + PortableServer::POA_var poa = + this->supplier_._default_POA (_env); + TAO_CHECK_ENV_RETURN_VOID (_env); + PortableServer::ObjectId_var id = + poa->servant_to_id (&this->supplier_, _env); + TAO_CHECK_ENV_RETURN_VOID (_env); + poa->deactivate_object (id.in (), _env); + TAO_CHECK_ENV_RETURN_VOID (_env); + RtecEventChannelAdmin::ProxyPushConsumer::_nil (); } int diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h index 59cbb8fdcdf..67e6355cf66 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h @@ -21,8 +21,7 @@ #include "ace/High_Res_Timer.h" #include "orbsvcs/Channel_Clients_T.h" - -class ECTS_Driver; +#include "ECT_Driver.h" class Test_Supplier : public ACE_Task<ACE_SYNCH> { @@ -31,10 +30,9 @@ class Test_Supplier : public ACE_Task<ACE_SYNCH> // Simplifies the supplier task startup. // // = DESCRIPTION - // Runs the ECTS_Driver::supplier_task() method in another thread. // public: - Test_Supplier (ECTS_Driver *driver); + Test_Supplier (ECT_Driver *driver); int svc (void); // Run the test, just forwards to the driver @@ -67,7 +65,7 @@ public: // Dump the results... private: - ECTS_Driver *driver_; + ECT_Driver *driver_; // Class we forward to. void *cookie_; @@ -95,64 +93,4 @@ private: // The test data. }; -class ECTS_Driver -{ - // - // = TITLE - // - // = DESCRIPTION - // -public: - ECTS_Driver (void); - - enum { - MAX_SUPPLIERS = 16 - // Maximum number of suppliers. - }; - - int run (int argc, char* argv[]); - // Execute the test. - -private: - int parse_args (int argc, char* argv[]); - // parse the command line args - - void connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); - void disconnect_suppliers (CORBA::Environment &_env); - // Connect the suppliers. - - void activate_suppliers (CORBA::Environment &_env); - // Activate the suppliers, i.e. they start generating events. - - void dump_results (void); - // Dump the results for each supplier. - -private: - Test_Supplier* suppliers_[ECTS_Driver::MAX_SUPPLIERS]; - // The suppliers array. - - int n_suppliers_; - // The number of suppliers. - - int burst_count_; - // How many bursts we will send from each supplier. - - int burst_size_; - // The number of events - - int event_size_; - // The size of the payload on each event. - - int burst_pause_; - // The time between each event burst, in microseconds. - - int event_a_; - int event_b_; - // We send two types of events, with different contents. - - const char* pid_file_name_; - // The name of a file where the process stores its pid -}; - #endif /* ECT_SUPPLIER_H */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp new file mode 100644 index 00000000000..4b11cffb690 --- /dev/null +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp @@ -0,0 +1,357 @@ +// $Id$ + +#include "ace/Get_Opt.h" +#include "ace/Auto_Ptr.h" +#include "ace/Sched_Params.h" + +#include "tao/Timeprobe.h" +#include "orbsvcs/Event_Utilities.h" +#include "orbsvcs/Event_Service_Constants.h" +#include "orbsvcs/Scheduler_Factory.h" +#include "orbsvcs/Time_Utilities.h" +#include "ECT_Supplier_Driver.h" + +ACE_RCSID(EC_Throughput, ECT_Supplier_Driver, "$Id$") + +int +main (int argc, char *argv []) +{ + ECT_Supplier_Driver driver; + return driver.run (argc, argv); +} + +// **************************************************************** + +ECT_Supplier_Driver::ECT_Supplier_Driver (void) + : n_suppliers_ (1), + burst_count_ (10), + burst_size_ (100), + event_size_ (128), + burst_pause_ (100), + event_a_ (ACE_ES_EVENT_UNDEFINED), + event_b_ (ACE_ES_EVENT_UNDEFINED + 1), + pid_file_name_ (0) +{ +} + +ECT_Supplier_Driver::~ECT_Supplier_Driver (void) +{ +} + +void +ECT_Supplier_Driver::shutdown_consumer (void*, + CORBA::Environment &) +{ +} + +int +ECT_Supplier_Driver::run (int argc, char* argv[]) +{ + TAO_TRY + { + CORBA::ORB_var orb = + CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV); + TAO_CHECK_ENV; + + CORBA::Object_var poa_object = + orb->resolve_initial_references("RootPOA"); + if (CORBA::is_nil (poa_object.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); + + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + + PortableServer::POAManager_var poa_manager = + root_poa->the_POAManager (TAO_TRY_ENV); + TAO_CHECK_ENV; + + if (this->parse_args (argc, argv)) + return 1; + + ACE_DEBUG ((LM_DEBUG, + "Execution parameters:\n" + " suppliers = <%d>\n" + " burst count = <%d>\n" + " burst size = <%d>\n" + " event size = <%d>\n" + " burst size = <%d>\n" + " supplier Event A = <%d>\n" + " supplier Event B = <%d>\n" + " pid file name = <%s>\n", + + this->n_suppliers_, + this->burst_count_, + this->burst_size_, + this->event_size_, + this->burst_pause_, + this->event_a_, + this->event_b_, + + this->pid_file_name_?this->pid_file_name_:"nil") ); + + if (this->pid_file_name_ != 0) + { + FILE* pid = ACE_OS::fopen (this->pid_file_name_, "w"); + if (pid != 0) + { + ACE_OS::fprintf (pid, "%d\n", ACE_OS::getpid ()); + ACE_OS::fclose (pid); + } + } + + int min_priority = + ACE_Sched_Params::priority_min (ACE_SCHED_FIFO); + // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. + + if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, + min_priority, + ACE_SCOPE_PROCESS)) != 0) + { + if (ACE_OS::last_error () == EPERM) + ACE_DEBUG ((LM_DEBUG, + "%s: user is not superuser, " + "so remain in time-sharing class\n", argv[0])); + else + ACE_ERROR ((LM_ERROR, + "%s: ACE_OS::sched_params failed\n", argv[0])); + } + + if (ACE_OS::thr_setprio (min_priority) == -1) + { + ACE_ERROR ((LM_ERROR, "(%P|%t) main thr_setprio failed," + "no real-time features\n")); + } + + CORBA::Object_var naming_obj = + orb->resolve_initial_references ("NameService"); + if (CORBA::is_nil (naming_obj.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to get the Naming Service.\n"), + 1); + + CosNaming::NamingContext_var naming_context = + CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + + if (ACE_Scheduler_Factory::use_config (naming_context.in ()) == -1) + return -1; + + CosNaming::Name name (1); + name.length (1); + name[0].id = CORBA::string_dup ("EventService"); + + CORBA::Object_var ec_obj = + naming_context->resolve (name, TAO_TRY_ENV); + TAO_CHECK_ENV; + + RtecEventChannelAdmin::EventChannel_var channel; + if (CORBA::is_nil (ec_obj.in ())) + channel = RtecEventChannelAdmin::EventChannel::_nil (); + else + channel = RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in (), + TAO_TRY_ENV); + TAO_CHECK_ENV; + + poa_manager->activate (TAO_TRY_ENV); + TAO_CHECK_ENV; + + this->connect_suppliers (channel.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + + ACE_DEBUG ((LM_DEBUG, "connected supplier(s)\n")); + + this->activate_suppliers (TAO_TRY_ENV); + TAO_CHECK_ENV; + + ACE_DEBUG ((LM_DEBUG, "suppliers are active\n")); + + // Wait for the supplier threads... + if (ACE_Thread_Manager::instance ()->wait () == -1) + { + ACE_ERROR ((LM_ERROR, "Thread_Manager wait failed\n")); + return 1; + } + + ACE_DEBUG ((LM_DEBUG, "suppliers finished\n")); + + this->dump_results (); + + this->disconnect_suppliers (TAO_TRY_ENV); + TAO_CHECK_ENV; + + // @@ Deactivate the suppliers (as CORBA Objects?) + } + TAO_CATCH (CORBA::SystemException, sys_ex) + { + TAO_TRY_ENV.print_exception ("SYS_EX"); + } + TAO_CATCHANY + { + TAO_TRY_ENV.print_exception ("NON SYS EX"); + } + TAO_ENDTRY; + return 0; +} + +void +ECT_Supplier_Driver::connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr channel, + CORBA::Environment &_env) +{ + for (int i = 0; i < this->n_suppliers_; ++i) + { + char buf[BUFSIZ]; + ACE_OS::sprintf (buf, "supplier_%02.2d", i); + + ACE_NEW (this->suppliers_[i], Test_Supplier (this)); + + this->suppliers_[i]->connect (buf, + this->burst_count_, + this->burst_size_, + this->event_size_, + this->burst_pause_, + this->event_a_, + this->event_b_, + channel, + _env); + if (_env.exception () != 0) return; + } +} + +void +ECT_Supplier_Driver::activate_suppliers (CORBA::Environment &) +{ + for (int i = 0; i < this->n_suppliers_; ++i) + { + this->suppliers_[i]->activate (); + } +} + +void +ECT_Supplier_Driver::disconnect_suppliers (CORBA::Environment &_env) +{ + for (int i = 0; i < this->n_suppliers_; ++i) + { + this->suppliers_[i]->disconnect (_env); + if (_env.exception () != 0) return; + } +} + +void +ECT_Supplier_Driver::dump_results (void) +{ + for (int i = 0; i < this->n_suppliers_; ++i) + { + char buf[BUFSIZ]; + ACE_OS::sprintf (buf, "supplier_%02.2d", i); + + this->suppliers_[i]->dump_results (buf); + } +} + +int +ECT_Supplier_Driver::parse_args (int argc, char *argv []) +{ + ACE_Get_Opt get_opt (argc, argv, "ds:u:n:t:b:h:p:"); + int opt; + + while ((opt = get_opt ()) != EOF) + { + switch (opt) + { + case 's': + this->n_suppliers_ = ACE_OS::atoi (get_opt.optarg); + break; + + case 'u': + this->burst_count_ = ACE_OS::atoi (get_opt.optarg); + break; + + case 'n': + this->burst_size_ = ACE_OS::atoi (get_opt.optarg); + break; + + case 'b': + this->event_size_ = ACE_OS::atoi (get_opt.optarg); + break; + + case 't': + this->burst_pause_ = ACE_OS::atoi (get_opt.optarg); + break; + + case 'h': + { + char* aux; + char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); + + this->event_a_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); + arg = ACE_OS::strtok_r (0, ",", &aux); + this->event_b_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); + } + break; + + case 'p': + this->pid_file_name_ = get_opt.optarg; + break; + + case '?': + default: + ACE_DEBUG ((LM_DEBUG, + "Usage: %s " + "[ORB options] " + "-s <nsuppliers> " + "-u <burst count> " + "-n <burst size> " + "-b <event payload size> " + "-T <burst pause (usecs)> " + "-h <eventa,eventb> " + "-p <pid file name> " + "\n", + argv[0])); + return -1; + } + } + + if (this->burst_count_ <= 0) + { + ACE_DEBUG ((LM_DEBUG, + "%s: burst count (%d) is out of range, " + "reset to default (%d)\n", + argv[0], this->burst_count_, + 100)); + this->burst_count_ = 100; + } + + if (this->burst_size_ <= 0) + { + ACE_DEBUG ((LM_DEBUG, + "%s: burst size (%d) is out of range, " + "reset to default (%d)\n", + argv[0], this->burst_size_, + 10)); + this->burst_size_ = 10; + } + + if (this->event_size_ < 0) + { + ACE_DEBUG ((LM_DEBUG, + "%s: event size (%d) is out of range, " + "reseting to default (%d)\n", + argv[0], this->event_size_, + 128)); + this->event_size_ = 128; + } + + if (this->n_suppliers_ <= 0) + { + this->n_suppliers_ = 1; + ACE_ERROR_RETURN ((LM_DEBUG, + "%s: number of suppliers out of range, " + "reset to default (%d)\n", + argv[0], 1), -1); + } + + return 0; +} diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h new file mode 100644 index 00000000000..302be352cdb --- /dev/null +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h @@ -0,0 +1,92 @@ +/* -*- C++ -*- */ +// $Id$ +// +// ============================================================================ +// +// = DESCRIPTION +// This test to measure how many events per minute can the EC +// process, it also serves as an example how how to encode complex +// data types in a octet sequence. +// +// ============================================================================ + +#ifndef ECT_SUPPLIER_DRIVER_H +#define ECT_SUPPLIER_DRIVER_H + +#include "ace/Task.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/High_Res_Timer.h" +#include "orbsvcs/Channel_Clients_T.h" +#include "ECT_Driver.h" +#include "ECT_Supplier.h" + +class ECT_Supplier_Driver : public ECT_Driver +{ + // + // = TITLE + // + // = DESCRIPTION + // +public: + ECT_Supplier_Driver (void); + virtual ~ECT_Supplier_Driver (void); + + virtual void shutdown_consumer (void* consumer_cookie, + CORBA::Environment&); + // Not used.... + + enum { + MAX_SUPPLIERS = 16 + // Maximum number of suppliers. + }; + + int run (int argc, char* argv[]); + // Execute the test. + +private: + int parse_args (int argc, char* argv[]); + // parse the command line args + + void connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, + CORBA::Environment &_env); + void disconnect_suppliers (CORBA::Environment &_env); + // Connect the suppliers. + + void activate_suppliers (CORBA::Environment &_env); + // Activate the suppliers, i.e. they start generating events. + + void dump_results (void); + // Dump the results for each supplier. + +private: + Test_Supplier* suppliers_[ECT_Supplier_Driver::MAX_SUPPLIERS]; + // The suppliers array. + + int n_suppliers_; + // The number of suppliers. + + int burst_count_; + // How many bursts we will send from each supplier. + + int burst_size_; + // The number of events + + int event_size_; + // The size of the payload on each event. + + int burst_pause_; + // The time between each event burst, in microseconds. + + int event_a_; + int event_b_; + // We send two types of events, with different contents. + + const char* pid_file_name_; + // The name of a file where the process stores its pid +}; + +#endif /* ECT_SUPPLIER_DRIVER_H */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp new file mode 100644 index 00000000000..aedcded3837 --- /dev/null +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp @@ -0,0 +1,515 @@ +// $Id$ + +#include "ace/Get_Opt.h" +#include "ace/Auto_Ptr.h" +#include "ace/Sched_Params.h" + +#include "tao/Timeprobe.h" +#include "orbsvcs/Event_Utilities.h" +#include "orbsvcs/Event_Service_Constants.h" +#include "orbsvcs/Scheduler_Factory.h" +#include "orbsvcs/Time_Utilities.h" +#include "orbsvcs/Sched/Config_Scheduler.h" +#include "orbsvcs/Event/Event_Channel.h" +#include "orbsvcs/Event/Module_Factory.h" +#include "ECT_Throughput.h" + +ACE_RCSID(EC_Throughput, ECT_Throughput, "$Id$") + +int +main (int argc, char *argv []) +{ + ECT_Throughput driver; + return driver.run (argc, argv); +} + +// **************************************************************** + +ECT_Throughput::ECT_Throughput (void) + : n_consumers_ (1), + n_suppliers_ (1), + burst_count_ (10), + burst_size_ (100), + event_size_ (128), + burst_pause_ (100), + event_a_ (ACE_ES_EVENT_UNDEFINED), + event_b_ (ACE_ES_EVENT_UNDEFINED + 1), + pid_file_name_ (0), + active_count_ (0), + reactive_ec_ (0) +{ +} + +ECT_Throughput::~ECT_Throughput (void) +{ +} + +int +ECT_Throughput::run (int argc, char* argv[]) +{ + TAO_TRY + { + this->orb_ = + CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV); + TAO_CHECK_ENV; + + CORBA::Object_var poa_object = + this->orb_->resolve_initial_references("RootPOA"); + if (CORBA::is_nil (poa_object.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); + + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + + PortableServer::POAManager_var poa_manager = + root_poa->the_POAManager (TAO_TRY_ENV); + TAO_CHECK_ENV; + + if (this->parse_args (argc, argv)) + return 1; + + ACE_DEBUG ((LM_DEBUG, + "Execution parameters:\n" + " consumers = <%d>\n" + " suppliers = <%d>\n" + " burst count = <%d>\n" + " burst size = <%d>\n" + " event size = <%d>\n" + " burst size = <%d>\n" + " supplier Event A = <%d>\n" + " supplier Event B = <%d>\n" + " pid file name = <%s>\n" + " remote EC = <%d>\n", + + this->n_consumers_, + this->n_suppliers_, + this->burst_count_, + this->burst_size_, + this->event_size_, + this->burst_pause_, + this->event_a_, + this->event_b_, + + this->pid_file_name_?this->pid_file_name_:"nil", + this->reactive_ec_) ); + + if (this->pid_file_name_ != 0) + { + FILE* pid = ACE_OS::fopen (this->pid_file_name_, "w"); + if (pid != 0) + { + ACE_OS::fprintf (pid, "%d\n", ACE_OS::getpid ()); + ACE_OS::fclose (pid); + } + } + + int min_priority = + ACE_Sched_Params::priority_min (ACE_SCHED_FIFO); + // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. + + if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, + min_priority, + ACE_SCOPE_PROCESS)) != 0) + { + if (ACE_OS::last_error () == EPERM) + ACE_DEBUG ((LM_DEBUG, + "%s: user is not superuser, " + "so remain in time-sharing class\n", argv[0])); + else + ACE_ERROR ((LM_ERROR, + "%s: ACE_OS::sched_params failed\n", argv[0])); + } + + if (ACE_OS::thr_setprio (min_priority) == -1) + { + ACE_ERROR ((LM_ERROR, "(%P|%t) main thr_setprio failed," + "no real-time features\n")); + } + + CORBA::Object_var naming_obj = + this->orb_->resolve_initial_references ("NameService"); + if (CORBA::is_nil (naming_obj.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to get the Naming Service.\n"), + 1); + + CosNaming::NamingContext_var naming_context = + CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + + // This is the name we (potentially) register the Scheduling + // Service in the Naming Service. + CosNaming::Name schedule_name (1); + schedule_name.length (1); + schedule_name[0].id = CORBA::string_dup ("ScheduleService"); + + ACE_Config_Scheduler scheduler_impl; + RtecScheduler::Scheduler_var scheduler = + scheduler_impl._this (TAO_TRY_ENV); + TAO_CHECK_ENV; + + CORBA::String_var str = + this->orb_->object_to_string (scheduler.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + ACE_DEBUG ((LM_DEBUG, "The (local) scheduler IOR is <%s>\n", + str.in ())); + + // Register the servant with the Naming Context.... + naming_context->bind (schedule_name, scheduler.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + + ACE_Scheduler_Factory::use_config (naming_context.in ()); + + // We pick the right module factory according to the command + // line options + TAO_Default_Module_Factory default_module_factory; + TAO_Reactive_Module_Factory reactive_module_factory; + + TAO_Module_Factory* module_factory = &default_module_factory; + if (this->reactive_ec_) + module_factory = &reactive_module_factory; + + // Register Event_Service with Naming Service. + ACE_EventChannel ec_impl (1, + ACE_DEFAULT_EVENT_CHANNEL_TYPE, + module_factory); + RtecEventChannelAdmin::EventChannel_var channel = + ec_impl._this (TAO_TRY_ENV); + TAO_CHECK_ENV; + + poa_manager->activate (TAO_TRY_ENV); + TAO_CHECK_ENV; + + this->connect_consumers (channel.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + + ACE_DEBUG ((LM_DEBUG, "connected consumer(s)\n")); + + this->connect_suppliers (channel.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + + ACE_DEBUG ((LM_DEBUG, "connected supplier(s)\n")); + + this->activate_suppliers (TAO_TRY_ENV); + TAO_CHECK_ENV; + + ACE_DEBUG ((LM_DEBUG, "suppliers are active\n")); + + ACE_DEBUG ((LM_DEBUG, "running the event loop\n")); + if (this->orb_->run () == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); + + naming_context->unbind (schedule_name, TAO_TRY_ENV); + TAO_CHECK_ENV; + + // Wait for the supplier threads... + if (ACE_Thread_Manager::instance ()->wait () == -1) + { + ACE_ERROR ((LM_ERROR, "Thread_Manager wait failed\n")); + return 1; + } + + ACE_DEBUG ((LM_DEBUG, "suppliers finished\n")); + + this->dump_results (); + + { + // Deactivate the EC + PortableServer::POA_var poa = + ec_impl._default_POA (TAO_TRY_ENV); + TAO_CHECK_ENV; + PortableServer::ObjectId_var id = + poa->servant_to_id (&ec_impl, TAO_TRY_ENV); + TAO_CHECK_ENV; + poa->deactivate_object (id.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + } + + { + // Deactivate the Scheduler + PortableServer::POA_var poa = + scheduler_impl._default_POA (TAO_TRY_ENV); + TAO_CHECK_ENV; + PortableServer::ObjectId_var id = + poa->servant_to_id (&scheduler_impl, TAO_TRY_ENV); + TAO_CHECK_ENV; + poa->deactivate_object (id.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + } + + this->disconnect_consumers (TAO_TRY_ENV); + TAO_CHECK_ENV; + + this->disconnect_suppliers (TAO_TRY_ENV); + TAO_CHECK_ENV; + + channel->destroy (TAO_TRY_ENV); + TAO_CHECK_ENV; + } + TAO_CATCH (CORBA::Exception, ex) + { + TAO_TRY_ENV.print_exception ("ECT_Throughput::run"); + } + TAO_CATCHANY + { + ACE_ERROR ((LM_ERROR, "non-corba exception raised\n")); + } + TAO_ENDTRY; + return 0; +} + +void +ECT_Throughput::shutdown_consumer (void*, + CORBA::Environment &) +{ + // int ID = + // (ACE_reinterpret_cast(Test_Consumer**,consumer_cookie) + // - this->consumers_); + // + // ACE_DEBUG ((LM_DEBUG, "(%t) events received by consumer %d\n", ID)); + + ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); + this->active_count_--; + if (this->active_count_ <= 0) + this->orb_->shutdown (); +} + +void +ECT_Throughput::connect_consumers (RtecEventChannelAdmin::EventChannel_ptr channel, + CORBA::Environment &_env) +{ + { + ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); + this->active_count_ = this->n_consumers_; + } + for (int i = 0; i < this->n_consumers_; ++i) + { + char buf[BUFSIZ]; + ACE_OS::sprintf (buf, "consumer_%02.2d", i); + + ACE_NEW (this->consumers_[i], + Test_Consumer (this, + this->consumers_ + i, + this->n_suppliers_)); + + this->consumers_[i]->connect (buf, + this->event_a_, + this->event_b_, + channel, + _env); + if (_env.exception () != 0) return; + } +} + +void +ECT_Throughput::connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr channel, + CORBA::Environment &_env) +{ + for (int i = 0; i < this->n_suppliers_; ++i) + { + char buf[BUFSIZ]; + ACE_OS::sprintf (buf, "supplier_%02.2d", i); + + ACE_NEW (this->suppliers_[i], Test_Supplier (this)); + + this->suppliers_[i]->connect (buf, + this->burst_count_, + this->burst_size_, + this->event_size_, + this->burst_pause_, + this->event_a_, + this->event_b_, + channel, + _env); + if (_env.exception () != 0) return; + } +} + +void +ECT_Throughput::activate_suppliers (CORBA::Environment &) +{ + for (int i = 0; i < this->n_suppliers_; ++i) + { + this->suppliers_[i]->activate (); + } +} + +void +ECT_Throughput::disconnect_suppliers (CORBA::Environment &_env) +{ + for (int i = 0; i < this->n_suppliers_; ++i) + { + this->suppliers_[i]->disconnect (_env); + if (_env.exception () != 0) return; + } +} + +void +ECT_Throughput::disconnect_consumers (CORBA::Environment &_env) +{ + for (int i = 0; i < this->n_consumers_; ++i) + { + this->consumers_[i]->disconnect (_env); + TAO_CHECK_ENV_RETURN_VOID (_env); + } +} + +void +ECT_Throughput::dump_results (void) +{ + for (int j = 0; j < this->n_consumers_; ++j) + { + char buf[BUFSIZ]; + ACE_OS::sprintf (buf, "consumer_%02.2d", j); + + this->consumers_[j]->dump_results (buf); + } + for (int i = 0; i < this->n_suppliers_; ++i) + { + char buf[BUFSIZ]; + ACE_OS::sprintf (buf, "supplier_%02.2d", i); + + this->suppliers_[i]->dump_results (buf); + } +} + +int +ECT_Throughput::parse_args (int argc, char *argv []) +{ + ACE_Get_Opt get_opt (argc, argv, "dc:s:u:n:t:b:h:p:r"); + int opt; + + while ((opt = get_opt ()) != EOF) + { + switch (opt) + { + case 'r': + this->reactive_ec_ = 1; + break; + + case 'c': + this->n_consumers_ = ACE_OS::atoi (get_opt.optarg); + break; + + case 's': + this->n_suppliers_ = ACE_OS::atoi (get_opt.optarg); + break; + + case 'u': + this->burst_count_ = ACE_OS::atoi (get_opt.optarg); + break; + + case 'n': + this->burst_size_ = ACE_OS::atoi (get_opt.optarg); + break; + + case 'b': + this->event_size_ = ACE_OS::atoi (get_opt.optarg); + break; + + case 't': + this->burst_pause_ = ACE_OS::atoi (get_opt.optarg); + break; + + case 'h': + { + char* aux; + char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); + + this->event_a_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); + arg = ACE_OS::strtok_r (0, ",", &aux); + this->event_b_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); + } + break; + + case 'p': + this->pid_file_name_ = get_opt.optarg; + break; + + case '?': + default: + ACE_DEBUG ((LM_DEBUG, + "Usage: %s " + "[ORB options] " + "-c <n_consumers> " + "-s <n_suppliers> " + "-u <burst count> " + "-n <burst size> " + "-b <event payload size> " + "-t <burst pause (usecs)> " + "-h <eventa,eventb> " + "-p <pid file name> " + "-r " + "\n", + argv[0])); + return -1; + } + } + + if (this->burst_count_ <= 0) + { + ACE_DEBUG ((LM_DEBUG, + "%s: burst count (%d) is out of range, " + "reset to default (%d)\n", + argv[0], this->burst_count_, + 100)); + this->burst_count_ = 100; + } + + if (this->burst_size_ <= 0) + { + ACE_DEBUG ((LM_DEBUG, + "%s: burst size (%d) is out of range, " + "reset to default (%d)\n", + argv[0], this->burst_size_, + 10)); + this->burst_size_ = 10; + } + + if (this->event_size_ < 0) + { + ACE_DEBUG ((LM_DEBUG, + "%s: event size (%d) is out of range, " + "reseting to default (%d)\n", + argv[0], this->event_size_, + 128)); + this->event_size_ = 128; + } + + if (this->n_consumers_ < 0 + || this->n_consumers_ >= ECT_Throughput::MAX_CONSUMERS) + { + this->n_consumers_ = 1; + ACE_ERROR_RETURN ((LM_DEBUG, + "%s: number of consumers or " + "suppliers out of range, " + "reset to default (%d)\n", + argv[0], 1), -1); + } + + if (this->n_suppliers_ < 0 + || this->n_suppliers_ >= ECT_Throughput::MAX_SUPPLIERS) + { + this->n_suppliers_ = 1; + ACE_ERROR_RETURN ((LM_DEBUG, + "%s: number of suppliers out of range, " + "reset to default (%d)\n", + argv[0], 1), -1); + } + + if (this->n_suppliers_ == 0 && this->n_consumers_ == 0) + { + this->n_suppliers_ = 1; + this->n_consumers_ = 1; + ACE_ERROR_RETURN ((LM_DEBUG, + "%s: no suppliers or consumers, " + "reset to default (%d of each)\n", + argv[0], 1), -1); + } + + return 0; +} diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h new file mode 100644 index 00000000000..3197bfc4e02 --- /dev/null +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h @@ -0,0 +1,112 @@ +/* -*- C++ -*- */ +// $Id$ +// +// ============================================================================ +// +// = DESCRIPTION +// +// ============================================================================ + +#ifndef ECT_THROUGHPUT_H +#define ECT_THROUGHPUT_H + +#include "ECT_Driver.h" +#include "ECT_Consumer.h" +#include "ECT_Supplier.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class ECT_Throughput : public ECT_Driver +{ + // + // = TITLE + // + // = DESCRIPTION + // +public: + ECT_Throughput (void); + + virtual ~ECT_Throughput (void); + + enum { + MAX_CONSUMERS = 16, + // Maximum number of consumers. + MAX_SUPPLIERS = 16 + // Maximum number of suppliers. + }; + + int run (int argc, char* argv[]); + // Execute the test. + + virtual void shutdown_consumer (void* consumer_cookie, + CORBA::Environment&); + // Callback method for consumers, each consumer will call this + // method once it receives all the shutdown events from the + // suppliers. + +private: + int parse_args (int argc, char* argv[]); + // parse the command line args + + void connect_consumers (RtecEventChannelAdmin::EventChannel_ptr local_ec, + CORBA::Environment &_env); + void disconnect_consumers (CORBA::Environment &_env); + // Connect and disconnect the consumers. + + void connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, + CORBA::Environment &_env); + void disconnect_suppliers (CORBA::Environment &_env); + // Connect the suppliers. + + void activate_suppliers (CORBA::Environment &_env); + // Activate the suppliers, i.e. they start generating events. + + void dump_results (void); + // Dump the results for each supplier. + +private: + Test_Consumer* consumers_[ECT_Throughput::MAX_CONSUMERS]; + // The consumer array. + + int n_consumers_; + // The number of consumers. + + Test_Supplier* suppliers_[ECT_Throughput::MAX_SUPPLIERS]; + // The suppliers array. + + int n_suppliers_; + // The number of suppliers. + + int burst_count_; + // How many bursts we will send from each supplier. + + int burst_size_; + // The number of events + + int event_size_; + // The size of the payload on each event. + + int burst_pause_; + // The time between each event burst, in microseconds. + + int event_a_; + int event_b_; + // We send two types of events, with different contents. + + const char* pid_file_name_; + // The name of a file where the process stores its pid + + CORBA::ORB_var orb_; + // A reference to the ORB, to shut it down properly. + + ACE_SYNCH_MUTEX lock_; + int active_count_; + // How many consumers are still receiving events. + + int reactive_ec_; + // If not zero then we use a remote EC. +}; + +#endif /* ECT_TRHOUGHPUT_H */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/Makefile b/TAO/orbsvcs/tests/EC_Throughput/Makefile index c0a96e117eb..38b93541dc7 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/Makefile +++ b/TAO/orbsvcs/tests/EC_Throughput/Makefile @@ -1,6 +1,6 @@ # $Id$ -BIN = ECT_Supplier ECT_Consumer +BIN = ECT_Supplier ECT_Consumer ECT_Throughput LDLIBS= -lorbsvcs -lTAO @@ -11,8 +11,9 @@ endif CPPFLAGS += -I$(TAO_ROOT)/orbsvcs \ -I$(TAO_ROOT) -ECT_Supplier_OBJS=$(addsuffix .o,ECT_Supplier) -ECT_Consumer_OBJS=$(addsuffix .o,ECT_Consumer) +ECT_Supplier_OBJS=$(addsuffix .o,ECT_Supplier ECT_Driver ECT_Supplier_Driver) +ECT_Consumer_OBJS=$(addsuffix .o,ECT_Consumer ECT_Driver ECT_Consumer_Driver) +ECT_Throughput_OBJS=$(addsuffix .o,ECT_Throughput ECT_Driver ECT_Consumer ECT_Supplier) SRC = $(addsuffix .cpp, $(BIN)) @@ -36,6 +37,9 @@ ECT_Supplier: $(addprefix $(VDIR),$(ECT_Supplier_OBJS)) ECT_Consumer: $(addprefix $(VDIR),$(ECT_Consumer_OBJS)) $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) +ECT_Throughput: $(addprefix $(VDIR),$(ECT_Throughput_OBJS)) + $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) + realclean: $(RM) -f $(BIN) @@ -45,654 +49,4 @@ realclean: # DO NOT DELETE THIS LINE -- g++dep uses it. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/ECT_Supplier.o .obj/ECT_Supplier.so .shobj/ECT_Supplier.o .shobj/ECT_Supplier.so: ECT_Supplier.cpp \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Auto_Ptr.h \ - $(ACE_ROOT)/ace/Auto_Ptr.i \ - $(ACE_ROOT)/ace/Auto_Ptr.cpp \ - $(ACE_ROOT)/ace/Sched_Params.h \ - $(ACE_ROOT)/ace/Sched_Params.i \ - $(TAO_ROOT)/tao/Timeprobe.h \ - $(ACE_ROOT)/ace/Timeprobe.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ - $(TAO_ROOT)/tao/corba.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(TAO_ROOT)/tao/Align.h \ - $(TAO_ROOT)/tao/Environment.h \ - $(TAO_ROOT)/tao/Environment.i \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Principal.i \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/varout.i \ - $(TAO_ROOT)/tao/varout.cpp \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/singletons.h \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/DynAnyC.h \ - $(TAO_ROOT)/tao/DynAnyC.i \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Object_Table.h \ - $(TAO_ROOT)/tao/Object_Table.i \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/default_client.h \ - $(TAO_ROOT)/tao/default_client.i \ - $(TAO_ROOT)/tao/default_server.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.i \ - $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ - $(TAO_ROOT)/tao/default_server.i \ - $(TAO_ROOT)/tao/IIOP_Object.h \ - $(TAO_ROOT)/tao/IIOP_Object.i \ - $(TAO_ROOT)/tao/IIOP_ORB.h \ - $(TAO_ROOT)/tao/IIOP_ORB.i \ - $(TAO_ROOT)/tao/IIOP_Interpreter.h \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ - $(TAO_ROOT)/tao/DynAny_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/ReactorTask.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Fast_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor_T.h \ - $(ACE_ROOT)/ace/Select_Reactor_Base.h \ - $(ACE_ROOT)/ace/Token.h \ - $(ACE_ROOT)/ace/Token.i \ - $(ACE_ROOT)/ace/Pipe.h \ - $(ACE_ROOT)/ace/Pipe.i \ - $(ACE_ROOT)/ace/Select_Reactor_Base.i \ - $(ACE_ROOT)/ace/Select_Reactor_T.cpp \ - $(ACE_ROOT)/ace/Timer_Heap.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.cpp \ - $(ACE_ROOT)/ace/Select_Reactor_T.i \ - $(ACE_ROOT)/ace/Select_Reactor.i \ - $(ACE_ROOT)/ace/Timer_List.h \ - $(ACE_ROOT)/ace/Timer_List_T.h \ - $(ACE_ROOT)/ace/Timer_List_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.i \ - ECT_Supplier.h \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.cpp -.obj/ECT_Consumer.o .obj/ECT_Consumer.so .shobj/ECT_Consumer.o .shobj/ECT_Consumer.so: ECT_Consumer.cpp \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Auto_Ptr.h \ - $(ACE_ROOT)/ace/Auto_Ptr.i \ - $(ACE_ROOT)/ace/Auto_Ptr.cpp \ - $(ACE_ROOT)/ace/Sched_Params.h \ - $(ACE_ROOT)/ace/Sched_Params.i \ - $(TAO_ROOT)/tao/Timeprobe.h \ - $(ACE_ROOT)/ace/Timeprobe.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ - $(TAO_ROOT)/tao/corba.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(TAO_ROOT)/tao/Align.h \ - $(TAO_ROOT)/tao/Environment.h \ - $(TAO_ROOT)/tao/Environment.i \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Principal.i \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/varout.i \ - $(TAO_ROOT)/tao/varout.cpp \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/singletons.h \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/DynAnyC.h \ - $(TAO_ROOT)/tao/DynAnyC.i \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Object_Table.h \ - $(TAO_ROOT)/tao/Object_Table.i \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/default_client.h \ - $(TAO_ROOT)/tao/default_client.i \ - $(TAO_ROOT)/tao/default_server.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.i \ - $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ - $(TAO_ROOT)/tao/default_server.i \ - $(TAO_ROOT)/tao/IIOP_Object.h \ - $(TAO_ROOT)/tao/IIOP_Object.i \ - $(TAO_ROOT)/tao/IIOP_ORB.h \ - $(TAO_ROOT)/tao/IIOP_ORB.i \ - $(TAO_ROOT)/tao/IIOP_Interpreter.h \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ - $(TAO_ROOT)/tao/DynAny_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/ReactorTask.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Fast_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor_T.h \ - $(ACE_ROOT)/ace/Select_Reactor_Base.h \ - $(ACE_ROOT)/ace/Token.h \ - $(ACE_ROOT)/ace/Token.i \ - $(ACE_ROOT)/ace/Pipe.h \ - $(ACE_ROOT)/ace/Pipe.i \ - $(ACE_ROOT)/ace/Select_Reactor_Base.i \ - $(ACE_ROOT)/ace/Select_Reactor_T.cpp \ - $(ACE_ROOT)/ace/Timer_Heap.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.cpp \ - $(ACE_ROOT)/ace/Select_Reactor_T.i \ - $(ACE_ROOT)/ace/Select_Reactor.i \ - $(ACE_ROOT)/ace/Timer_List.h \ - $(ACE_ROOT)/ace/Timer_List_T.h \ - $(ACE_ROOT)/ace/Timer_List_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.i \ - ECT_Consumer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.cpp - # IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/EC_Throughput/README b/TAO/orbsvcs/tests/EC_Throughput/README index 36fc629f098..9155815802b 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/README +++ b/TAO/orbsvcs/tests/EC_Throughput/README @@ -1,14 +1,34 @@ # $Id$ - This example tries to stress the Event_Service by sending a -continuos stream of events, the user can control the size of the -events, the rate and the number of events sent. + This test tries to stress the Event_Service by sending events +in bursts, the user can control the size of the events, the size of +the burst, the number of bursts and the time between the bursts, the +number of suppliers and the number of consumers. -To run this test just start the Naming_Service, the Event_Service and then -start + There are two versions of the test, a collocated version and a +version using a remote event channel. -$ ./ECT_Consumer + Both versions require a Naming Service, a usual execution for +the collocated test would be: -and after that +# Each command in a separate shell or window: +$ ../../Naming_Service/Naming_Service +$ ./ECT_Throughput -$ ./ECT_Supplier + and for the non-collocated test: + +# Each command in a separate shell or window: +$ ../../Naming_Service/Naming_Service +$ ../../Event_Service/Event_Service +$ ../../ECT_Consumer +$ ../../ECT_Supplier + + It is important that the consumer knows exactly how many +suppliers are sending events, otherwise it cannot terminate properly, +a typical use would be: + +# Each command in a separate shell or window: +$ ../../Naming_Service/Naming_Service +$ ../../Event_Service/Event_Service +$ ../../ECT_Consumer -s 4 +$ ../../ECT_Supplier -s 4 |