diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Event_Latency')
-rw-r--r-- | TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp | 983 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp | 104 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw | 29 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Event_Latency/Event_Latency.h | 253 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Event_Latency/Makefile | 111 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/Event_Latency/run_test.pl | 31 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/Event_Latency/run_tests.sh | 67 |
7 files changed, 0 insertions, 1578 deletions
diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp deleted file mode 100644 index 5cf5c6138ef..00000000000 --- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp +++ /dev/null @@ -1,983 +0,0 @@ -// $Id$ - -#if defined (ACE_HAS_QUANTIFY) -# include <quantify.h> -#endif /* ACE_HAS_QUANTIFY */ - -#include "ace/Get_Opt.h" -#include "ace/Sched_Params.h" -#include "ace/Profile_Timer.h" - -#include "orbsvcs/Event_Utilities.h" -#include "orbsvcs/Event_Service_Constants.h" -#include "orbsvcs/Scheduler_Factory.h" -#include "orbsvcs/Time_Utilities.h" -#include "orbsvcs/RtecEventChannelAdminC.h" -#include "Event_Latency.h" - -#include "tao/Timeprobe.h" - -ACE_RCSID(Event_Latency, Event_Latency, "$Id$") - -#if defined (ACE_ENABLE_TIMEPROBES) - -static const char *Event_Latency_Timeprobe_Description[] = -{ - "push event to consumer", - "start with new event in Supplier", - "supplier starts pushing event", - "supplier ends pushing event" -}; - -enum -{ - // Timeprobe description table start key - EVENT_LATENCY_PUSH_EVENT_TO_CONSUMER = 20000, - EVENT_LATENCY_START_WITH_NEW_EVENT_IN_SUPPLIER, - EVENT_LATENCY_SUPPLIER_STARTS_PUSHING_EVENT, - EVENT_LATENCY_SUPPLIER_ENDS_PUSHING_EVENT -}; - -// Setup Timeprobes -ACE_TIMEPROBE_EVENT_DESCRIPTIONS (Event_Latency_Timeprobe_Description, - EVENT_LATENCY_PUSH_EVENT_TO_CONSUMER); - -#endif /* ACE_ENABLE_TIMEPROBES */ - -static const char usage [] = "[-? |\n" -" [-c <consumers> [1]]\n" -" [-d directly connect all consumers/suppliers\n" -" [-j to collect jitter statistics]\n" -" [-m <count> of messages to send [10]]\n" -" [-s <suppliers>, [1]]\n" -" [-t <timeout interval>, msec [250]]]"; - -// Configuration parameters. -static u_int consumers = 1; -static u_int suppliers = 1; -static u_int total_messages = 10; -static int measure_jitter = 0; -static u_int timeout_interval = 250; // msec - -static int short_circuit_EC = 0; -static int shutting_down = 0; - -// This is global to allow the Supplier to short circuit the EC -// and talk directly to consumers. For testing only :-) -static Latency_Consumer **consumer; - -// ************************************************************ - -Latency_Consumer::Latency_Consumer (const int measure_jitter) - : measure_jitter_ (measure_jitter), - min_latency_ (INT_MAX), - max_latency_ (INT_MIN), - total_latency_ (0), - total_pushes_ (0), - min_to_ec_ (INT_MAX), - max_to_ec_ (INT_MIN), - sum_to_ec_ (0), - min_in_ec_ (INT_MAX), - max_in_ec_ (INT_MIN), - sum_in_ec_ (0), - min_from_ec_ (INT_MAX), - max_from_ec_ (INT_MIN), - sum_from_ec_ (0) -{ -} - -int -Latency_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec, - const char *my_name) -{ - entry_point (my_name); - TAO_TRY - { - RtecScheduler::Scheduler_ptr server = - ACE_Scheduler_Factory::server (); - - rt_info_ = - server->create (my_name, TAO_TRY_ENV); - - const ACE_hrtime_t wcet_ns = ACE_UINT64_LITERAL (10000000); // 1 ms - RtecScheduler::Time wcet; - ORBSVCS_Time::hrtime_to_TimeT (wcet, wcet_ns); - - server->set (rt_info_, - RtecScheduler::VERY_HIGH_CRITICALITY, - wcet, - wcet, - ORBSVCS_Time::zero, - 0, - RtecScheduler::VERY_LOW_IMPORTANCE, - ORBSVCS_Time::zero, - 1, - RtecScheduler::OPERATION, - TAO_TRY_ENV); - - // Create the event that we're registering for. - ACE_ConsumerQOS_Factory dependencies; - dependencies.start_disjunction_group (); - dependencies.insert_type (ACE_ES_EVENT_NOTIFICATION, rt_info_); - dependencies.insert_type (ACE_ES_EVENT_SHUTDOWN, rt_info_); - - this->channel_admin_ = - RtecEventChannelAdmin::EventChannel::_duplicate (ec); - - // = Connect as a consumer. - this->consumer_admin_ = - channel_admin_->for_consumers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->suppliers_ = - consumer_admin_->obtain_push_supplier (TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventComm::PushConsumer_var objref = - this->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->suppliers_->connect_push_consumer (objref.in (), - dependencies.get_ConsumerQOS (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR, se) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Latency_Consumer::open: " - "subscribe failed.\n"), -1); - } - TAO_CATCHANY - { - ACE_ERROR_RETURN ((LM_ERROR, - "Latency_Consumer::open: " - "unexpected exception.\n"), -1); - } - TAO_ENDTRY; - - return 0; -} - -void -Latency_Consumer::disconnect_push_consumer (CORBA::Environment &) -{ - ACE_DEBUG ((LM_DEBUG, "Consumer received disconnect from channel.\n")); -} - -void -Latency_Consumer::push (const RtecEventComm::EventSet &events, - CORBA::Environment &) -{ - // ACE_DEBUG ((LM_DEBUG, "Latency_Consumer:push - ")); - ACE_TIMEPROBE (EVENT_LATENCY_PUSH_EVENT_TO_CONSUMER); - - if (events.length () == 0) - { - // ACE_DEBUG ((LM_DEBUG, "no events\n")); - return; - } - // ACE_DEBUG ((LM_DEBUG, "%d event(s)\n", events.length ())); - -#if defined (ACE_HAS_QUANTIFY) - // If measuring jitter, just Quantify the supplier-consumer path. - if (measure_jitter_) - { - quantify_stop_recording_data (); - } -#endif /* ACE_HAS_QUANTIFY */ - - for (CORBA::ULong i = 0; i < events.length (); ++i) - { - if (events[i].header.type == ACE_ES_EVENT_SHUTDOWN) - { - ACE_DEBUG ((LM_DEBUG, - "Latency Consumer: received shutdown event\n")); - this->shutdown (); - } - else - { - if (measure_jitter_) - { - ACE_hrtime_t creation; - ORBSVCS_Time::TimeT_to_hrtime (creation, - events[i].header.creation_time); - - ACE_hrtime_t ec_recv; - ORBSVCS_Time::TimeT_to_hrtime (ec_recv, - events[i].header.ec_recv_time); - - ACE_hrtime_t ec_send; - ORBSVCS_Time::TimeT_to_hrtime (ec_send, - events[i].header.ec_send_time); - - const ACE_hrtime_t now = ACE_OS::gethrtime (); - const ACE_hrtime_t elapsed = now - creation; - ACE_Time_Value latency (ACE_static_cast (long, - elapsed / ACE_ONE_SECOND_IN_NSECS), - ACE_static_cast (long, - ACE_CU64_TO_CU32 (elapsed) % ACE_ONE_SECOND_IN_NSECS / 1000)); - - const long to_ec_nsecs = ACE_CU64_TO_CU32 (ec_recv - creation); - ACE_Time_Value to_ec (to_ec_nsecs / ACE_ONE_SECOND_IN_NSECS, - to_ec_nsecs % ACE_ONE_SECOND_IN_NSECS / - 1000); - - ACE_Time_Value in_ec, from_ec; - if (! short_circuit_EC) - { - const ACE_hrtime_t in_ec_nsecs = ec_send - ec_recv; - in_ec = - ACE_Time_Value (ACE_static_cast (long, - in_ec_nsecs / ACE_ONE_SECOND_IN_NSECS), - ACE_static_cast (long, - ACE_CU64_TO_CU32 (in_ec_nsecs) % - ACE_ONE_SECOND_IN_NSECS / 1000)); - - const ACE_hrtime_t from_ec_nsecs = now - ec_send; - from_ec = - ACE_Time_Value (ACE_static_cast (long, - from_ec_nsecs / ACE_ONE_SECOND_IN_NSECS), - ACE_static_cast (long, - ACE_CU64_TO_CU32 (from_ec_nsecs) % - ACE_ONE_SECOND_IN_NSECS / 1000)); - } - - if (! shutting_down) - { - ++total_pushes_; - if (min_latency_ > latency) min_latency_ = latency; - if (max_latency_ < latency) max_latency_ = latency; - total_latency_ += latency; - if (min_to_ec_ > to_ec) min_to_ec_ = to_ec; - if (max_to_ec_ < to_ec) max_to_ec_ = to_ec; - if (! short_circuit_EC) - { - sum_to_ec_ += to_ec; - if (min_in_ec_ > in_ec) min_in_ec_ = in_ec; - if (max_in_ec_ < in_ec) max_in_ec_ = in_ec; - sum_in_ec_ += in_ec; - if (min_from_ec_ > from_ec) min_from_ec_ = from_ec; - if (max_from_ec_ < from_ec) max_from_ec_ = from_ec; - sum_from_ec_ += from_ec; - } - } - } - } - - } -} - -void -Latency_Consumer::shutdown (void) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) %s shutting down.\n", entry_point ())); - - TAO_TRY - { - // Disconnect from the push supplier. - this->suppliers_->disconnect_push_supplier (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - ACE_ERROR ((LM_ERROR, - "(%t) %s Latency_Consumer::shutdown: unexpected exception.\n", - entry_point ())); - } - TAO_ENDTRY; -} - - -void -Latency_Consumer::print_stats () /* const */ -{ - if (measure_jitter_) - { - double lat_min = - (min_latency_.sec () * 1000000.0 + min_latency_.usec ()) / 1000.0; - double lat_max = - (max_latency_.sec () * 1000000.0 + max_latency_.usec ()) / 1000.0; - double lat_avg = - (total_latency_.sec () * 1000000.0 +total_latency_.usec ()) / - total_pushes_ / 1000.0; - ACE_DEBUG ((LM_TRACE, - "%s: Latency in msec (min/max/avg): " - "%5.3f/%5.3f/%5.3f\n", - entry_point (), lat_min, lat_max, lat_avg)); - - if (! short_circuit_EC) - { - double to_ec_min = - (min_to_ec_.sec () * 1000000.0 + min_to_ec_.usec ()) / 1000.0; - double to_ec_max = - (max_to_ec_.sec () * 1000000.0 + max_to_ec_.usec ()) / 1000.0; - double to_ec_avg = - (sum_to_ec_.sec () * 1000000.0 + sum_to_ec_.usec ()) / - total_pushes_ / 1000.0; - ACE_DEBUG ((LM_TRACE, - "%s: From test to EC (min/max/avg): " - "%5.3f/%5.3f/%5.3f\n", - entry_point (), to_ec_min, to_ec_max, to_ec_avg)); - - double in_ec_min = - (min_in_ec_.sec () * 1000000.0 + min_in_ec_.usec ()) / 1000.0; - double in_ec_max = - (max_in_ec_.sec () * 1000000.0 + max_in_ec_.usec ()) / 1000.0; - double in_ec_avg = - (sum_in_ec_.sec () * 1000000.0 + sum_in_ec_.usec ()) / - total_pushes_ / 1000.0; - ACE_DEBUG ((LM_TRACE, - "%s: In the EC (min/max/avg): " - "%5.3f/%5.3f/%5.3f\n", - entry_point (), in_ec_min, in_ec_max, in_ec_avg)); - - double from_ec_min = - (min_from_ec_.sec () * 1000000.0 + min_from_ec_.usec ()) / 1000.0; - double from_ec_max = - (max_from_ec_.sec () * 1000000.0 + max_from_ec_.usec ()) / 1000.0; - double from_ec_avg = - (sum_from_ec_.sec () * 1000000.0 + sum_from_ec_.usec ()) / - total_pushes_ / 1000.0; - ACE_DEBUG ((LM_TRACE, - "%s: From EC to test (min/max/avg): " - "%5.3f/%5.3f/%5.3f\n", - entry_point (), from_ec_min, from_ec_max, from_ec_avg)); - } - } -} - - -// ************************************************************ - -Latency_Supplier::Supplier::Supplier (Latency_Supplier* impl) - : impl_ (impl) -{ -} - -void Latency_Supplier::Supplier::disconnect_push_supplier - (CORBA::Environment &TAO_IN_ENV) -{ - this->impl_->disconnect_push_supplier (TAO_IN_ENV); -} - -Latency_Supplier::Consumer::Consumer (Latency_Supplier* impl) - : impl_ (impl) -{ -} - -void Latency_Supplier::Consumer::disconnect_push_consumer - (CORBA::Environment &TAO_IN_ENV) -{ - this->impl_->disconnect_push_consumer (TAO_IN_ENV); -} - -void Latency_Supplier::Consumer::push - (const RtecEventComm::EventSet &events, - CORBA::Environment &TAO_IN_ENV) -{ - this->impl_->push (events, TAO_IN_ENV); -} - -// ************************************************************ - -Latency_Supplier::Latency_Supplier (const u_int total_messages, - CORBA::Long supplier_id, - const int timestamp) - : total_messages_ (total_messages), - supplier_id_ (supplier_id), - timestamp_ (timestamp), - total_sent_ (0), - master_ (0), - supplier_ (this), - consumer_ (this) -{ -} - -int -Latency_Supplier::open_supplier (RtecEventChannelAdmin::EventChannel_ptr ec, - const char *name, int master) -{ - this->entry_point (name); - master_ = master; - TAO_TRY - { - this->channel_admin_ = - RtecEventChannelAdmin::EventChannel::_duplicate (ec); - - RtecScheduler::Scheduler_ptr server = - ACE_Scheduler_Factory::server (); - - this->rt_info_ = - server->create (name, TAO_TRY_ENV); - - RtecScheduler::Period_t period = timeout_interval * 20000; - - server->set (rt_info_, - RtecScheduler::VERY_HIGH_CRITICALITY, - ORBSVCS_Time::zero, - ORBSVCS_Time::zero, - ORBSVCS_Time::zero, - period, - RtecScheduler::VERY_LOW_IMPORTANCE, - ORBSVCS_Time::zero, - 1, - RtecScheduler::OPERATION, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_SupplierQOS_Factory publications; - publications.insert (supplier_id_, - ACE_ES_EVENT_NOTIFICATION, - rt_info_, 1); - publications.insert (supplier_id_, - ACE_ES_EVENT_SHUTDOWN, - rt_info_, 1); - - // = Connect as a supplier. - this->supplier_admin_ = - channel_admin_->for_suppliers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->consumers_ = - supplier_admin_->obtain_push_consumer (TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventComm::PushSupplier_var objref = - this->supplier_._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - consumers_->connect_push_supplier (objref.in (), - publications.get_SupplierQOS (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Latency_Supplier::open"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -void -Latency_Supplier::disconnect_push_consumer (CORBA::Environment &) -{ - ACE_DEBUG ((LM_DEBUG, - "Supplier-consumer received disconnect from channel.\n")); -} - -void -Latency_Supplier::disconnect_push_supplier (CORBA::Environment &) -{ - ACE_DEBUG ((LM_DEBUG, "Supplier received disconnect from channel.\n")); -} - -int -Latency_Supplier::start_generating_events (void) -{ - const ACE_hrtime_t now = ACE_OS::gethrtime (); - test_start_time_.set (ACE_static_cast (long, now / 1000000000), - ACE_static_cast (long, - ACE_CU64_TO_CU32 (now) % 1000000000 / - 1000)); - - TAO_TRY - { - ACE_Time_Value tv_timeout (0, timeout_interval * 1000); - TimeBase::TimeT timeout; - ORBSVCS_Time::Time_Value_to_TimeT (timeout, tv_timeout); - - ACE_DEBUG ((LM_DEBUG, - "start generating events: " - "timeout = %d " - "interval = %d " - "tv.msec () = %d\n", - ACE_U64_TO_U32 (timeout), - timeout_interval, - tv_timeout.msec ())); - - ACE_ConsumerQOS_Factory dependencies; - dependencies.start_disjunction_group (); - dependencies.insert_time (ACE_ES_EVENT_INTERVAL_TIMEOUT, - timeout, - rt_info_); - if (!master_) - dependencies.insert_type (ACE_ES_EVENT_SHUTDOWN, rt_info_); - - // = Connect as a consumer. - consumer_admin_ = - channel_admin_->for_consumers (TAO_TRY_ENV); - TAO_CHECK_ENV; - suppliers_ = - consumer_admin_->obtain_push_supplier (TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventComm::PushConsumer_var objref = - this->consumer_._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->suppliers_->connect_push_consumer (objref.in (), - dependencies.get_ConsumerQOS (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - ACE_ERROR_RETURN ((LM_ERROR, - "Latency_Supplier::generate_events:" - " unexpected exception.\n"), -1); - } - TAO_ENDTRY; - - return 0; -} - -void -Latency_Supplier::push (const RtecEventComm::EventSet &events, - CORBA::Environment & TAO_IN_ENV) -{ - // ACE_DEBUG ((LM_DEBUG, "Latency_Supplier::push - ")); - ACE_UNUSED_ARG (TAO_IN_ENV); - - if (events.length () == 0) - { - // ACE_DEBUG ((LM_DEBUG, "no events\n")); - return; - } - - // ACE_DEBUG ((LM_DEBUG, "%d event(s)\n", events.length ())); - - for (CORBA::ULong i = 0; i < events.length (); ++i) - { - if (!master_ && events[i].header.type == ACE_ES_EVENT_SHUTDOWN) - { - ACE_DEBUG ((LM_DEBUG, - "Latency Supplier: received shutdown event\n")); - this->shutdown (); - } - else if (events[i].header.type == ACE_ES_EVENT_INTERVAL_TIMEOUT) - { - // Create the event to send. - RtecEventComm::Event event; - event.header.source = this->supplier_id_; - event.header.type = ACE_ES_EVENT_NOTIFICATION; - ++total_sent_; - - if (this->timestamp_) - { - ACE_hrtime_t now = ACE_OS::gethrtime (); - ORBSVCS_Time::hrtime_to_TimeT (event.header.creation_time, - now); - } - - // @@ ACE_TIMEPROBE_RESET; - // @@ ACE_TIMEPROBE (EVENT_LATENCY_START_WITH_NEW_EVENT_IN_SUPPLIER); - - TAO_TRY - { - if (short_circuit_EC) - { - for (u_int cons = 0; cons < consumers; ++cons) - { - // This constructor is fast. - const RtecEventComm::EventSet es (1, 1, &event); - consumer [cons]->push (es, TAO_TRY_ENV); - } - } - else - { -#if defined (ACE_HAS_QUANTIFY) - // If measuring jitter, just Quantify the - // supplier-consumer path. - if (measure_jitter) - { - quantify_start_recording_data (); - } -#endif /* ACE_HAS_QUANTIFY */ - - ACE_TIMEPROBE (EVENT_LATENCY_SUPPLIER_STARTS_PUSHING_EVENT); - - RtecEventComm::EventSet events (1); - events.length (1); - events[0] = event; - consumers_->push (events, TAO_TRY_ENV); - - ACE_TIMEPROBE (EVENT_LATENCY_SUPPLIER_ENDS_PUSHING_EVENT); - } - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - ACE_ERROR ((LM_ERROR, "(%t) %s Latency_Supplier::push:" - " unexpected exception.\n", - entry_point ())); - } - TAO_ENDTRY; - - // Check if we're done. - if (master_ && (total_sent_ >= total_messages_)) - this->shutdown (); - } - else - { - ACE_ERROR ((LM_ERROR, "(%t) %s received unexpected events: ", - entry_point ())); - // ::dump_sequence (events); - return; - } - } -} - -void -Latency_Supplier::shutdown (void) -{ - shutting_down = 1; - -#if defined (ACE_HAS_QUANTIFY) - // Need to stop recording here even if testing for jitter, because - // recording is still probably enabled. - quantify_stop_recording_data (); - if (! measure_jitter) - { - ACE_DEBUG ((LM_DEBUG, "(%t) stopped Quantify recording\n")); - } -#endif /* ACE_HAS_QUANTIFY */ - - const ACE_hrtime_t now = ACE_OS::gethrtime (); - test_stop_time_.set (ACE_static_cast (long, now / ACE_ONE_SECOND_IN_NSECS), - ACE_static_cast (long, ACE_CU64_TO_CU32 (now) % - ACE_ONE_SECOND_IN_NSECS / - 1000)); - - static int total_iterations = 1; - if (--total_iterations > 0) - { - total_sent_ = 0; - return; - } - - TAO_TRY - { - if (master_) - { - // Create the shutdown message. - RtecEventComm::Event event; - event.header.source = this->supplier_id_; - event.header.type = ACE_ES_EVENT_SHUTDOWN; - - // Push the shutdown event. - RtecEventComm::EventSet events (1); - events.length (1); - events[0] = event; - consumers_->push (events, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - // Disconnect from the channel. - consumers_->disconnect_push_consumer (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Disconnect from the push supplier. - suppliers_->disconnect_push_supplier (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (master_) - { - TAO_ORB_Core_instance ()->orb ()->shutdown (); - } - } - TAO_CATCHANY - { - ACE_ERROR ((LM_ERROR, "(%t) %s Latency_Supplier::shutdown:" - " unexpected exception.\n", - entry_point ())); - TAO_TRY_ENV.print_exception ("Latency_Supplier::shutdown"); - } - TAO_ENDTRY; -} - - -void -Latency_Supplier::print_stats () /* const */ -{ - ACE_Time_Value test_elapsed_time (test_stop_time_ - test_start_time_); - const u_int elapsed = test_elapsed_time.sec () * 1000000 + - test_elapsed_time.usec (); // usec - - ACE_DEBUG ((LM_TRACE, - "%s: delivered %u events to %u consumer(s) in %u msec;\n" - " per-event average was %8.3f msec.\n", - entry_point (), - total_sent_, - consumers / suppliers + consumers % suppliers, - elapsed / 1000, - ACE_static_cast (ACE_CAST_CONST double, elapsed) / total_sent_ / - 1000.0)); -} - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -// function get_options -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -static -unsigned int -get_options (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "Oc:djm:s:t:?"); - int opt; - int temp; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) { - case 'c': - if ((temp = ACE_OS::atoi (get_opt.optarg)) > 0) - { - consumers = ACE_static_cast (u_int, temp); - } - else - { - ACE_ERROR_RETURN ((LM_ERROR, - "%s: number of consumers must be > 0", - argv[0]), 1); - } - break; - case 'd': - short_circuit_EC = 1; - break; - case 'j': - measure_jitter = 1; - break; - case 'm': - if ((temp = ACE_OS::atoi (get_opt.optarg)) > 0) - { - total_messages = ACE_static_cast (u_int, temp); - } - else - { - ACE_ERROR_RETURN ((LM_ERROR, - "%s: count must be > 0", - argv[0]), 1); - } - break; - case 's': - if ((temp = ACE_OS::atoi (get_opt.optarg)) > 0) - { - suppliers = ACE_static_cast (u_int, temp); - } - else - { - ACE_ERROR_RETURN ((LM_ERROR, - "%s: number of suppliers must be > 0", - argv[0]), 1); - } - break; - case 't': - if (ACE_OS::atoi (get_opt.optarg) >= 0) - { - timeout_interval = ACE_OS::atoi (get_opt.optarg); - } - else - { - ACE_ERROR_RETURN ((LM_ERROR, - "%s: timeout must be >= 0", - argv[0]), 1); - } - break; - case '?': - ACE_DEBUG ((LM_DEBUG, - "Usage: %s %s\n", - argv[0], usage)); - ACE_OS::exit (0); - break; - default: - ACE_ERROR_RETURN ((LM_ERROR, - "%s: unknown arg, -%c\n" - "Usage: %s %s\n", - argv[0], ACE_static_cast (char, opt), - argv[0], usage), 1); - } - } - - if (argc != get_opt.optind) - { - ACE_ERROR_RETURN ((LM_ERROR, - "%s: too many arguments\n" - "Usage: %s %s\n", - argv[0], argv[0], usage), 1); - } - - return 0; -} - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -// function main -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -int -main (int argc, char *argv []) -{ - if (ACE_OS::sched_params ( - ACE_Sched_Params ( - ACE_SCHED_FIFO, - ACE_Sched_Params::priority_min (ACE_SCHED_FIFO), - ACE_SCOPE_PROCESS)) != 0) - { - if (ACE_OS::last_error () == EPERM) - { - ACE_DEBUG ((LM_MAX, "Latency: user is not superuser, " - "so remain in time-sharing class\n")); - } - else - { - ACE_DEBUG ((LM_ERROR, "%p\n", "Latency")); - } - } - - u_int i; - - TAO_TRY - { - // Initialize ORB. - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "internet", 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; - - 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; - - ACE_Scheduler_Factory::use_config (naming_context.in ()); - - if (get_options (argc, argv)) - ACE_OS::exit (-1); - - // Allocate the timeprobe instance now, so we don't measure - // the cost of doing it later. - ACE_TIMEPROBE_RESET; - - CosNaming::Name channel_name (1); - channel_name.length (1); - channel_name[0].id = CORBA::string_dup ("EventService"); - - CORBA::Object_var ec_obj = - naming_context->resolve (channel_name, TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventChannelAdmin::EventChannel_var ec = - RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Create supplier(s). - Latency_Supplier **supplier; - ACE_NEW_RETURN (supplier, Latency_Supplier *[suppliers], -1); - for (i = 0; i < suppliers; ++i) - { - int supplier_timestamps = (i==0); - ACE_NEW_RETURN (supplier [i], - Latency_Supplier (total_messages, - ACE_static_cast (CORBA::Long, i), - supplier_timestamps), - -1); - char supplier_name [BUFSIZ]; - sprintf (supplier_name, "supplier-%d", i+1); - // Only the first supplier timestamps its messages. - int master = (i==0); - if (supplier [i]->open_supplier (ec.in (), - supplier_name, - master) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Supplier open failed.\n"), -1); - } - - // Create consumers. - ACE_NEW_RETURN (consumer, Latency_Consumer *[consumers], -1); - for (i = 0; i < consumers; ++i) - { - ACE_NEW_RETURN (consumer [i], Latency_Consumer (measure_jitter), -1); - char buf [BUFSIZ]; - sprintf (buf, "consumer-%d", i+1); - - if (consumer [i]->open_consumer (ec.in (), buf) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Someone was feeling introverted.\n"), - -1); - } - -#if defined (ACE_HAS_QUANTIFY) - if (! measure_jitter) - { - ACE_DEBUG ((LM_DEBUG, "(%t) start Quantify recording\n")); - quantify_start_recording_data (); - } -#endif /* ACE_HAS_QUANTIFY */ - - // Tell supplier(s) to generate events. - for (i = 0; i < suppliers; ++i) - { - if (supplier [i]->start_generating_events () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "generate_events failed.\n"), -1); - } - - orb->run (); - - for (i = 0; i < suppliers; ++i) - { - supplier [i]->print_stats (); - delete supplier[i]; - TAO_CHECK_ENV; - } - delete [] supplier; - - for (i = 0; i < consumers; ++i) - { - consumer [i]->print_stats (); - delete consumer [i]; - TAO_CHECK_ENV; - } - delete [] consumer; - - ec->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_TIMEPROBE_PRINT; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_ENDTRY; - - - return 0; -} diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp deleted file mode 100644 index b9ecd48409b..00000000000 --- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp +++ /dev/null @@ -1,104 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Event_Latency" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Event_Latency - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Event_Latency.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Event_Latency.mak" CFG="Event_Latency - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Event_Latency - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "Event_Latency - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Event_Latency - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 orbsvcs.lib TAO.lib aced.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "Event_Latency - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAOd.lib orbsvcsd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Event_Latency - Win32 Release"
-# Name "Event_Latency - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Event_Latency.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Event_Latency.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw deleted file mode 100644 index 3188c9cb9c8..00000000000 --- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Event_Latency"=.\Event_Latency.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h deleted file mode 100644 index 2ef454cc317..00000000000 --- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h +++ /dev/null @@ -1,253 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE Event Service Benchmarks -// -// = FILENAME -// Latency.h -// -// = AUTHOR -// David Levine (levine@cs.wustl.edu) and -// Tim Harrison (harrison@cs.wustl.edu) -// -// = DESCRIPTION -// -// ============================================================================ - -#ifndef EVENT_LATENCY_H -#define EVENT_LATENCY_H - -#include "ace/SString.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "orbsvcs/RtecEventChannelAdminC.h" -#include "orbsvcs/RtecEventCommS.h" - -class Latency_Consumer : public POA_RtecEventComm::PushConsumer -// = TITLE -// Latency Consumer -// -// = DESCRIPTION -// Simple example of a consumer that registers for supplier -// notifications. -{ -public: - Latency_Consumer (const int measure_jitter = 0); - // Construction. The default of not measuring jitter provides - // a "null" push routine, for measuring aggregate timing. - - int open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec, - const char *my_name); - // Uses the name server to obtain a reference to the <supplier_name> - // and registers with channel to receive notifications from the - // supplier. Also registers to receive shutdown messages from the - // supplier. Stores <my_name> for printing out messages. Returns 0 - // on success, -1 on failure. - - virtual void disconnect_push_consumer (CORBA::Environment &); - // The channel is disconnecting. - - void entry_point (const char*); - const char *entry_point () const; - - void print_stats () /* const */; - // Print timing statistics. - -// (not protected to allow short-circuiting) protected: - virtual void push (const RtecEventComm::EventSet &events, - CORBA::Environment &); - // If the <events>[0] is a notification, prints out the data from - // the supplier. If its a shutdown message, the consumer - // disconnects from the channel. - -protected: - void shutdown (void); - // Disconnect from the Event Service. - - // = Event channel adminstration references. - RtecEventChannelAdmin::EventChannel_var channel_admin_; - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_; - RtecEventChannelAdmin::ProxyPushSupplier_var suppliers_; - -private: - RtecScheduler::handle_t rt_info_; - - int measure_jitter_; - - ACE_Time_Value min_latency_; - ACE_Time_Value max_latency_; - ACE_Time_Value total_latency_; - u_long total_pushes_; - // Registers and counters for keeping track of latency statistics. - - ACE_Time_Value min_to_ec_; - ACE_Time_Value max_to_ec_; - ACE_Time_Value sum_to_ec_; - // Statitics on time to get to the EC. - - ACE_Time_Value min_in_ec_; - ACE_Time_Value max_in_ec_; - ACE_Time_Value sum_in_ec_; - // Statitics on time spent in the EC. - - ACE_Time_Value min_from_ec_; - ACE_Time_Value max_from_ec_; - ACE_Time_Value sum_from_ec_; - // Statitics on time spent since the EC put the event on the wire - // and it gets here. - - ACE_CString entry_point_; -}; - -// ************************************************************ - -class Latency_Supplier -// = TITLE -// Latency Supplier -// -// = DESCRIPTION -// Generates event nofications and a shutdown message. -{ -public: - - // - // This class provides IS-A Consumer and Supplier of events. But - // inheritance from two skeleton classes is non-complaint (or at - // least won't work with TAO). We use smaller implementation classes - // that delegate on Latency_Supplier to do the job. - // - class Supplier : public POA_RtecEventComm::PushSupplier { - public: - virtual void disconnect_push_supplier (CORBA::Environment &); - // The channel is disconnecting. - - private: - Supplier (Latency_Supplier* impl); - friend class Latency_Supplier; - - private: - Latency_Supplier* impl_; - }; - - class Consumer : public POA_RtecEventComm::PushConsumer { - public: - virtual void push (const RtecEventComm::EventSet &events, - CORBA::Environment &); - // The channel pushed some events to us. - - virtual void disconnect_push_consumer (CORBA::Environment &); - // The channel is disconnecting. - - private: - Consumer (Latency_Supplier* impl); - friend class Latency_Supplier; - - private: - Latency_Supplier* impl_; - }; - - Latency_Supplier (const u_int total_messages, - CORBA::Long supplier_id, - const int timestamp = 0); - // Construction. Requires the total number of messages to be - // sent. If the timestamp flag is enabled, then events are - // timestamped, e.g., for use in measuring jitter. - - int open_supplier (RtecEventChannelAdmin::EventChannel_ptr event_channel, - const char *name, int master); - // Registers with the name server under the given <name>. Also - // connects to the Event Channel as a supplier of notifications and - // shutdown messages. If <master> != 0, then the supplier will - // destroy the channel upon shutting down. Returns 0 on success, -1 - // on failure. - - void disconnect_push_supplier (CORBA::Environment &); - // The channel is disconnecting. - - void disconnect_push_consumer (CORBA::Environment &); - // The channel is disconnecting. - - void push (const RtecEventComm::EventSet &events, - CORBA::Environment &); - // Takes a timestamp and then pushes event_ to all consumers, either - // directly, or via a channel. - - int start_generating_events (void); - // Called when the supplier should start generating events. - // Registers with the Event Channel to receive timeouts every .25 - // seconds. Will generate some number of events and then send a - // shutdown message. Returns 0 on success, -1 on failure. - - void entry_point (const char *); - const char *entry_point () const; - - void print_stats () /* const */; - // Print timing statistics. - -protected: - - void shutdown (void); - // Disconnect from the Event Service. - - // = Event Channel adminstration references. - RtecEventChannelAdmin::EventChannel_var channel_admin_; - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_; - RtecEventChannelAdmin::ProxyPushConsumer_var consumers_; - RtecEventChannelAdmin::SupplierAdmin_var supplier_admin_; - RtecEventChannelAdmin::ProxyPushSupplier_var suppliers_; - -private: - RtecScheduler::handle_t rt_info_; - - u_int total_messages_; - // How many events to push before ending the test. - - CORBA::Long supplier_id_; - // Our supplier ID. - - int timestamp_; - // Flag indicating whether or not to timestamp outgoing events. - - u_int total_sent_; - // How many events we've pushed. - - ACE_Time_Value test_start_time_; - ACE_Time_Value test_stop_time_; - // Start/stop times, marking the time period when events are - // sent to consumers. - - int master_; - - ACE_CString entry_point_; - - Supplier supplier_; - Consumer consumer_; -}; - -void Latency_Consumer::entry_point(const char* s) -{ - entry_point_ = s; -} - -const char* Latency_Consumer::entry_point (void) const -{ - return entry_point_.fast_rep (); -} - -void Latency_Supplier::entry_point(const char* s) -{ - entry_point_ = s; -} - -const char* Latency_Supplier::entry_point (void) const -{ - return entry_point_.fast_rep (); -} - -#endif /* EVENT_LATENCY_H */ diff --git a/TAO/orbsvcs/tests/Event_Latency/Makefile b/TAO/orbsvcs/tests/Event_Latency/Makefile deleted file mode 100644 index b6a4c705a90..00000000000 --- a/TAO/orbsvcs/tests/Event_Latency/Makefile +++ /dev/null @@ -1,111 +0,0 @@ -# $Id$ - -BIN = Event_Latency - - -EVENT_LATENCY_SRCS= \ - Event_Latency.cpp - -LSRC= \ - $(EVENT_LATENCY_SRCS) \ - -EVENT_LATENCY_OBJS = $(EVENT_LATENCY_SRCS:.cpp=.o) - -LDLIBS= -lorbsvcs -lTAO - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#### Local rules and variables... - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif -TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE -LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) $(TSS_ORB_FLAG) - -# Leave the scheduler output out if this is a config run. -ifeq ($(runtime),1) -EVENT_LATENCY_CONFIG_OBJS=Event_Latency_Scheduler_Runtime.o -endif # runtime - -Event_Latency: $(addprefix $(VDIR),$(EVENT_LATENCY_OBJS) $(EVENT_LATENCY_CONFIG_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/Event_Latency.o .obj/Event_Latency.so .shobj/Event_Latency.o .shobj/Event_Latency.so: Event_Latency.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/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Sched_Params.h \ - $(ACE_ROOT)/ace/Sched_Params.i \ - $(ACE_ROOT)/ace/Profile_Timer.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i \ - $(ACE_ROOT)/ace/Profile_Timer.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.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 \ - Event_Latency.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.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/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)/tao/Timeprobe.h \ - $(ACE_ROOT)/ace/Timeprobe.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/Event_Latency/run_test.pl b/TAO/orbsvcs/tests/Event_Latency/run_test.pl deleted file mode 100755 index 1c0506f887c..00000000000 --- a/TAO/orbsvcs/tests/Event_Latency/run_test.pl +++ /dev/null @@ -1,31 +0,0 @@ -# $Id$ -# -*- perl -*- -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -unshift @INC, '../../../../bin'; -require Process; - -$NS_ior = "NameService.ior"; -$sleeptime = 3; - -$NS = Process::Create ("../../Naming_Service/Naming_Service". - $Process::EXE_EXT." -o $NS_ior "); - -sleep $sleeptime; - -$ES = Process::Create ("../../Event_Service/Event_Service".$Process::EXE_EXT); - -sleep $sleeptime; - -$status = system ($EXEPREFIX."Event_Latency".$Process::EXE_EXT. - " -j -m 100"); - -$NS->Kill (); -$ES->Kill (); - -unlink ($NS_ior); - -# @@ Capture any errors from the server too. -exit $status; diff --git a/TAO/orbsvcs/tests/Event_Latency/run_tests.sh b/TAO/orbsvcs/tests/Event_Latency/run_tests.sh deleted file mode 100755 index 545a634dd1b..00000000000 --- a/TAO/orbsvcs/tests/Event_Latency/run_tests.sh +++ /dev/null @@ -1,67 +0,0 @@ -#! /bin/sh -# $Id$ -# -# Runs Event_Latency test. - -usage="Usage: $0 [-m <messages>] [-s <suppliers>]" -messages=1000 -suppliers=1 - -######## -######## Interpret command arguments. -######## -skip_arg=0 -for arg in "$@"; do - if [ $skip_arg -eq 0 ]; then - case $arg in - -m ) messages=$2 - skip_arg=1 - ;; - -s ) suppliers=$2 - skip_arg=1 - ;; - -* ) echo undefined option: $arg - echo $usage - exit 1 - ;; - * ) echo $usage - exit 1 - ;; - esac - else - skip_arg=0 - fi - shift -done - -whoami=`whoami` - -run () -#### Run the process in the RT class, if root on Solaris. -{ - if [ `uname -s` = 'SunOS' -a "$whoami" = 'root' ]; then - LD_BIND_NOW=1 priocntl -e -c RT -p 0 $@ - else - $@ - fi -} - - -######## -######## Clean up on normal or abnormal termination. -######## -trap '../start_services clean' 0 1 2 3 15 - - -######## -######## Start NameService, etc. -######## -run ../start_services -NameService=`cat /tmp/nameserviceior_levine` -export NameService - - -######## -######## Run the Event_Latency test. -######## -./Event_Latency -j -t 50 -m $messages -s $suppliers -c $suppliers |