diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:11 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:11 +0000 |
commit | 6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (patch) | |
tree | da50d054f9c761c3f6a5923f6979e93306c56d68 /TAO/orbsvcs/performance-tests/RTEvent | |
parent | 0e555b9150d38e3b3473ba325b56db2642e6352b (diff) | |
download | ATCD-6b846cf03c0bcbd8c276cb0af61a181e5f98eaae.tar.gz |
Repo restructuring
Diffstat (limited to 'TAO/orbsvcs/performance-tests/RTEvent')
195 files changed, 0 insertions, 10116 deletions
diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/Colocated_Roundtrip.mpc b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/Colocated_Roundtrip.mpc deleted file mode 100644 index 18d1be0bb26..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/Colocated_Roundtrip.mpc +++ /dev/null @@ -1,15 +0,0 @@ -// $Id$ -project: orbsvcsexe, rtcorbaevent, strategies, minimum_corba { - after += RTEC_Perf - libs += TAO_RTEC_Perf - - specific (automake) { - includes += $(srcdir)/../lib - } else { - includes += ../lib - } - - Source_Files { - driver.cpp - } -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/Makefile.am b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/Makefile.am deleted file mode 100644 index 252262f26b7..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/Makefile.am +++ /dev/null @@ -1,69 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -ACE_BUILDDIR = $(top_builddir)/.. -ACE_ROOT = $(top_srcdir)/.. -TAO_BUILDDIR = $(top_builddir) -TAO_ROOT = $(top_srcdir) - - -## Makefile.Colocated_Roundtrip.am - -if BUILD_CORBA_MESSAGING -if BUILD_RT_CORBA -if !BUILD_ACE_FOR_TAO -if !BUILD_MINIMUM_CORBA - -noinst_PROGRAMS = driver - -driver_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs \ - -I$(srcdir)/../lib - -driver_SOURCES = \ - driver.cpp - -driver_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/performance-tests/RTEvent/lib/libTAO_RTEC_Perf.la \ - $(TAO_BUILDDIR)/tao/libTAO_Strategies.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTCORBAEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Serv.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ - $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \ - $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTPortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTCORBA.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_PI.la \ - $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_MINIMUM_CORBA -endif !BUILD_ACE_FOR_TAO -endif BUILD_RT_CORBA -endif BUILD_CORBA_MESSAGING - -## Clean up template repositories, etc. -clean-local: - -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* - -rm -f gcctemp.c gcctemp so_locations *.ics - -rm -rf cxx_repository ptrepository ti_files - -rm -rf templateregistry ir.out - -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/compare_histo.cpp b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/compare_histo.cpp deleted file mode 100644 index d8ebf631bdc..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/compare_histo.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file compare_histo.cpp - * - * $Id$ - * - */ - -#include <utility> -#include <iostream> -#include <fstream> -#include <algorithm> -#include <iterator> -#include <map> - -typedef std::map<long,double> Vector; -typedef std::pair<long,double> Element; - -std::ostream & -operator<< (std::ostream &os, - const Vector::value_type &p) -{ - return os << p.first << " " << p.second; -} - - -void -load_file (Vector &vector, - const char *filename) -{ - std::ifstream is (filename); - if (!is) - throw "Cannot open file"; - - while (is && !is.eof ()) - { - long i; double v; - is >> i >> v; - Vector::value_type e (i, v); - vector.insert (e); - } -} - -int -main (int argc, char *argv[]) -{ - Vector X; - load_file (X, argv[1]); - Vector Y; - load_file (Y, argv[2]); - - Vector Z; - for (Vector::iterator i = X.begin (); i != X.end (); ++i) { - for (Vector::iterator j = Y.begin (); j != Y.end (); ++j) { - long ki = (*i).first - (*j).first; - double p = (*i).second * (*j).second; - - Vector::iterator k = Z.find (ki); - if (k == Z.end ()) - Z.insert (Element (ki, p)); - else - Z[ki] += p; - } - } - - for (Vector::iterator i = Z.begin (); i != Z.end (); ++i) - { - std::cout << (*i) << "\n"; - } - - return 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/compare_histo.pl b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/compare_histo.pl deleted file mode 100755 index 09196685fcc..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/compare_histo.pl +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/perl -w -# -# $Id$ -# - -use English; - -sub load_file { - local $filename = shift; - local %R = (); - - open (XF, $filename) - || die "Cannot open $filename\n"; - while (<XF>) { - chomp; - local @f = split(/\s+/, $_); - $R{$f[0]} = $f[1]; - } - close(XF); - - return %R; -} - -sub interpolate { - local %T = @_; - local %R = (); - - local $last_i; - foreach my $i (sort keys %T) { - if (!defined $last_i) { - $last_i = $i; - $R{$i} = $T{$i}; - next; - } - local $si = $last_i + 1; - while ($si < $i) { - $R{$si} = $T{$last_i} + ($si - $last_i) * ($T{$i} - $T{$last_i}) / ($i - $last_i); - $si++; - } - $last_i = $i; - $R{$i} = $T{$i}; - } - return %R; -} - -sub range { - local @values = @_; - local ($min_i, $max_i); - foreach my $i (@values) { - if (!defined $min_i - || $i < $min_i) { - $min_i = $i; - } - if (!defined $max_i - || $i > $max_i) { - $max_i = $i; - } - } - return ($min_i, $max_i); -} - -local %BX = load_file($ARGV[0]); -print STDERR "X loaded\n"; -local %BY = load_file($ARGV[1]); -print STDERR "Y loaded\n"; - -local %X = %BX; interpolate (%BX); -local %Y = %BY; interpolate (%BY); - -local ($min_i, $max_i) = range(keys %X); -local ($min_j, $max_j) = range(keys %Y); - -print STDERR "RANGE[X] = $min_i, $max_i\n"; -print STDERR "RANGE[Y] = $min_j, $max_j\n"; - -local $total = 0; -foreach my $i (($min_i - $max_j)..($max_i - $min_j)) { - local $z = 0; - foreach my $j (-$max_j..-$min_j) { - local $f = 0; - local $g = 0; - if (defined $X{$i - $j}) { - $f = $X{$i - $j}; - } - if (defined $Y{-$j}) { - $g = $Y{-$j}; - } - $z += $f * $g; - } - print $i, " ", $z, "\n"; - $total += $z; -} - -print STDERR "TOTAL = $total\n"; diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/driver.cpp b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/driver.cpp deleted file mode 100644 index 280e7ba2efa..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/driver.cpp +++ /dev/null @@ -1,248 +0,0 @@ -// $Id$ - -#include "RT_Class.h" -#include "ORB_Holder.h" -#include "Servant_var.h" -#include "RIR_Narrow.h" -#include "RTEC_Initializer.h" -#include "RTServer_Setup.h" -#include "Low_Priority_Setup.h" -#include "EC_Destroyer.h" -#include "Auto_Disconnect.h" -#include "ORB_Task.h" -#include "ORB_Task_Activator.h" -#include "Client_Group.h" -#include "Client_Options.h" - -#include "orbsvcs/Event_Service_Constants.h" - -#include "orbsvcs/Event/EC_Event_Channel.h" -#include "orbsvcs/Event/EC_Default_Factory.h" - -#include "tao/PortableServer/PortableServer.h" -#include "tao/RTPortableServer/RTPortableServer.h" -#include "tao/Strategies/advanced_resource.h" -#include "tao/Messaging/Messaging.h" -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" -#include "ace/High_Res_Timer.h" -#include "ace/Sample_History.h" -#include "ace/Basic_Stats.h" -#include "ace/Barrier.h" - -ACE_RCSID(TAO_PERF_RTEC_Colocated_Roundtrip, driver, "$Id$") - -int main (int argc, char *argv[]) -{ - const CORBA::Long experiment_id = 1; - - TAO_EC_Default_Factory::init_svcs (); - - /// Move the test to the real-time class if it is possible. - RT_Class rt_class; - - ACE_TRY_NEW_ENV - { - ORB_Holder orb (argc, argv, "" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Client_Options options (argc, argv); - if (argc != 1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Usage: %s " - "-i iterations (iterations) " - "-h high_priority_period (usecs) " - "-l low_priority_period (usecs) " - "-w high_priority_workload (usecs) " - "-v low_priority_workload (usecs) " - "-r (enable RT-CORBA) " - "-n nthreads (low priority thread) " - "-d (dump history) " - "-z (disable low priority) " - "\n", - argv [0]), - 1); - } - - RTServer_Setup rtserver_setup (options.use_rt_corba, - orb, - rt_class, - 1 // options.nthreads - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var root_poa = - RIR_Narrow<PortableServer::POA>::resolve (orb, - "RootPOA" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var ec_poa (rtserver_setup.poa ()); - - ACE_Thread_Manager my_thread_manager; - - ORB_Task orb_task (orb); - orb_task.thr_mgr (&my_thread_manager); - ORB_Task_Activator orb_task_activator (rt_class.priority_high (), - rt_class.thr_sched_class (), - 1, - &orb_task); - - ACE_DEBUG ((LM_DEBUG, "Finished ORB and POA configuration\n")); - - Servant_var<TAO_EC_Event_Channel> ec_impl ( - RTEC_Initializer::create (ec_poa.in (), - ec_poa.in (), - rtserver_setup.rtcorba_setup () - ACE_ENV_ARG_PARAMETER) - ); - ACE_TRY_CHECK; - - ec_impl->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::ObjectId_var ec_id = - ec_poa->activate_object (ec_impl.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - CORBA::Object_var ec_object = - ec_poa->id_to_reference (ec_id.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - RtecEventChannelAdmin::EventChannel_var ec = - RtecEventChannelAdmin::EventChannel::_narrow (ec_object.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - EC_Destroyer ec_destroyer (ec.in ()); - - ACE_DEBUG ((LM_DEBUG, "Finished EC configuration and activation\n")); - - int thread_count = 1 + options.nthreads; - - ACE_Barrier the_barrier (thread_count); - - ACE_DEBUG ((LM_DEBUG, "Calibrating high res timer ....")); - ACE_High_Res_Timer::calibrate (); - - ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); - ACE_DEBUG ((LM_DEBUG, "Done (%d)\n", gsf)); - - CORBA::Long event_range = 1; - if (options.funky_supplier_publication) - { - if (options.unique_low_priority_event) - event_range = 1 + options.low_priority_consumers; - else - event_range = 2; - } - - Client_Group high_priority_group; - high_priority_group.init (experiment_id, - ACE_ES_EVENT_UNDEFINED, - event_range, - options.iterations, - options.high_priority_workload, - gsf, - ec_poa.in (), - ec_poa.in ()); - - Auto_Disconnect<Client_Group> high_priority_disconnect; - - if (!options.high_priority_is_last) - { - high_priority_group.connect (ec.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - high_priority_disconnect = &high_priority_group; - } - - int per_thread_period = options.low_priority_period; - if (options.global_low_priority_rate) - per_thread_period = options.low_priority_period * options.nthreads; - - Low_Priority_Setup<Client_Group> low_priority_setup ( - options.low_priority_consumers, - 0, // no limit on the number of iterations - options.unique_low_priority_event, - experiment_id, - ACE_ES_EVENT_UNDEFINED + 2, - options.low_priority_workload, - gsf, - options.nthreads, - rt_class.priority_low (), - rt_class.thr_sched_class (), - per_thread_period, - ec_poa.in (), - ec_poa.in (), - ec.in (), - &the_barrier - ACE_ENV_ARG_PARAMETER); - - if (options.high_priority_is_last) - { - high_priority_group.connect (ec.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - high_priority_disconnect = &high_priority_group; - } - Send_Task high_priority_task; - high_priority_task.init (options.iterations, - options.high_priority_period, - 0, - ACE_ES_EVENT_UNDEFINED, - experiment_id, - high_priority_group.supplier (), - &the_barrier); - high_priority_task.thr_mgr (&my_thread_manager); - { - // Artificial scope to wait for the high priority task... - Task_Activator<Send_Task> high_priority_act (rt_class.priority_high (), - rt_class.thr_sched_class (), - 1, - &high_priority_task); - } - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - high priority task completed\n")); - - low_priority_setup.stop_all_threads (); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - low priority task(s) stopped\n")); - - ACE_Sample_History &history = - high_priority_group.consumer ()->sample_history (); - if (options.dump_history) - { - history.dump_samples ("HISTORY", gsf); - } - - ACE_Basic_Stats high_priority_stats; - history.collect_basic_stats (high_priority_stats); - high_priority_stats.dump_results ("High Priority", gsf); - - ACE_Basic_Stats low_priority_stats; - low_priority_setup.collect_basic_stats (low_priority_stats); - low_priority_stats.dump_results ("Low Priority", gsf); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - starting cleanup\n")); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_reactive.conf b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_reactive.conf deleted file mode 100644 index 8cd51345cc5..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_reactive.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECSupplierFilter null -ECDispatching reactive" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_reactive.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_reactive.conf.xml deleted file mode 100644 index c696f84f7c1..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_reactive.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_reactive.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECSupplierFilter null -ECDispatching reactive"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_rtcorba.conf b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_rtcorba.conf deleted file mode 100644 index d98222a2a0a..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_rtcorba.conf +++ /dev/null @@ -1,3 +0,0 @@ -# $Id$ -static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBPriorityMapping continuous" -static EC_Factory "-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECSupplierFilter null -ECDispatching reactive" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_rtcorba.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_rtcorba.conf.xml deleted file mode 100644 index e50b5ee76a0..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_rtcorba.conf.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_rtcorba.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="RT_ORB_Loader" params="-ORBSchedPolicy SCHED_FIFO -ORBPriorityMapping continuous"/> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECSupplierFilter null -ECDispatching reactive"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_threaded.conf b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_threaded.conf deleted file mode 100644 index 502bc5cdb1e..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_threaded.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECSupplierFilter null -ECDispatching mt -ECDispatchingThreads 2" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_threaded.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_threaded.conf.xml deleted file mode 100644 index 3af46f8016d..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_threaded.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.dispatching_threaded.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECSupplierFilter null -ECDispatching mt -ECDispatchingThreads 2"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.filter_null.conf b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.filter_null.conf deleted file mode 100644 index 8cd51345cc5..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.filter_null.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECSupplierFilter null -ECDispatching reactive" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.filter_null.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.filter_null.conf.xml deleted file mode 100644 index 556a11f3e02..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.filter_null.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.filter_null.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECSupplierFilter null -ECDispatching reactive"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.filter_per_supplier.conf b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.filter_per_supplier.conf deleted file mode 100644 index 712b90b6074..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.filter_per_supplier.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECSupplierFilter per-supplier -ECDispatching reactive" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.filter_per_supplier.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.filter_per_supplier.conf.xml deleted file mode 100644 index bc2303a1caf..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.filter_per_supplier.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.filter_per_supplier.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECSupplierFilter per-supplier -ECDispatching reactive"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_copy_on_read.conf b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_copy_on_read.conf deleted file mode 100644 index 49c7ad0b504..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_copy_on_read.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:copy_on_read:list -ECProxyPushSupplierCollection mt:copy_on_read:list -ECSupplierFilter null" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_copy_on_read.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_copy_on_read.conf.xml deleted file mode 100644 index aad39607a11..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_copy_on_read.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_copy_on_read.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:copy_on_read:list -ECProxyPushSupplierCollection mt:copy_on_read:list -ECSupplierFilter null"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_copy_on_write.conf b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_copy_on_write.conf deleted file mode 100644 index 691efd9c506..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_copy_on_write.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECSupplierFilter null" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_copy_on_write.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_copy_on_write.conf.xml deleted file mode 100644 index ddb4ff44a7c..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_copy_on_write.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_copy_on_write.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECSupplierFilter null"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_delayed.conf b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_delayed.conf deleted file mode 100644 index f49ae54a94a..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_delayed.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:delayed:list -ECProxyPushSupplierCollection mt:delayed:list -ECSupplierFilter null" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_delayed.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_delayed.conf.xml deleted file mode 100644 index a7abef8d899..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_delayed.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_delayed.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:delayed:list -ECProxyPushSupplierCollection mt:delayed:list -ECSupplierFilter null"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_immediate.conf b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_immediate.conf deleted file mode 100644 index 50aa86ff59a..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_immediate.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:immediate:list -ECProxyPushSupplierCollection mt:immediate:list -ECSupplierFilter null" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_immediate.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_immediate.conf.xml deleted file mode 100644 index ebe10379b5b..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_immediate.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/ec.locking_immediate.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:immediate:list -ECProxyPushSupplierCollection mt:immediate:list -ECSupplierFilter null"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_acc.sh b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_acc.sh deleted file mode 100644 index 52fd2b14d3b..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_acc.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -. parameters - -for t in $TYPES; do - for i in $t.*.dat; do - b=`basename $i .dat` - awk 'BEGIN { - s = 0; - } - { - s += $2; - print $1, s - }' $i > $b.acc.dat; - echo $i - done -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_cmp.sh b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_cmp.sh deleted file mode 100755 index f45666db5a0..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_cmp.sh +++ /dev/null @@ -1,10 +0,0 @@ -#/bin/sh - -for i in $TYPES; do - echo $i ; - for j in 99 999 9999; do - paste $i.avg.dat ${i}.${j}.dat | - awk '{print $1, $4 / $2}' > $i.${j}.cmp.dat - done -done - diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_compared_histo.sh b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_compared_histo.sh deleted file mode 100644 index 8f6a821b27d..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_compared_histo.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# -# - -. parameters - -for j in copy_on_write copy_on_read delayed; -do - for i in $NCONSUMERS; - do - ./compare_histo.pl ec_locking.$j.$i.16.histo.dat ec_locking.$j.32.16.histo.dat >$j.$i.dat; - done; -done - diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_gnuplot.pl b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_gnuplot.pl deleted file mode 100755 index f39e43497d6..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_gnuplot.pl +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/perl -w -# -# $Id$ -# - -foreach $t (@ARGV) { - print "plot '", $t, "_delta.32.histo.dat'\n"; - foreach $i (2..16) { - print "replot '", $t, "_delta.", 32*$i, ".histo.dat'\n"; - } -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_histo.sh b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_histo.sh deleted file mode 100755 index 68a239db84a..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_histo.sh +++ /dev/null @@ -1,10 +0,0 @@ -#/bin/sh - -. parameters - -for i in *.txt; do - b=`basename $i .txt` - echo $i - awk '/^HISTO/ {print $3}' $i | sort -n | uniq -c | - awk -v N=$ITERATIONS '{print $2, $1 / N}' > $b.histo.dat -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_percentiles.sh b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_percentiles.sh deleted file mode 100755 index 1ee71321146..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_percentiles.sh +++ /dev/null @@ -1,47 +0,0 @@ -#/bin/sh - -. parameters - -PERCENTILES="0 .25 .50 .75 .99 .999 .9999 1" - -for t in $*; do - cat /dev/null > ${t}.avg.dat - for p in $PERCENTILES; do - cat /dev/null > ${t}$p.percentile.dat - done - - for c in $NCONSUMERS; do - echo $t $c - INPUT=${t}.${c}.16.txt - awk -v c=$c '/^HISTO/ { - n++; - s += $3 - } - END { - printf("%d %f\n", c, s/n); - }' $INPUT >> ${t}.avg.dat - - TFILE=/tmp/${t}.$$ - awk '/^HISTO/ {print $3}' $INPUT | sort -n | uniq -c > $TFILE - for p in $PERCENTILES; do - awk -v N=$ITERATIONS '{print $2, $1 / N}' $TFILE | - awk -v c=$c -v p=${p} '\ -BEGIN { x = 0; l = 0; } -{ s += $2; - l = $1; - if (x == 0 && s >= p) { - x = $1; - } -} -END { - if (s < p) { - x = l; - } - printf("%d %f\n", c, x); -}' >> ${t}${p}.percentile.dat - done - /bin/rm -f $TFILE - - done - -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_stat.sh b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_stat.sh deleted file mode 100755 index f0fc96aed6c..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/generate_stat.sh +++ /dev/null @@ -1,42 +0,0 @@ -#/bin/sh - -for i in $*; do - echo $i - cat $i | - awk 'BEGIN { - s1 = 0; - s2 = 0; - s3 = 0; - s4 = 0; - n = 0; - } - { - x = $1; - p = $2; - v = p * x; - s1 += v; - v *= x; - s2 += v; - v *= x; - s3 += v; - v *= x; - s4 += v; - } - END { - up0 = 1; - up1 = s1; - up2 = s2; - up3 = s3; - up4 = s4; - u1 = 0; - u2 = up2 - up1 * up1; - u3 = 2 * up1 * up1 * up1 - 3 * up1 * up2 + up3; - u4 = -3 * up1 * up1 * up1 * up1 + 6 * up1 * up1 * up2 - -4 * up1 * up3 + up4; - - skew = u3 / (u2 * sqrt(u2)); - kurto = u4 / (u2 * u2) - 3; - printf("%f %f %f %f\n", - up1, u2, skew, kurto); - }' -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/parameters b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/parameters deleted file mode 100644 index b2edbcae0ba..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/parameters +++ /dev/null @@ -1,9 +0,0 @@ -NTHREADS="32" - -NCONSUMERS="32 64 96 128 160 192 224 256 288 320 352 384 416 448 480 512" - -ITERATIONS=25000 - -LOCKING_TYPES="copy_on_read copy_on_write delayed" -DISPATCHING_TYPES="threaded reactive rtcorba" -FILTER_TYPES="null per_supplier" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/run_dispatching.sh b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/run_dispatching.sh deleted file mode 100755 index d7e336b4e7c..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/run_dispatching.sh +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/sh -# -# $Id$ -# - -. parameters - -for n in 2; do - for c in 2 4 6 8 10 12; do - - date - echo rtcorba $c $n - - ./driver -ORBSvcConf ec.dispatching_rtcorba.conf -r -d -h 10000 -l 10000 -i $ITERATIONS -c $c -n $n > ec_dispatching.rtcorba.${c}.${n}.txt 2>&1 - - date - echo threaded $c $n - - ./driver -ORBSvcConf ec.dispatching_threaded.conf -d -h 10000 -l 10000 -i $ITERATIONS -c $c -n $n > ec_dispatching.threaded.${c}.${n}.txt 2>&1 - - date - echo reactive $c $n - - ./driver -ORBSvcConf ec.dispatching_reactive.conf -d -h 10000 -l 10000 -i $ITERATIONS -c $c -n $n > ec_dispatching.reactive.${c}.${n}.txt 2>&1 - - done -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/run_filter.sh b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/run_filter.sh deleted file mode 100755 index 84ec666a6e3..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/run_filter.sh +++ /dev/null @@ -1,17 +0,0 @@ -#! /bin/sh -# -# $Id$ -# - -. parameters - -for n in $NTHREADS; do - for c in $NCONSUMERS; do - for t in $FILTER_TYPES; do - date - echo $t $c $n - - ./driver -ORBSvcConf ec.filter_${t}.conf -x -d -h 10000 -l 10000 -i $ITERATIONS -c $c -n $n > ec_filter.${t}.${c}.${n}.txt 2>&1 - done - done -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/run_locking.sh b/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/run_locking.sh deleted file mode 100755 index 88cda17cdcd..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Colocated_Roundtrip/run_locking.sh +++ /dev/null @@ -1,17 +0,0 @@ -#! /bin/sh -# -# $Id$ -# - -. parameters - -for n in $NTHREADS; do - for c in $NCONSUMERS; do - for t in $LOCKING_TYPES; do - date - echo $t $c $n - - ./driver -ORBSvcConf ec.locking_${t}.conf -d -f -h 10000 -l 10000 -i $ITERATIONS -c $c -n $n > ec_locking.${t}.${c}.${n}.txt 2>&1 - done - done -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/Federated_Roundtrip.mpc b/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/Federated_Roundtrip.mpc deleted file mode 100644 index a6681bf941c..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/Federated_Roundtrip.mpc +++ /dev/null @@ -1,28 +0,0 @@ -// $Id$ -project(*server): orbsvcsexe, rtcorbaevent, strategies, minimum_corba { - after += RTEC_Perf - libs += TAO_RTEC_Perf - - specific (automake) { - includes += $(srcdir)/../lib - } - includes += ../lib - - Source_Files { - server.cpp - } -} - -project(*client): orbsvcsexe, rtcorbaevent, strategies, minimum_corba { - after += RTEC_Perf - libs += TAO_RTEC_Perf - - specific (automake) { - includes += $(srcdir)/../lib - } - includes += ../lib - - Source_Files { - client.cpp - } -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/Makefile.am b/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/Makefile.am deleted file mode 100644 index 6b11a5b9d3a..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/Makefile.am +++ /dev/null @@ -1,118 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -ACE_BUILDDIR = $(top_builddir)/.. -ACE_ROOT = $(top_srcdir)/.. -TAO_BUILDDIR = $(top_builddir) -TAO_ROOT = $(top_srcdir) - -noinst_PROGRAMS = - -## Makefile.Federated_Roundtrip_Client.am - -if BUILD_CORBA_MESSAGING -if BUILD_RT_CORBA -if !BUILD_ACE_FOR_TAO -if !BUILD_MINIMUM_CORBA - -noinst_PROGRAMS += client - -client_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs \ - -I$(srcdir)/../lib \ - -I../lib - -client_SOURCES = \ - client.cpp - -client_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/performance-tests/RTEvent/lib/libTAO_RTEC_Perf.la \ - $(TAO_BUILDDIR)/tao/libTAO_Strategies.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTCORBAEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Serv.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ - $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \ - $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTPortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTCORBA.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_PI.la \ - $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_MINIMUM_CORBA -endif !BUILD_ACE_FOR_TAO -endif BUILD_RT_CORBA -endif BUILD_CORBA_MESSAGING - -## Makefile.Federated_Roundtrip_Server.am - -if BUILD_CORBA_MESSAGING -if BUILD_RT_CORBA -if !BUILD_ACE_FOR_TAO -if !BUILD_MINIMUM_CORBA - -noinst_PROGRAMS += server - -server_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs \ - -I$(srcdir)/../lib \ - -I../lib - -server_SOURCES = \ - server.cpp - -server_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/performance-tests/RTEvent/lib/libTAO_RTEC_Perf.la \ - $(TAO_BUILDDIR)/tao/libTAO_Strategies.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTCORBAEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Serv.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ - $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \ - $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTPortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTCORBA.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_PI.la \ - $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_MINIMUM_CORBA -endif !BUILD_ACE_FOR_TAO -endif BUILD_RT_CORBA -endif BUILD_CORBA_MESSAGING - -## Clean up template repositories, etc. -clean-local: - -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* - -rm -f gcctemp.c gcctemp so_locations *.ics - -rm -rf cxx_repository ptrepository ti_files - -rm -rf templateregistry ir.out - -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/client.cpp b/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/client.cpp deleted file mode 100644 index 8720b8bb599..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/client.cpp +++ /dev/null @@ -1,302 +0,0 @@ -// $Id$ - -#include "RT_Class.h" -#include "ORB_Holder.h" -#include "Servant_var.h" -#include "RIR_Narrow.h" -#include "RTServer_Setup.h" -#include "Peer_Base.h" -#include "Auto_Disconnect.h" -#include "Send_Task.h" -#include "Task_Activator.h" -#include "Client_Pair.h" - -#include "orbsvcs/Event_Service_Constants.h" -#include "orbsvcs/Event/EC_Default_Factory.h" - -#include "tao/Messaging/Messaging.h" -#include "tao/Strategies/advanced_resource.h" -#include "tao/RTCORBA/Priority_Mapping_Manager.h" -#include "tao/RTCORBA/Continuous_Priority_Mapping.h" -#include "tao/RTPortableServer/RTPortableServer.h" -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" -#include "ace/High_Res_Timer.h" -#include "ace/Sample_History.h" -#include "ace/Basic_Stats.h" -#include "ace/Stats.h" -#include "ace/Sched_Params.h" -#include "ace/Barrier.h" - -ACE_RCSID(TAO_RTEC_PERF_Roundtrip, client, "$Id$") - -const char *ior = "file://test.ior"; -int nthreads = 0; -int high_priority_period = 0; -int high_priority_workload = 0; -int low_priority_period = 0; -int low_priority_workload = 0; -int disable_low_priority = 0; -int use_rt_corba = 0; - -class Roundtrip_Peer : public Peer_Base -{ -public: - Roundtrip_Peer (CORBA::ORB_ptr orb, - RTServer_Setup &rtserver_setup, - RT_Class &rt_class - ACE_ENV_ARG_DECL) - : Peer_Base (orb, rtserver_setup - ACE_ENV_ARG_PARAMETER) - , rt_class_ (&rt_class) - { - } - - //@{ - /** @name The Federated_Test::Peer methods - */ - virtual Federated_Test::Experiment_Results * - run_experiment (CORBA::Long experiment_id, - CORBA::Long iterations - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - //@} - -private: - RT_Class *rt_class_; -}; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "k:n:l:h:w:v:zr"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'k': - ior = get_opts.opt_arg (); - break; - - case 'n': - nthreads = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'h': - high_priority_period = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'l': - low_priority_period = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'w': - high_priority_workload = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'v': - low_priority_workload = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'z': - disable_low_priority = 1; - break; - - case 'r': - use_rt_corba = 1; - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "-k <IOR> " - "-i iterations (iterations) " - "-h high_priority_period (usecs) " - "-l low_priority_period (usecs) " - "-w high_priority_workload (usecs) " - "-v low_priority_workload (usecs) " - "-r (enable RT-CORBA) " - "-n nthreads (low priority thread) " - "-z (disable low priority) " - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -int main (int argc, char *argv[]) -{ - TAO_EC_Default_Factory::init_svcs(); - RT_Class rt_class; - - ACE_TRY_NEW_ENV - { - ORB_Holder orb (argc, argv, "" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (parse_args (argc, argv) != 0) - return 1; - - RTServer_Setup rtserver_setup (use_rt_corba, - orb, - rt_class, - nthreads - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var root_poa = - RIR_Narrow<PortableServer::POA>::resolve (orb, - "RootPOA" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "Finished ORB and POA configuration\n")); - - Servant_var<Roundtrip_Peer> peer_impl ( - new Roundtrip_Peer (orb, - rtserver_setup, - rt_class - ACE_ENV_ARG_PARAMETER) - ); - ACE_TRY_CHECK; - - Federated_Test::Peer_var peer = - peer_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "Finished peer configuration and activation\n")); - - CORBA::Object_var object = - orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Federated_Test::Control_var control = - Federated_Test::Control::_narrow (object.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - control->join (peer.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - return 0; -} - -Federated_Test::Experiment_Results * -Roundtrip_Peer::run_experiment (CORBA::Long experiment_id, - CORBA::Long iterations - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - int thread_count = 1; -#if 0 - if (disable_low_priority == 0) - thread_count += nthreads; -#endif - - ACE_Barrier the_barrier (thread_count); - - ACE_DEBUG ((LM_DEBUG, "Calibrating high res timer ....")); - ACE_High_Res_Timer::calibrate (); - - ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); - ACE_DEBUG ((LM_DEBUG, "Done (%d)\n", gsf)); - -#if 0 - Low_Priority_Setup<Client_Pair> low_priority_setup ( - nthreads, - 0, // no limit on the number of iterations - 1, // each client gets its own type - experiment_id, - ACE_ES_EVENT_UNDEFINED + 2, - low_priority_workload, - gsf, - disable_low_priority ? 0 : 1, - this->rt_class_.priority_low (), - this->rt_class_.thr_sched_class (), - low_priority_period, - this->poa_.in (), - this->poa_.in (), - this->event_channel_.in (), - &the_barrier - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); -#endif - - Client_Pair high_priority_group; - high_priority_group.init (experiment_id, - ACE_ES_EVENT_UNDEFINED, - iterations, - high_priority_workload, - gsf, - this->poa_.in (), - this->poa_.in ()); - high_priority_group.connect (this->event_channel_.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - Auto_Disconnect<Client_Pair> high_priority_disconnect (&high_priority_group); - - Send_Task high_priority_task; - high_priority_task.init (iterations, - high_priority_period, - 0, - ACE_ES_EVENT_UNDEFINED, - experiment_id, - high_priority_group.supplier (), - &the_barrier); - { - // Artificial scope to wait for the high priority task... - Task_Activator<Send_Task> high_priority_act (this->rt_class_->priority_high (), - this->rt_class_->thr_sched_class (), - 1, - &high_priority_task); - } - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - high priority task completed\n")); - -#if 0 - if (disable_low_priority == 0) - { - low_priority_setup.stop_all_threads (); - } - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - low priority task(s) stopped\n")); -#endif - - ACE_Sample_History &history = - high_priority_group.consumer ()->sample_history (); - - Federated_Test::Experiment_Results_var results ( - new Federated_Test::Experiment_Results (iterations) - ); - results->length (iterations); - for (CORBA::ULong i = 0; i != results->length (); ++i) - { - results[i] = history.get_sample (i) / gsf; - } - - return results._retn (); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/parameters b/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/parameters deleted file mode 100644 index 6a749778a2e..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/parameters +++ /dev/null @@ -1,20 +0,0 @@ -NTHREADS="16" - -#NCONSUMERS="32 64 96 128 160 192 224 256 288 320 352 384 416 448 480 512" -NCONSUMERS="2 4 8" - -#ITERATIONS=25000 -ITERATIONS=3000 - -LOCKING_TYPES="copy_on_read copy_on_write delayed" -DISPATCHING_TYPES="threaded reactive rtcorba" -FILTER_TYPES="null per_supplier" - -#IOR=/project/amras/coryan/IOR/roundtrip.ior -IOR=test.ior - -#REMOTE_HOST=celegorm -REMOTE_HOST=localhost - -#REMOTE_LOCATION=/project/celegorm/coryan/EC_Roundtrip -REMOTE_LOCATION=$PWD diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/roundtrip.conf b/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/roundtrip.conf deleted file mode 100644 index 7cc3d800820..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/roundtrip.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECObserver basic -ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/roundtrip.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/roundtrip.conf.xml deleted file mode 100644 index 3e71148d35b..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/roundtrip.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/roundtrip.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECObserver basic -ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/run_roundtrip.sh b/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/run_roundtrip.sh deleted file mode 100755 index f7ea4c46d99..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/run_roundtrip.sh +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh -# -# $Id$ -# - -. parameters - -for c in $NCONSUMERS; do - - date - echo $t $c $n - - /bin/rm -f $IOR -# ssh $REMOTE_HOST "cd $REMOTE_LOCATION ; ./server -ORBSvcConf ec.locking_${t}.conf -r -o $IOR" >server.log 2>&1 </dev/null & - ./server -d -o $IOR -i $ITERATIONS -p 2 >server.$c.txt 2>&1 </dev/null & - while [ ! -f $IOR ]; do - sleep 1 - done - ./client -ORBDebugLevel 0 -ORBSvcConf roundtrip.conf -k file://$IOR -z -h 10000 -l 10000 > ec_roundtrip.$c.01.txt 2>&1 </dev/null & - - ./client -ORBDebugLevel 0 -ORBSvcConf roundtrip.conf -k file://$IOR -z -h 10000 -l 10000 > ec_roundtrip.$c.02.txt 2>&1 </dev/null & - - wait - wait - wait -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/server.cpp b/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/server.cpp deleted file mode 100644 index 677cf6870f5..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Federated_Roundtrip/server.cpp +++ /dev/null @@ -1,156 +0,0 @@ -// $Id$ - -#include "RT_Class.h" -#include "ORB_Holder.h" -#include "Servant_var.h" -#include "RIR_Narrow.h" -#include "RTServer_Setup.h" -#include "Control.h" - -#include "tao/PortableServer/PortableServer.h" -#include "tao/RTPortableServer/RTPortableServer.h" -#include "tao/Strategies/advanced_resource.h" -#include "tao/Messaging/Messaging.h" -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" - -ACE_RCSID (TAO_PERF_RTEC_Federated_Roundtrip, - server, - "$Id$") - -const char *ior_output_file = "test.ior"; -int iterations = 10000; -int nthreads = 1; -int peer_count = 2; -int do_dump_history = 0; -int use_rt_corba = 0; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "o:i:p:n:rd"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'o': - ior_output_file = get_opts.opt_arg (); - break; - - case 'n': - nthreads = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'i': - iterations = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'p': - peer_count = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'r': - use_rt_corba = 1; - break; - - case 'd': - do_dump_history = 1; - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "-o <iorfile> " - "-n nthreads " - "-i iterations " - "-p peer_count " - "-r (use RT-CORBA) " - "-d (dump full history) " - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -int main (int argc, char *argv[]) -{ - RT_Class rt_class; - - ACE_TRY_NEW_ENV - { - ORB_Holder orb (argc, argv, "" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (parse_args (argc, argv) != 0) - return 1; - - RTServer_Setup rtserver_setup (use_rt_corba, - orb, - rt_class, - nthreads - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var root_poa = - RIR_Narrow<PortableServer::POA>::resolve (orb, - "RootPOA" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var control_poa (rtserver_setup.poa ()); - Servant_var<Control> control_impl ( - new Control (peer_count, - iterations, - do_dump_history, - orb, - control_poa.in ()) - ); - - Federated_Test::Control_var control = - control_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::String_var ior = - orb->object_to_string (control.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - // Output the ior to the <ior_output_file> - FILE *output_file = ACE_OS::fopen (ior_output_file, "w"); - if (output_file == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for writing IOR: %s", - ior_output_file), - 1); - ACE_OS::fprintf (output_file, "%s", ior.in ()); - ACE_OS::fclose (output_file); - - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n")); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Makefile.am b/TAO/orbsvcs/performance-tests/RTEvent/Makefile.am deleted file mode 100644 index c4a6b0c9764..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -SUBDIRS = \ - lib \ - TCP_Baseline \ - Roundtrip \ - RTCORBA_Callback \ - RTCORBA_Baseline \ - Federated_Roundtrip \ - Colocated_Roundtrip - diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/Makefile.am b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/Makefile.am deleted file mode 100644 index b536939e7c1..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/Makefile.am +++ /dev/null @@ -1,170 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -ACE_BUILDDIR = $(top_builddir)/.. -ACE_ROOT = $(top_srcdir)/.. -TAO_BUILDDIR = $(top_builddir) -TAO_IDL = ACE_ROOT=$(ACE_ROOT) TAO_ROOT=$(TAO_ROOT) $(TAO_BUILDDIR)/TAO_IDL/tao_idl -TAO_IDL_DEP = $(TAO_BUILDDIR)/TAO_IDL/tao_idl -TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) -I$(srcdir) -g $(ACE_BUILDDIR)/apps/gperf/src/gperf -TAO_ROOT = $(top_srcdir) - -noinst_PROGRAMS = - -## Makefile.RTCORBA_Baseline_IDL.am - -if BUILD_CORBA_MESSAGING -if BUILD_RT_CORBA -if !BUILD_ACE_FOR_TAO -if !BUILD_MINIMUM_CORBA - -BUILT_SOURCES = \ - TestC.cpp \ - TestC.h \ - TestC.inl \ - TestS.cpp \ - TestS.h \ - TestS.inl \ - TestS_T.cpp \ - TestS_T.h \ - TestS_T.inl - -CLEANFILES = \ - Test-stamp \ - TestC.cpp \ - TestC.h \ - TestC.inl \ - TestS.cpp \ - TestS.h \ - TestS.inl \ - TestS_T.cpp \ - TestS_T.h \ - TestS_T.inl - -TestC.cpp TestC.h TestC.inl TestS.cpp TestS.h TestS.inl TestS_T.cpp TestS_T.h TestS_T.inl: Test-stamp - -Test-stamp: $(srcdir)/Test.idl $(TAO_IDL_DEP) - $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs -GT $(srcdir)/Test.idl - @touch $@ - - -noinst_HEADERS = \ - Test.idl - -endif !BUILD_MINIMUM_CORBA -endif !BUILD_ACE_FOR_TAO -endif BUILD_RT_CORBA -endif BUILD_CORBA_MESSAGING - -## Makefile.RTCORBA_Baseline_Client.am - -if BUILD_CORBA_MESSAGING -if BUILD_RT_CORBA -if !BUILD_ACE_FOR_TAO -if !BUILD_MINIMUM_CORBA - -noinst_PROGRAMS += client - -client_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs \ - -I$(srcdir)/../lib - -client_SOURCES = \ - TestC.cpp \ - client.cpp \ - Roundtrip.h - -client_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/performance-tests/RTEvent/lib/libTAO_RTEC_Perf.la \ - $(TAO_BUILDDIR)/tao/libTAO_Strategies.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTCORBAEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Serv.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ - $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \ - $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTPortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTCORBA.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_PI.la \ - $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_MINIMUM_CORBA -endif !BUILD_ACE_FOR_TAO -endif BUILD_RT_CORBA -endif BUILD_CORBA_MESSAGING - -## Makefile.RTCORBA_Baseline_Server.am - -if BUILD_CORBA_MESSAGING -if BUILD_RT_CORBA -if !BUILD_ACE_FOR_TAO -if !BUILD_MINIMUM_CORBA - -noinst_PROGRAMS += server - -server_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs \ - -I$(srcdir)/../lib - -server_SOURCES = \ - Roundtrip.cpp \ - TestC.cpp \ - TestS.cpp \ - server.cpp \ - Roundtrip.h - -server_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/performance-tests/RTEvent/lib/libTAO_RTEC_Perf.la \ - $(TAO_BUILDDIR)/tao/libTAO_Strategies.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTCORBAEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Serv.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ - $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \ - $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTPortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTCORBA.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_PI.la \ - $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_MINIMUM_CORBA -endif !BUILD_ACE_FOR_TAO -endif BUILD_RT_CORBA -endif BUILD_CORBA_MESSAGING - -## Clean up template repositories, etc. -clean-local: - -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* - -rm -f gcctemp.c gcctemp so_locations *.ics - -rm -rf cxx_repository ptrepository ti_files - -rm -rf templateregistry ir.out - -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/RTCORBA_Baseline.mpc b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/RTCORBA_Baseline.mpc deleted file mode 100644 index 188d5276fd9..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/RTCORBA_Baseline.mpc +++ /dev/null @@ -1,52 +0,0 @@ -// $Id$ - -project(*IDL): orbsvcsexe, rtcorbaevent, strategies, minimum_corba { - - IDL_Files { - Test.idl - } - - custom_only = 1 -} - -project(*server): orbsvcsexe, rtcorbaevent, strategies, minimum_corba { - after += RTEC_Perf - libs += TAO_RTEC_Perf - - specific (automake) { - includes += $(srcdir)/../lib - } else { - includes += ../lib - } - - Source_Files { - server.cpp - Roundtrip.cpp - TestS.cpp - TestC.cpp - } - - after += *IDL - IDL_Files { - } -} - -project(*client): orbsvcsexe, rtcorbaevent, strategies, minimum_corba { - after += RTEC_Perf - libs += TAO_RTEC_Perf - - specific (automake) { - includes += $(srcdir)/../lib - } else { - includes += ../lib - } - - Source_Files { - TestC.cpp - client.cpp - } - - after += *IDL - IDL_Files { - } -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/Roundtrip.cpp b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/Roundtrip.cpp deleted file mode 100644 index d4ef62e9781..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/Roundtrip.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// -// $Id$ -// -#include "Roundtrip.h" -#include "ace/High_Res_Timer.h" - -ACE_RCSID (TAO_RTEC_Perf_RTCORBA_Baseline, - Roundtrip, - "$Id$") - -Roundtrip::Roundtrip (CORBA::ORB_ptr orb) - : orb_ (CORBA::ORB::_duplicate (orb)) - , gsf_ (ACE_High_Res_Timer::calibrate ()) -{ -} - -Test::Timestamp -Roundtrip::test_method (Test::Timestamp send_time, - CORBA::Long workload_in_usecs - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ACE_hrtime_t start = ACE_OS::gethrtime (); - CORBA::Long elapsed = 0; - - while (elapsed < workload_in_usecs) - { - elapsed = - static_cast<CORBA::Long> ( - (ACE_OS::gethrtime () - start) / this->gsf_ - ); - } - - return send_time; -} - -void -Roundtrip::shutdown (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/Roundtrip.h b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/Roundtrip.h deleted file mode 100644 index a4b01ce89b1..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/Roundtrip.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// $Id$ -// - -#ifndef ROUNDTRIP_H -#define ROUNDTRIP_H -#include /**/ "ace/pre.h" - -#include "TestS.h" - -/// Implement the Test::Roundtrip interface -class Roundtrip - : public virtual POA_Test::Roundtrip -{ -public: - /// Constructor - Roundtrip (CORBA::ORB_ptr orb); - - // = The skeleton methods - virtual Test::Timestamp test_method (Test::Timestamp send_time, - CORBA::Long workload_in_usecs - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - -private: - /// Use an ORB reference to conver strings to objects and shutdown - /// the application. - CORBA::ORB_var orb_; - - /// Translate the high resolution timer units into microseconds - ACE_UINT32 gsf_; -}; - -#include /**/ "ace/post.h" -#endif /* ROUNDTRIP_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/Test.idl b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/Test.idl deleted file mode 100644 index 7e72f72bcb5..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/Test.idl +++ /dev/null @@ -1,27 +0,0 @@ -// -// $Id$ -// - -/// A simple module to avoid namespace pollution -module Test -{ - /// Use a timestamp to measure the roundtrip delay - typedef unsigned long long Timestamp; - - /// Measure roundtrip delay - interface Roundtrip - { - /// A simple method to measure roundtrip delays - /** - * The operation simply returns its argument, this is used in AMI - * and deferred synchronous tests to measure the roundtrip delay - * without the need for a different reply handler for each - * request. - */ - Timestamp test_method (in Timestamp send_time, - in long workload_in_usecs); - - /// Shutdown the ORB - void shutdown (); - }; -}; diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/client.cpp b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/client.cpp deleted file mode 100644 index a3caafe3b54..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/client.cpp +++ /dev/null @@ -1,280 +0,0 @@ -// $Id$ - -#include "RT_Class.h" -#include "ORB_Holder.h" -#include "RIR_Narrow.h" -#include "RTClient_Setup.h" -#include "Client_Options.h" -#include "TestC.h" - -#include "tao/Messaging/Messaging.h" -#include "tao/Strategies/advanced_resource.h" -#include "tao/RTPortableServer/RTPortableServer.h" -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" -#include "ace/High_Res_Timer.h" -#include "ace/Sample_History.h" -#include "ace/Basic_Stats.h" -#include "ace/Stats.h" -#include "ace/Task.h" -#include "ace/Barrier.h" -#include "ace/OS_NS_unistd.h" - -ACE_RCSID (TAO_RTEC_PERF_RTCORBA_Baseline, - client, - "$Id$") - -class Roundtrip_Task : public ACE_Task_Base -{ -public: - Roundtrip_Task (Test::Roundtrip_ptr roundtrip, - ACE_Barrier *the_barrier) - : roundtrip_ (Test::Roundtrip::_duplicate (roundtrip)) - , barrier_ (the_barrier) - { - } - - virtual void run_test (ACE_ENV_SINGLE_ARG_DECL) = 0; - - virtual int svc (void) - { - this->barrier_->wait (); - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - this->run_test (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) done...\n")); - return 0; - } - -protected: - Test::Roundtrip_var roundtrip_; - - ACE_Barrier *barrier_; -}; - -class High_Priority_Task : public Roundtrip_Task -{ -public: - High_Priority_Task (Test::Roundtrip_ptr roundtrip, - ACE_Barrier *the_barrier, - int iterations, - int period_in_usecs, - int workload) - : Roundtrip_Task (roundtrip, the_barrier) - , sample_history (iterations) - , iterations_ (iterations) - , period_in_usecs_ (period_in_usecs) - , workload_ (workload) - { - } - - virtual void run_test (ACE_ENV_SINGLE_ARG_DECL) - { - for (int i = 0; i != this->iterations_; ++i) - { - ACE_Time_Value period (0, this->period_in_usecs_); - ACE_OS::sleep (period); - - ACE_TRY { - ACE_hrtime_t start = ACE_OS::gethrtime (); - (void) this->roundtrip_->test_method (start, - this->workload_ - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - ACE_hrtime_t elapsed = ACE_OS::gethrtime () - start; - - this->sample_history.sample (elapsed); - - } ACE_CATCHANY { - } ACE_ENDTRY; - } - } - - ACE_Sample_History sample_history; - -private: - int iterations_; - - int period_in_usecs_; - - int workload_; -}; - -class Low_Priority_Task : public Roundtrip_Task -{ -public: - Low_Priority_Task (Test::Roundtrip_ptr roundtrip, - ACE_Barrier *the_barrier, - int period_in_usecs, - int workload) - : Roundtrip_Task (roundtrip, the_barrier) - , stopped_ (0) - , period_in_usecs_ (period_in_usecs) - , workload_ (workload) - { - } - - void stop (void) - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - this->stopped_ = 1; - } - - virtual void run_test (ACE_ENV_SINGLE_ARG_DECL) - { - for (;;) - { - ACE_Time_Value period (0, this->period_in_usecs_); - ACE_OS::sleep (period); - - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (this->stopped_) - return; - } - - ACE_TRY { - CORBA::ULongLong dummy = 0; - (void) this->roundtrip_->test_method (dummy, - this->workload_ - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - } ACE_CATCHANY { - } ACE_ENDTRY; - } - } - -private: - TAO_SYNCH_MUTEX mutex_; - - int stopped_; - - int period_in_usecs_; - - int workload_; -}; - -int main (int argc, char *argv[]) -{ - RT_Class rt_class; - - ACE_TRY_NEW_ENV - { - ORB_Holder orb (argc, argv, "" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Client_Options options (argc, argv); - if (argc != 1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Usage: %s " - "-i iterations (iterations) " - "-h high_priority_period (usecs) " - "-l low_priority_period (usecs) " - "-w high_priority_workload (usecs) " - "-v low_priority_workload (usecs) " - "-r (enable RT-CORBA) " - "-n nthreads (low priority thread) " - "-d (dump history) " - "-z (disable low priority) " - "\n", - argv [0]), - 1); - } - - RTClient_Setup rtclient_setup (options.use_rt_corba, - orb, - rt_class, - options.nthreads - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "Finished ORB and POA configuration\n")); - - CORBA::Object_var object = - orb->string_to_object (options.ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Test::Roundtrip_var roundtrip = - Test::Roundtrip::_narrow (object.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::PolicyList_var inconsistent_policies; - (void) roundtrip->_validate_connection (inconsistent_policies - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - int thread_count = 1 + options.nthreads; - ACE_Barrier the_barrier (thread_count); - - ACE_DEBUG ((LM_DEBUG, "Calibrating high res timer ....")); - ACE_High_Res_Timer::calibrate (); - - ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); - ACE_DEBUG ((LM_DEBUG, "Done (%d)\n", gsf)); - - int per_thread_period = options.low_priority_period; - if (options.global_low_priority_rate) - per_thread_period = options.low_priority_period * options.nthreads; - Low_Priority_Task low_priority (roundtrip.in (), &the_barrier, - per_thread_period, - options.low_priority_workload); - low_priority.activate (rt_class.thr_sched_class () - | THR_NEW_LWP | THR_JOINABLE, - options.nthreads, 1, - rt_class.priority_low ()); - - High_Priority_Task high_priority (roundtrip.in (), &the_barrier, - options.iterations, - options.high_priority_period, - options.high_priority_workload); - high_priority.activate (rt_class.thr_sched_class () - | THR_NEW_LWP | THR_JOINABLE, - 1, 1, - rt_class.priority_low ()); - - high_priority.wait (); - low_priority.stop (); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - high prio task joined\n")); - - ACE_Sample_History &history = high_priority.sample_history; - if (options.dump_history) - { - history.dump_samples ("HISTORY", gsf); - } - - ACE_Basic_Stats high_priority_stats; - history.collect_basic_stats (high_priority_stats); - high_priority_stats.dump_results ("High Priority", gsf); - - low_priority.thr_mgr ()->wait (); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - all task(s) joined\n")); - - roundtrip->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - starting cleanup\n")); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/generate_cmp.sh b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/generate_cmp.sh deleted file mode 100755 index 2c7c555e9e8..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/generate_cmp.sh +++ /dev/null @@ -1,10 +0,0 @@ -#/bin/sh - -for i in reactive rtcorba; do - echo $i ; - for j in 99 999 9999; do - paste $i.avg.dat ${i}.${j}.dat | - awk '{print $1, $4 / $2}' > $i.${j}.cmp.dat - done -done - diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/generate_histo.sh b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/generate_histo.sh deleted file mode 100755 index 9837c080edf..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/generate_histo.sh +++ /dev/null @@ -1,8 +0,0 @@ -#/bin/sh - -for i in *.txt; do - b=`basename $i .txt` - echo $i - awk '/^HISTO/ {print $3}' $i | sort -n | uniq -c | - awk '{print $2, 100.0 * $1 / 20000.0}' > $b.histo.dat -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/generate_percentiles.sh b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/generate_percentiles.sh deleted file mode 100755 index 8d0914a6c16..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/generate_percentiles.sh +++ /dev/null @@ -1,47 +0,0 @@ -#/bin/sh - -. parameters - -PERCENTILES="0 .25 .50 .75 .99 .999 .9999 1" - -for t in $*; do - cat /dev/null > ${t}.avg.dat - for p in $PERCENTILES; do - cat /dev/null > ${t}$p.percentile.dat - done - - for c in $NCONSUMERS; do - echo $t $c - INPUT=${t}.${c}.txt - awk -v c=$c '/^HISTO/ { - n++; - s += $3 - } - END { - printf("%d %f\n", c, s/n); - }' $INPUT >> ${t}.avg.dat - - TFILE=/tmp/${t}.$$ - awk '/^HISTO/ {print $3}' $INPUT | sort -n | uniq -c > $TFILE - for p in $PERCENTILES; do - awk -v N=$ITERATIONS '{print $2, $1 / N}' $TFILE | - awk -v c=$c -v p=${p} '\ -BEGIN { x = 0; l = 0; } -{ s += $2; - l = $1; - if (x == 0 && s >= p) { - x = $1; - } -} -END { - if (s < p) { - x = l; - } - printf("%d %f\n", c, x); -}' >> ${t}${p}.percentile.dat - done - /bin/rm -f $TFILE - - done - -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/realtime.conf b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/realtime.conf deleted file mode 100644 index 493ad253959..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/realtime.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBPriorityMapping direct" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/realtime.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/realtime.conf.xml deleted file mode 100644 index 86ba9fd5fbf..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/realtime.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/realtime.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="RT_ORB_Loader" params="-ORBSchedPolicy SCHED_FIFO -ORBPriorityMapping direct"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/run.sh b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/run.sh deleted file mode 100755 index 925ea8751dc..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/run.sh +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# -# $Id$ -# - -LOW_PRIORITY="1 4 8 12 16 20 24 28 32" - -ITERATIONS=10000 - -#IOR=/project/amras/coryan/IOR/roundtrip.ior -IOR=test.ior - -for c in $LOW_PRIORITY; do - date - echo rtcorba $c - - /bin/rm -f $IOR -# ssh celegorm "cd /project/celegorm/coryan/RTCORBA_Baseline ; ./server -ORBSvcConf realtime.conf -r -n $c -o $IOR" >server.log 2>&1 </dev/null & - ./server -ORBSvcConf realtime.conf -r -n $c -o $IOR >server.log 2>&1 </dev/null & - while [ ! -f $IOR ]; do - sleep 1 - done - ./client -ORBSvcConf realtime.conf -g -r -d -h 0 -l 0 -w 9000 -i $ITERATIONS -n $c -k file://$IOR > rtcorba.$c.txt 2>&1 - sleep 5 - wait - - date - echo reactive $c - - /bin/rm -f $IOR -# ssh celegorm "cd /project/celegorm/coryan/RTCORBA_Baseline ; ./server -n $c -o $IOR" >server.log 2>&1 </dev/null & - ./server -n $c -o $IOR >server.log 2>&1 </dev/null & - while [ ! -f $IOR ]; do - sleep 1 - done - ./client -g -d -h 0 -l 0 -w 9000 -i $ITERATIONS -n $c -k file://$IOR > reactive.$c.txt 2>&1 - sleep 5 - wait - -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/server.cpp b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/server.cpp deleted file mode 100644 index f82199ba24e..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Baseline/server.cpp +++ /dev/null @@ -1,137 +0,0 @@ -// $Id$ - -#include "RT_Class.h" -#include "ORB_Holder.h" -#include "Servant_var.h" -#include "RIR_Narrow.h" -#include "RTServer_Setup.h" -#include "Roundtrip.h" - -#include "tao/PortableServer/PortableServer.h" -#include "tao/RTPortableServer/RTPortableServer.h" -#include "tao/Strategies/advanced_resource.h" -#include "tao/Messaging/Messaging.h" -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" - -ACE_RCSID (TAO_PERF_RTEC_RTCORBA_Baseline, - server, - "$Id$") - -const char *ior_output_file = "test.ior"; -int use_rt_corba = 0; -int nthreads = 0; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "o:n:r"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'o': - ior_output_file = get_opts.opt_arg (); - break; - - case 'n': - nthreads = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'r': - use_rt_corba = 1; - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "-o <iorfile> " - "-r (use RT-CORBA) " - "-n nthreads " - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -int main (int argc, char *argv[]) -{ - /// Move the test to the real-time class if it is possible. - RT_Class rt_class; - - ACE_TRY_NEW_ENV - { - ORB_Holder orb (argc, argv, "" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (parse_args (argc, argv) != 0) - return 1; - - RTServer_Setup rtserver_setup (use_rt_corba, - orb, - rt_class, - nthreads - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var root_poa = - RIR_Narrow<PortableServer::POA>::resolve (orb, - "RootPOA" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var the_poa (rtserver_setup.poa ()); - - Servant_var<Roundtrip> roundtrip (new Roundtrip (orb)); - - PortableServer::ObjectId_var id = - the_poa->activate_object (roundtrip.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::Object_var object = - the_poa->id_to_reference (id.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::String_var ior = - orb->object_to_string (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - // Output the ior to the <ior_output_file> - FILE *output_file = ACE_OS::fopen (ior_output_file, "w"); - if (output_file == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for writing IOR: %s", - ior_output_file), - 1); - ACE_OS::fprintf (output_file, "%s", ior.in ()); - ACE_OS::fclose (output_file); - - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n")); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Callback.cpp b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Callback.cpp deleted file mode 100644 index 134dc30f9b3..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Callback.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// -// $Id$ -// -#include "Callback.h" -#include "Implicit_Deactivator.h" -#include "ace/OS_NS_time.h" - -ACE_RCSID (TAO_RTEC_Perf_RTCORBA_Callback, - Callback, - "$Id$") - -Callback::Callback (int iterations, - PortableServer::POA_ptr poa) - : sample_history_ (iterations) - , poa_ (PortableServer::POA::_duplicate (poa)) -{ -} - -ACE_Sample_History & -Callback::sample_history (void) -{ - return this->sample_history_; -} - -void -Callback::sample (Test::Timestamp the_timestamp - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ACE_hrtime_t elapsed = ACE_OS::gethrtime () - the_timestamp; - - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (sample_history_.max_samples () == sample_history_.sample_count ()) - return; - this->sample_history_.sample (elapsed); -} - -PortableServer::POA_ptr -Callback::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::POA::_duplicate (this->poa_.in ()); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Callback.h b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Callback.h deleted file mode 100644 index 520895f1cab..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Callback.h +++ /dev/null @@ -1,58 +0,0 @@ -/** - * @file Callback.h - * - * $Id$ - * - */ - -#ifndef CALLBACK_H -#define CALLBACK_H - -#include "TestS.h" -#include "ace/Sample_History.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class Callback - * - * @brief Implicit the Test::Callback interface - * - */ -class Callback - : public virtual POA_Test::Callback - -{ -public: - /// Constructor - Callback (int iterations, - PortableServer::POA_ptr poa); - - /// Access the history of samples - ACE_Sample_History &sample_history (void); - - //@{ - /** @name The RtecEventComm::PushCallback methods - */ - virtual void sample (Test::Timestamp the_timestamp - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - //@} - -private: - /// Synchronize access to the internal data - TAO_SYNCH_MUTEX mutex_; - - /// The history of latency samples - ACE_Sample_History sample_history_; - - /// The default poa - PortableServer::POA_var poa_; -}; - -#endif /* CALLBACK_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Makefile.am b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Makefile.am deleted file mode 100644 index d94aad01491..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Makefile.am +++ /dev/null @@ -1,174 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -ACE_BUILDDIR = $(top_builddir)/.. -ACE_ROOT = $(top_srcdir)/.. -TAO_BUILDDIR = $(top_builddir) -TAO_IDL = ACE_ROOT=$(ACE_ROOT) TAO_ROOT=$(TAO_ROOT) $(TAO_BUILDDIR)/TAO_IDL/tao_idl -TAO_IDL_DEP = $(TAO_BUILDDIR)/TAO_IDL/tao_idl -TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) -I$(srcdir) -g $(ACE_BUILDDIR)/apps/gperf/src/gperf -TAO_ROOT = $(top_srcdir) - -noinst_PROGRAMS = - -## Makefile.RTCORBA_Callback_IDL.am - -if BUILD_CORBA_MESSAGING -if BUILD_RT_CORBA -if !BUILD_ACE_FOR_TAO -if !BUILD_MINIMUM_CORBA - -BUILT_SOURCES = \ - TestC.cpp \ - TestC.h \ - TestC.inl \ - TestS.cpp \ - TestS.h \ - TestS.inl \ - TestS_T.cpp \ - TestS_T.h \ - TestS_T.inl - -CLEANFILES = \ - Test-stamp \ - TestC.cpp \ - TestC.h \ - TestC.inl \ - TestS.cpp \ - TestS.h \ - TestS.inl \ - TestS_T.cpp \ - TestS_T.h \ - TestS_T.inl - -TestC.cpp TestC.h TestC.inl TestS.cpp TestS.h TestS.inl TestS_T.cpp TestS_T.h TestS_T.inl: Test-stamp - -Test-stamp: $(srcdir)/Test.idl $(TAO_IDL_DEP) - $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs -GT $(srcdir)/Test.idl - @touch $@ - - -noinst_HEADERS = \ - Test.idl - -endif !BUILD_MINIMUM_CORBA -endif !BUILD_ACE_FOR_TAO -endif BUILD_RT_CORBA -endif BUILD_CORBA_MESSAGING - -## Makefile.RTCORBA_Callback_Client.am - -if BUILD_CORBA_MESSAGING -if BUILD_RT_CORBA -if !BUILD_ACE_FOR_TAO -if !BUILD_MINIMUM_CORBA - -noinst_PROGRAMS += client - -client_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs \ - -I$(srcdir)/../lib - -client_SOURCES = \ - Callback.cpp \ - TestC.cpp \ - TestS.cpp \ - client.cpp \ - Callback.h - -client_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/performance-tests/RTEvent/lib/libTAO_RTEC_Perf.la \ - $(TAO_BUILDDIR)/tao/libTAO_Strategies.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTCORBAEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Serv.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ - $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \ - $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTPortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTCORBA.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_PI.la \ - $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_MINIMUM_CORBA -endif !BUILD_ACE_FOR_TAO -endif BUILD_RT_CORBA -endif BUILD_CORBA_MESSAGING - -## Makefile.RTCORBA_Callback_Server.am - -if BUILD_CORBA_MESSAGING -if BUILD_RT_CORBA -if !BUILD_ACE_FOR_TAO -if !BUILD_MINIMUM_CORBA - -noinst_PROGRAMS += server - -server_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs \ - -I$(srcdir)/../lib - -server_SOURCES = \ - Session.cpp \ - Session_Factory.cpp \ - TestC.cpp \ - TestS.cpp \ - server.cpp \ - Session.h \ - Session_Factory.h - -server_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/performance-tests/RTEvent/lib/libTAO_RTEC_Perf.la \ - $(TAO_BUILDDIR)/tao/libTAO_Strategies.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTCORBAEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Serv.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ - $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \ - $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTPortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTCORBA.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_PI.la \ - $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_MINIMUM_CORBA -endif !BUILD_ACE_FOR_TAO -endif BUILD_RT_CORBA -endif BUILD_CORBA_MESSAGING - -## Clean up template repositories, etc. -clean-local: - -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* - -rm -f gcctemp.c gcctemp so_locations *.ics - -rm -rf cxx_repository ptrepository ti_files - -rm -rf templateregistry ir.out - -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/RTCORBA_Callback.mpc b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/RTCORBA_Callback.mpc deleted file mode 100644 index bfd1de34f68..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/RTCORBA_Callback.mpc +++ /dev/null @@ -1,54 +0,0 @@ -// $Id$ - -project(*IDL): orbsvcsexe, rtcorbaevent, strategies, minimum_corba { - IDL_Files { - Test.idl - } - - custom_only = 1 -} - -project(*server): orbsvcsexe, rtcorbaevent, strategies, minimum_corba { - after += RTEC_Perf - libs += TAO_RTEC_Perf - - specific (automake) { - includes += $(srcdir)/../lib - } else { - includes += ../lib - } - - Source_Files { - server.cpp - Session.cpp - Session_Factory.cpp - TestS.cpp - TestC.cpp - } - - after += *IDL - IDL_Files { - } -} - -project(*client): orbsvcsexe, rtcorbaevent, strategies, minimum_corba { - after += RTEC_Perf - libs += TAO_RTEC_Perf - - specific (automake) { - includes += $(srcdir)/../lib - } else { - includes += ../lib - } - - Source_Files { - client.cpp - Callback.cpp - TestS.cpp - TestC.cpp - } - - after += *IDL - IDL_Files { - } -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Session.cpp b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Session.cpp deleted file mode 100644 index 5c7627717eb..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Session.cpp +++ /dev/null @@ -1,40 +0,0 @@ -// -// $Id$ -// -#include "Session.h" -#include "Implicit_Deactivator.h" - -ACE_RCSID (TAO_RTEC_Perf_RTCORBA_Callback, - Session, - "$Id$") - -Session::Session (Test::Callback_ptr cb, - PortableServer::POA_ptr poa) - : cb_ (Test::Callback::_duplicate (cb)) - , poa_ (PortableServer::POA::_duplicate (poa)) -{ -} - -void -Session::sample (Test::Timestamp the_timestamp - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - this->cb_->sample (the_timestamp - ACE_ENV_ARG_PARAMETER); -} - -void -Session::shutdown (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - Implicit_Deactivator deactivator (this - ACE_ENV_ARG_PARAMETER); -} - -PortableServer::POA_ptr -Session::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::POA::_duplicate (this->poa_.in ()); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Session.h b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Session.h deleted file mode 100644 index 65d8f4b6507..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Session.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// $Id$ -// - -#ifndef SESSION_H -#define SESSION_H -#include /**/ "ace/pre.h" - -#include "TestS.h" - -/// Implement the Test::Session interface -class Session - : public virtual POA_Test::Session -{ -public: - /// Constructor - Session (Test::Callback_ptr cb, - PortableServer::POA_ptr poa); - - // = The skeleton methods - virtual void sample (Test::Timestamp the_timestamp - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - -private: - Test::Callback_var cb_; - - PortableServer::POA_var poa_; -}; - -#include /**/ "ace/post.h" -#endif /* SESSION_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Session_Factory.cpp b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Session_Factory.cpp deleted file mode 100644 index 735a8d0ec84..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Session_Factory.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// -// $Id$ -// -#include "Session_Factory.h" -#include "Session.h" -#include "Servant_var.h" - -ACE_RCSID (TAO_RTEC_Perf_RTCORBA_Callback, - Session_Factory, - "$Id$") - -Session_Factory::Session_Factory (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa) - : orb_ (CORBA::ORB::_duplicate (orb)) - , poa_ (PortableServer::POA::_duplicate (poa)) -{ -} - -Test::Session_ptr -Session_Factory::create_new_session (Test::Callback_ptr cb - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - Servant_var<Session> session_impl (new Session (cb, - this->poa_.in ())); - - return session_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); -} - -void -Session_Factory::shutdown (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); -} - -PortableServer::POA_ptr -Session_Factory::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::POA::_duplicate (this->poa_.in ()); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Session_Factory.h b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Session_Factory.h deleted file mode 100644 index 875535d6b93..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Session_Factory.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// $Id$ -// - -#ifndef SESSION_FACTORY_H -#define SESSION_FACTORY_H -#include /**/ "ace/pre.h" - -#include "TestS.h" - -/// Implement the Test::Session_Factory interface -class Session_Factory - : public virtual POA_Test::Session_Factory -{ -public: - /// Constructor - Session_Factory (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa); - - // = The skeleton methods - virtual Test::Session_ptr create_new_session (Test::Callback_ptr cb - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - -private: - /// Use an ORB reference to shutdown the application. - CORBA::ORB_var orb_; - - PortableServer::POA_var poa_; -}; - -#include /**/ "ace/post.h" -#endif /* SESSION_FACTORY_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Test.idl b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Test.idl deleted file mode 100644 index 2b27d49688c..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/Test.idl +++ /dev/null @@ -1,39 +0,0 @@ -// -// $Id$ -// - -/// A simple module to avoid namespace pollution -module Test -{ - /// Use a timestamp to measure the roundtrip delay - typedef unsigned long long Timestamp; - - interface Session; - interface Callback; - - /// Create sessions to measure roundtrip delays - interface Session_Factory - { - /// Return a new session - Session create_new_session (in Callback the_callback); - - /// Shutdown the server - void shutdown (); - }; - - /// Each experiment is ran using completely separate - interface Session - { - /// Run one iteration of the experiment - void sample (in Timestamp the_timestamp); - - /// Destroy the session - void shutdown (); - }; - - interface Callback - { - /// Measure one iteration - void sample (in Timestamp the_timestamp); - }; -}; diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/client.cpp b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/client.cpp deleted file mode 100644 index 420b6d15b95..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/client.cpp +++ /dev/null @@ -1,335 +0,0 @@ -// $Id$ - -#include "Callback.h" - -#include "RT_Class.h" -#include "ORB_Holder.h" -#include "Servant_var.h" -#include "RIR_Narrow.h" -#include "RTServer_Setup.h" -#include "Client_Options.h" -#include "Implicit_Deactivator.h" -#include "Shutdown.h" -#include "ORB_Task.h" -#include "ORB_Task_Activator.h" - -#include "tao/PortableServer/PortableServer.h" -#include "tao/RTPortableServer/RTPortableServer.h" -#include "tao/Strategies/advanced_resource.h" -#include "tao/Messaging/Messaging.h" -#include "ace/Auto_Functor.h" -#include "ace/Auto_Ptr.h" -#include "ace/High_Res_Timer.h" -#include "ace/Basic_Stats.h" -#include "ace/Stats.h" -#include "ace/Task.h" -#include "ace/Barrier.h" -#include "ace/OS_NS_unistd.h" - -ACE_RCSID (TAO_PERF_RTEC_RTCORBA_Baseline, - client, - "$Id$") - -class Roundtrip_Task : public ACE_Task_Base -{ -public: - Roundtrip_Task (Test::Session_Factory_ptr session_factory, - ACE_Barrier *the_barrier) - : session_factory_ (Test::Session_Factory::_duplicate (session_factory)) - , the_barrier_ (the_barrier) - { - } - - virtual void run_test (ACE_ENV_SINGLE_ARG_DECL) = 0; - - virtual int svc (void) - { - this->the_barrier_->wait (); - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - this->run_test (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) done...\n")); - return 0; - } - -protected: - Test::Session_Factory_var session_factory_; - - ACE_Barrier *the_barrier_; -}; - -class High_Priority_Task : public Roundtrip_Task -{ -public: - High_Priority_Task (Test::Session_Factory_ptr session_factory, - ACE_Barrier *the_barrier, - PortableServer::POA_ptr poa, - int iterations, - int period_in_usecs) - : Roundtrip_Task (session_factory, the_barrier) - , callback (new Callback (iterations, poa)) - , iterations_ (iterations) - , period_in_usecs_ (period_in_usecs) - { - } - - virtual void run_test (ACE_ENV_SINGLE_ARG_DECL) - { - Test::Callback_var cb = - callback->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - Implicit_Deactivator deactivator (callback); - - Test::Session_var session = - this->session_factory_->create_new_session (cb.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_Utils::Auto_Functor<Test::Session,Shutdown<Test::Session> > auto_shutdown (session.in ()); - - for (int i = 0; i != this->iterations_; ++i) - { - if ((i + 1) % 1000 == 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) - Thread has sent %d messages @ %T\n", - i + 1)); - } - - ACE_Time_Value period (0, this->period_in_usecs_); - ACE_OS::sleep (period); - - ACE_TRY { - ACE_hrtime_t start = ACE_OS::gethrtime (); - (void) session->sample (start - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } ACE_CATCHANY { - } ACE_ENDTRY; - } - } - - Servant_var<Callback> callback; - -private: - int iterations_; - - int period_in_usecs_; -}; - -class Low_Priority_Task : public Roundtrip_Task -{ -public: - Low_Priority_Task (Test::Session_Factory_ptr session_factory, - ACE_Barrier *the_barrier, - PortableServer::POA_ptr poa, - int period_in_usecs) - : Roundtrip_Task (session_factory, the_barrier) - , callback (new Callback (1, poa)) - , stopped_ (0) - , period_in_usecs_ (period_in_usecs) - { - } - - void stop (void) - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - this->stopped_ = 1; - } - - virtual void run_test (ACE_ENV_SINGLE_ARG_DECL) - { - Test::Callback_var cb = - callback->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - Implicit_Deactivator deactivator (callback); - - Test::Session_var session = - this->session_factory_->create_new_session (cb.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_Utils::Auto_Functor<Test::Session,Shutdown<Test::Session> > auto_shutdown (session.in ()); - - for (;;) - { - ACE_Time_Value period (0, this->period_in_usecs_); - ACE_OS::sleep (period); - - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (this->stopped_) - return; - } - - ACE_TRY { - CORBA::ULongLong dummy = 0; - (void) session->sample (dummy - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - } ACE_CATCHANY { - } ACE_ENDTRY; - } - } - -private: - TAO_SYNCH_MUTEX mutex_; - - Servant_var<Callback> callback; - - int stopped_; - - int period_in_usecs_; -}; - -int main (int argc, char *argv[]) -{ - /// Move the test to the real-time class if it is possible. - RT_Class rt_class; - - ACE_TRY_NEW_ENV - { - ORB_Holder orb (argc, argv, "" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Client_Options options (argc, argv); - if (argc != 1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Usage: %s " - "-i iterations (iterations) " - "-h high_priority_period (usecs) " - "-l low_priority_period (usecs) " - "-w high_priority_workload (usecs) " - "-v low_priority_workload (usecs) " - "-r (enable RT-CORBA) " - "-n nthreads (low priority thread) " - "-d (dump history) " - "-z (disable low priority) " - "\n", - argv [0]), - 1); - } - - RTServer_Setup rtserver_setup (options.use_rt_corba, - orb, - rt_class, - options.nthreads - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var root_poa = - RIR_Narrow<PortableServer::POA>::resolve (orb, - "RootPOA" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var the_poa (rtserver_setup.poa ()); - - ORB_Task orb_task (orb); - ORB_Task_Activator orb_task_activator (rt_class.priority_high (), - rt_class.thr_sched_class (), - options.nthreads, - &orb_task); - - ACE_DEBUG ((LM_DEBUG, "Finished ORB and POA configuration\n")); - - CORBA::Object_var object = - orb->string_to_object (options.ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Test::Session_Factory_var session_factory = - Test::Session_Factory::_narrow (object.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::PolicyList_var inconsistent_policies; - (void) session_factory->_validate_connection (inconsistent_policies - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - int thread_count = 1 + options.nthreads; - ACE_Barrier the_barrier (thread_count); - - ACE_DEBUG ((LM_DEBUG, "Calibrating high res timer ....")); - ACE_High_Res_Timer::calibrate (); - - ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); - ACE_DEBUG ((LM_DEBUG, "Done (%d)\n", gsf)); - - int per_thread_period = options.low_priority_period; - if (options.global_low_priority_rate) - per_thread_period = options.low_priority_period * options.nthreads; - Low_Priority_Task low_priority (session_factory.in (), - &the_barrier, - the_poa.in (), - per_thread_period); - low_priority.activate (rt_class.thr_sched_class () - | THR_NEW_LWP | THR_JOINABLE, - options.nthreads, 1, - rt_class.priority_low ()); - - High_Priority_Task high_priority (session_factory.in (), - &the_barrier, - the_poa.in (), - options.iterations, - options.high_priority_period); - high_priority.activate (rt_class.thr_sched_class () - | THR_NEW_LWP | THR_JOINABLE, - 1, 1, - rt_class.priority_low ()); - - high_priority.wait (); - low_priority.stop (); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - high prio task joined\n")); - - ACE_Sample_History &history = - high_priority.callback->sample_history (); - if (options.dump_history) - { - history.dump_samples ("HISTORY", gsf); - } - - ACE_Basic_Stats high_priority_stats; - history.collect_basic_stats (high_priority_stats); - high_priority_stats.dump_results ("High Priority", gsf); - - low_priority.wait (); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - all task(s) joined\n")); - - session_factory->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - starting cleanup\n")); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/parameters b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/parameters deleted file mode 100644 index 919cc146b31..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/parameters +++ /dev/null @@ -1,13 +0,0 @@ -NTHREADS="2 4 8 16 32" - -#ITERATIONS=25000 -ITERATIONS=5000 - -#IOR=/project/amras/coryan/IOR/roundtrip.ior -IOR=test.ior - -#REMOTE_HOST=celegorm -REMOTE_HOST=localhost - -#REMOTE_LOCATION=/project/celegorm/coryan/EC_Roundtrip -REMOTE_LOCATION=$PWD diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/realtime.conf b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/realtime.conf deleted file mode 100644 index 3a353fa3bf6..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/realtime.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBPriorityMapping continuous" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/realtime.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/realtime.conf.xml deleted file mode 100644 index c10ec68a86d..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/realtime.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/realtime.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="RT_ORB_Loader" params="-ORBSchedPolicy SCHED_FIFO -ORBPriorityMapping continuous"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/run_test.sh b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/run_test.sh deleted file mode 100755 index 90304e63319..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/run_test.sh +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/sh -# -# $Id$ -# - -. parameters - -for n in $NTHREADS; do - date - echo normal $n - - /bin/rm -f $IOR -# ssh $REMOTE_HOST "cd $REMOTE_LOCATION ;./server -o $IOR -n $n" >server.log 2>&1 </dev/null & - ./server -o $IOR -n $n >server.log 2>&1 </dev/null & - while [ ! -f $IOR ]; do - sleep 1 - done - ./client -d -h 10000 -l 10000 -i $ITERATIONS -n $n -k file://$IOR > normal.$n.txt 2>&1 - - wait - - date - echo realtime $n - /bin/rm -f $IOR -# ssh $REMOTE_HOST "cd $REMOTE_LOCATION ; ./server -ORBSvcConf realtime.conf -r -o $IOR -n $n" >server.log 2>&1 </dev/null & - ./server -ORBSvcConf realtime.conf -r -o $IOR -n $n >server.log 2>&1 </dev/null & - while [ ! -f $IOR ]; do - sleep 1 - done - ./client -ORBSvcConf realtime.conf -r -d -h 10000 -l 10000 -i $ITERATIONS -n $n -k file://$IOR > realtime.$n.txt 2>&1 - - wait - -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/server.cpp b/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/server.cpp deleted file mode 100644 index 59d0eb001d2..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/RTCORBA_Callback/server.cpp +++ /dev/null @@ -1,145 +0,0 @@ -// $Id$ - -#include "Session_Factory.h" - -#include "RT_Class.h" -#include "ORB_Holder.h" -#include "Servant_var.h" -#include "RIR_Narrow.h" -#include "RTServer_Setup.h" -#include "ORB_Task.h" -#include "ORB_Task_Activator.h" - -#include "tao/PortableServer/PortableServer.h" -#include "tao/RTPortableServer/RTPortableServer.h" -#include "tao/Strategies/advanced_resource.h" -#include "tao/Messaging/Messaging.h" -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" - -ACE_RCSID (TAO_PERF_RTEC_RTCORBA_Baseline, - server, - "$Id$") - -const char *ior_output_file = "test.ior"; -int use_rt_corba = 0; -int nthreads = 0; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "o:n:r"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'o': - ior_output_file = get_opts.opt_arg (); - break; - - case 'n': - nthreads = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'r': - use_rt_corba = 1; - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "-o <iorfile> " - "-r (use RT-CORBA) " - "-n nthreads " - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -int main (int argc, char *argv[]) -{ - /// Move the test to the real-time class if it is possible. - RT_Class rt_class; - - ACE_TRY_NEW_ENV - { - ORB_Holder orb (argc, argv, "" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (parse_args (argc, argv) != 0) - return 1; - - RTServer_Setup rtserver_setup (use_rt_corba, - orb, - rt_class, - nthreads - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var root_poa = - RIR_Narrow<PortableServer::POA>::resolve (orb, - "RootPOA" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var the_poa (rtserver_setup.poa ()); - - ORB_Task orb_task (orb); - ORB_Task_Activator orb_task_activator (rt_class.priority_high (), - rt_class.thr_sched_class (), - nthreads, - &orb_task); - - ACE_DEBUG ((LM_DEBUG, "Finished ORB and POA configuration\n")); - - Servant_var<Session_Factory> session_factory ( - new Session_Factory (orb, - the_poa.in ()) - ); - - CORBA::Object_var object = - session_factory->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::String_var ior = - orb->object_to_string (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - // Output the ior to the <ior_output_file> - FILE *output_file = ACE_OS::fopen (ior_output_file, "w"); - if (output_file == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for writing IOR: %s", - ior_output_file), - 1); - ACE_OS::fprintf (output_file, "%s", ior.in ()); - ACE_OS::fclose (output_file); - - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n")); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/Makefile.am b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/Makefile.am deleted file mode 100644 index 6a138d998ad..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/Makefile.am +++ /dev/null @@ -1,116 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -ACE_BUILDDIR = $(top_builddir)/.. -ACE_ROOT = $(top_srcdir)/.. -TAO_BUILDDIR = $(top_builddir) -TAO_ROOT = $(top_srcdir) - -noinst_PROGRAMS = - -## Makefile.Roundtrip_RTEvent_Client.am - -if BUILD_CORBA_MESSAGING -if BUILD_RT_CORBA -if !BUILD_ACE_FOR_TAO -if !BUILD_MINIMUM_CORBA - -noinst_PROGRAMS += client - -client_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs \ - -I$(srcdir)/../lib - -client_SOURCES = \ - client.cpp - -client_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/performance-tests/RTEvent/lib/libTAO_RTEC_Perf.la \ - $(TAO_BUILDDIR)/tao/libTAO_Strategies.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTCORBAEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Serv.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ - $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \ - $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTPortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTCORBA.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_PI.la \ - $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_MINIMUM_CORBA -endif !BUILD_ACE_FOR_TAO -endif BUILD_RT_CORBA -endif BUILD_CORBA_MESSAGING - -## Makefile.Roundtrip_RTEvent_Server.am - -if BUILD_CORBA_MESSAGING -if BUILD_RT_CORBA -if !BUILD_ACE_FOR_TAO -if !BUILD_MINIMUM_CORBA - -noinst_PROGRAMS += server - -server_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs \ - -I$(srcdir)/../lib - -server_SOURCES = \ - server.cpp - -server_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/performance-tests/RTEvent/lib/libTAO_RTEC_Perf.la \ - $(TAO_BUILDDIR)/tao/libTAO_Strategies.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTCORBAEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Serv.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ - $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \ - $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTPortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTCORBA.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_PI.la \ - $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_MINIMUM_CORBA -endif !BUILD_ACE_FOR_TAO -endif BUILD_RT_CORBA -endif BUILD_CORBA_MESSAGING - -## Clean up template repositories, etc. -clean-local: - -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* - -rm -f gcctemp.c gcctemp so_locations *.ics - -rm -rf cxx_repository ptrepository ti_files - -rm -rf templateregistry ir.out - -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/Roundtrip.mpc b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/Roundtrip.mpc deleted file mode 100644 index 1921fed616b..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/Roundtrip.mpc +++ /dev/null @@ -1,30 +0,0 @@ -// $Id$ -project(*RTEvent_Server): orbsvcsexe, rtcorbaevent, strategies, minimum_corba { - after += RTEC_Perf - libs += TAO_RTEC_Perf - - specific (automake) { - includes += $(srcdir)/../lib - } else { - includes += ../lib - } - - Source_Files { - server.cpp - } -} - -project(*RTEvent_Client): orbsvcsexe, rtcorbaevent, strategies, minimum_corba { - after += RTEC_Perf - libs += TAO_RTEC_Perf - - specific (automake) { - includes += $(srcdir)/../lib - } else { - includes += ../lib - } - - Source_Files { - client.cpp - } -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/client.cpp b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/client.cpp deleted file mode 100644 index 5e723b3cca5..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/client.cpp +++ /dev/null @@ -1,231 +0,0 @@ -// $Id$ - -#include "RT_Class.h" -#include "ORB_Holder.h" -#include "Servant_var.h" -#include "RIR_Narrow.h" -#include "RTServer_Setup.h" -#include "Send_Task.h" -#include "Client_Group.h" -#include "ORB_Task.h" -#include "ORB_Task_Activator.h" -#include "Low_Priority_Setup.h" -#include "EC_Destroyer.h" -#include "Client_Options.h" - -#include "orbsvcs/Event_Service_Constants.h" - -#include "tao/Messaging/Messaging.h" -#include "tao/Strategies/advanced_resource.h" -#include "tao/RTCORBA/Priority_Mapping_Manager.h" -#include "tao/RTCORBA/Continuous_Priority_Mapping.h" -#include "tao/RTPortableServer/RTPortableServer.h" -#include "ace/High_Res_Timer.h" -#include "ace/Sample_History.h" -#include "ace/Basic_Stats.h" -#include "ace/Stats.h" -#include "ace/Sched_Params.h" -#include "ace/Barrier.h" - -ACE_RCSID(TAO_RTEC_PERF_Roundtrip, client, "$Id$") - -int main (int argc, char *argv[]) -{ - const CORBA::Long experiment_id = 1; - - RT_Class rt_class; - - ACE_TRY_NEW_ENV - { - ORB_Holder orb (argc, argv, "" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Client_Options options (argc, argv); - if (argc != 1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Usage: %s " - "-i iterations (iterations) " - "-h high_priority_period (usecs) " - "-l low_priority_period (usecs) " - "-w high_priority_workload (usecs) " - "-v low_priority_workload (usecs) " - "-r (enable RT-CORBA) " - "-n nthreads (low priority thread) " - "-d (dump history) " - "-z (disable low priority) " - "\n", - argv [0]), - 1); - } - - RTServer_Setup rtserver_setup (options.use_rt_corba, - orb, - rt_class, - 1 // options.nthreads - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var root_poa = - RIR_Narrow<PortableServer::POA>::resolve (orb, - "RootPOA" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var the_poa (rtserver_setup.poa ()); - - ACE_Thread_Manager my_thread_manager; - - ORB_Task orb_task (orb); - orb_task.thr_mgr (&my_thread_manager); - ORB_Task_Activator orb_task_activator (rt_class.priority_high (), - rt_class.thr_sched_class (), - 1, - &orb_task); - - ACE_DEBUG ((LM_DEBUG, "Finished ORB and POA configuration\n")); - - CORBA::Object_var object = - orb->string_to_object (options.ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - RtecEventChannelAdmin::EventChannel_var ec = - RtecEventChannelAdmin::EventChannel::_narrow (object.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - EC_Destroyer ec_destroyer (ec.in ()); - - CORBA::PolicyList_var inconsistent_policies; - (void) ec->_validate_connection (inconsistent_policies - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "Found EC, validated connection\n")); - - int thread_count = 1 + options.nthreads; - - ACE_Barrier the_barrier (thread_count); - - ACE_DEBUG ((LM_DEBUG, "Calibrating high res timer ....")); - ACE_High_Res_Timer::calibrate (); - - ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); - ACE_DEBUG ((LM_DEBUG, "Done (%d)\n", gsf)); - - CORBA::Long event_range = 1; - if (options.funky_supplier_publication) - { - if (options.unique_low_priority_event) - event_range = 1 + options.low_priority_consumers; - else - event_range = 2; - } - - Client_Group high_priority_group; - high_priority_group.init (experiment_id, - ACE_ES_EVENT_UNDEFINED, - event_range, - options.iterations, - options.high_priority_workload, - gsf, - the_poa.in (), - the_poa.in ()); - - Auto_Disconnect<Client_Group> high_priority_disconnect; - - if (!options.high_priority_is_last) - { - high_priority_group.connect (ec.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - high_priority_disconnect = &high_priority_group; - } - - int per_thread_period = options.low_priority_period; - if (options.global_low_priority_rate) - per_thread_period = options.low_priority_period * options.nthreads; - - Low_Priority_Setup<Client_Group> low_priority_setup ( - options.low_priority_consumers, - 0, // no limit on the number of iterations - options.unique_low_priority_event, - experiment_id, - ACE_ES_EVENT_UNDEFINED + 2, - options.low_priority_workload, - gsf, - options.nthreads, - rt_class.priority_low (), - rt_class.thr_sched_class (), - per_thread_period, - the_poa.in (), - the_poa.in (), - ec.in (), - &the_barrier - ACE_ENV_ARG_PARAMETER); - - if (options.high_priority_is_last) - { - high_priority_group.connect (ec.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - high_priority_disconnect = &high_priority_group; - } - Send_Task high_priority_task; - high_priority_task.init (options.iterations, - options.high_priority_period, - 0, - ACE_ES_EVENT_UNDEFINED, - experiment_id, - high_priority_group.supplier (), - &the_barrier); - high_priority_task.thr_mgr (&my_thread_manager); - { - // Artificial scope to wait for the high priority task... - Task_Activator<Send_Task> high_priority_act (rt_class.priority_high (), - rt_class.thr_sched_class (), - 1, - &high_priority_task); - } - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - high priority task completed\n")); - - low_priority_setup.stop_all_threads (); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - low priority task(s) stopped\n")); - - ACE_Sample_History &history = - high_priority_group.consumer ()->sample_history (); - if (options.dump_history) - { - history.dump_samples ("HISTORY", gsf); - } - - ACE_Basic_Stats high_priority_stats; - history.collect_basic_stats (high_priority_stats); - high_priority_stats.dump_results ("High Priority", gsf); - - ACE_Basic_Stats low_priority_stats; - low_priority_setup.collect_basic_stats (low_priority_stats); - low_priority_stats.dump_results ("Low Priority", gsf); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - starting cleanup\n")); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_reactive.conf b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_reactive.conf deleted file mode 100644 index 3c107d1ba17..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_reactive.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECDispatching reactive" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_reactive.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_reactive.conf.xml deleted file mode 100644 index f74abe683cf..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_reactive.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_reactive.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECDispatching reactive"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_rtcorba.conf b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_rtcorba.conf deleted file mode 100644 index 3a353fa3bf6..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_rtcorba.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO -ORBPriorityMapping continuous" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_rtcorba.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_rtcorba.conf.xml deleted file mode 100644 index cad852179de..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_rtcorba.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_rtcorba.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="RT_ORB_Loader" params="-ORBSchedPolicy SCHED_FIFO -ORBPriorityMapping continuous"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_threaded.conf b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_threaded.conf deleted file mode 100644 index 3d04d8461d0..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_threaded.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECDispatching mt -ECDispatchingThreads 2" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_threaded.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_threaded.conf.xml deleted file mode 100644 index 2ad5c61621a..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_threaded.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Roundtrip/ec.dispatching_threaded.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECDispatching mt -ECDispatchingThreads 2"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_copy_on_read.conf b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_copy_on_read.conf deleted file mode 100644 index 49c7ad0b504..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_copy_on_read.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:copy_on_read:list -ECProxyPushSupplierCollection mt:copy_on_read:list -ECSupplierFilter null" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_copy_on_read.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_copy_on_read.conf.xml deleted file mode 100644 index 72146ccc298..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_copy_on_read.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_copy_on_read.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:copy_on_read:list -ECProxyPushSupplierCollection mt:copy_on_read:list -ECSupplierFilter null"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_copy_on_write.conf b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_copy_on_write.conf deleted file mode 100644 index 691efd9c506..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_copy_on_write.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECSupplierFilter null" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_copy_on_write.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_copy_on_write.conf.xml deleted file mode 100644 index 73a63bf5ba9..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_copy_on_write.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_copy_on_write.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list -ECSupplierFilter null"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_delayed.conf b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_delayed.conf deleted file mode 100644 index f49ae54a94a..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_delayed.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:delayed:list -ECProxyPushSupplierCollection mt:delayed:list -ECSupplierFilter null" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_delayed.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_delayed.conf.xml deleted file mode 100644 index b2461181885..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_delayed.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_delayed.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:delayed:list -ECProxyPushSupplierCollection mt:delayed:list -ECSupplierFilter null"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_immediate.conf b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_immediate.conf deleted file mode 100644 index 50aa86ff59a..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_immediate.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:immediate:list -ECProxyPushSupplierCollection mt:immediate:list -ECSupplierFilter null" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_immediate.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_immediate.conf.xml deleted file mode 100644 index 37ab7100c94..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_immediate.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Roundtrip/ec.locking_immediate.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:immediate:list -ECProxyPushSupplierCollection mt:immediate:list -ECSupplierFilter null"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.supplier_filter_null.conf b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.supplier_filter_null.conf deleted file mode 100644 index b187ff3ed6b..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.supplier_filter_null.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECSupplierFilter null" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.supplier_filter_null.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.supplier_filter_null.conf.xml deleted file mode 100644 index 5d41dbe8e18..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.supplier_filter_null.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Roundtrip/ec.supplier_filter_null.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECSupplierFilter null"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.supplier_filter_per_supplier.conf b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.supplier_filter_per_supplier.conf deleted file mode 100644 index e578b42e926..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.supplier_filter_per_supplier.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECSupplierFilter per-supplier" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.supplier_filter_per_supplier.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.supplier_filter_per_supplier.conf.xml deleted file mode 100644 index 81245d1f970..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/ec.supplier_filter_per_supplier.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Roundtrip/ec.supplier_filter_per_supplier.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECSupplierFilter per-supplier"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/parameters b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/parameters deleted file mode 100644 index bc36f6531b7..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/parameters +++ /dev/null @@ -1,19 +0,0 @@ -NTHREADS="16" - -NCONSUMERS="32 64 96 128 160 192 224 256 288 320 352 384 416 448 480 512" - -ITERATIONS=25000 -#ITERATIONS=3000 - -LOCKING_TYPES="copy_on_read copy_on_write delayed" -DISPATCHING_TYPES="threaded reactive rtcorba" -FILTER_TYPES="null per_supplier" - -#IOR=/project/amras/coryan/IOR/roundtrip.ior -IOR=test.ior - -#REMOTE_HOST=celegorm -REMOTE_HOST=localhost - -#REMOTE_LOCATION=/project/celegorm/coryan/EC_Roundtrip -REMOTE_LOCATION=$PWD diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/roundtrip.conf b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/roundtrip.conf deleted file mode 100644 index b0e36ffb28b..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/roundtrip.conf +++ /dev/null @@ -1,2 +0,0 @@ -# $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list" diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/roundtrip.conf.xml b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/roundtrip.conf.xml deleted file mode 100644 index 3c6656cc873..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/roundtrip.conf.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version='1.0'?> -<!-- Converted from ./orbsvcs/performance-tests/RTEvent/Roundtrip/roundtrip.conf by svcconf-convert.pl --> -<ACE_Svc_Conf> - <!-- $Id$ --> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:copy_on_write:list -ECProxyPushSupplierCollection mt:copy_on_write:list"/> -</ACE_Svc_Conf> diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/run_dispatching.sh b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/run_dispatching.sh deleted file mode 100755 index 4414a4ebf64..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/run_dispatching.sh +++ /dev/null @@ -1,47 +0,0 @@ -#! /bin/sh -# -# $Id$ -# - -LOW_PRIORITY="1 5 10 15 20 15 30 35 40 45 50" -#" 60 70 80 90 100 110 120 130 140 150 160" - -#IOR=/project/amras/coryan/IOR/roundtrip.ior -IOR=test.ior - -for c in $LOW_PRIORITY; do -# date -# echo reactive $c -# -# /bin/rm -f $IOR -# ssh celegorm "cd /project/celegorm/coryan/EC_Roundtrip ; ./server -ORBSvcConf ec.dispatching_reactive.conf -o $IOR" >server.log 2>&1 </dev/null & -# while [ ! -f $IOR ]; do -# sleep 1 -# done -# ./client -d -h 1000 -l 2000 -i 500 -n $c -k file://$IOR > ec_dispatching_reactive.$c.txt 2>&1 -# wait -# -# date -# echo threaded $c -# -# /bin/rm -f $IOR -# ssh celegorm "cd /project/celegorm/coryan/EC_Roundtrip ; ./server -ORBSvcConf ec.dispatching_threaded.conf -o $IOR" >server.log 2>&1 </dev/null & -# while [ ! -f $IOR ]; do -# sleep 1 -# done -# ./client -d -h 1000 -l 2000 -i 500 -n $c -k file://$IOR > ec_dispatching_threaded.$c.txt 2>&1 -# wait - - date - echo rtcorba $c - - /bin/rm -f $IOR -# ssh celegorm "cd /project/celegorm/coryan/EC_Roundtrip ; ./server -ORBSvcConf ec.dispatching_rtcorba.conf -r -o $IOR" >server.log 2>&1 </dev/null & - ./server -ORBSvcConf ec.dispatching_rtcorba.conf -r -o $IOR" >server.log 2>&1 </dev/null & - while [ ! -f $IOR ]; do - sleep 1 - done - ./client -ORBSvcConf ec.dispatching_rtcorba.conf -r -d -h 1000 -l 2000 -i 500 -n $c -k file://$IOR > ec_dispatching_rtcorba.$c.txt 2>&1 - wait - -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/run_locking.sh b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/run_locking.sh deleted file mode 100755 index c2a9855bbdf..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/run_locking.sh +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/sh -# -# $Id$ -# - -. parameters - -for n in $NTHREADS; do - for c in $NCONSUMERS; do - for t in $LOCKING_TYPES; do - date - echo $t $c $n - - /bin/rm -f $IOR -# ssh $REMOTE_HOST "cd $REMOTE_LOCATION ; ./server -ORBSvcConf ec.locking_${t}.conf -r -o $IOR" >server.log 2>&1 </dev/null & - ./server -ORBSvcConf ec.locking_${t}.conf -o $IOR -n $n >server.log 2>&1 </dev/null & - while [ ! -f $IOR ]; do - sleep 1 - done - ./client -d -u -h 10000 -l 10000 -i $ITERATIONS -c $c -n $n -k file://$IOR > ec_locking.${t}.$c.txt 2>&1 - - wait - done - done -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/run_roundtrip.sh b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/run_roundtrip.sh deleted file mode 100755 index ca94f25d439..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/run_roundtrip.sh +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh -# -# $Id$ -# - -. parameters - -for c in $NCONSUMERS; do - - date - echo $t $c $n - - /bin/rm -f $IOR -# ssh $REMOTE_HOST "cd $REMOTE_LOCATION ; ./server -ORBSvcConf ec.locking_${t}.conf -r -o $IOR" >server.log 2>&1 </dev/null & - ./server -ORBSvcConf roundtrip.conf -o $IOR -n 4 >server.log 2>&1 </dev/null & - while [ ! -f $IOR ]; do - sleep 1 - done - ./client -d -u -h 10000 -l 10000 -i $ITERATIONS -c $c -n 0 -k file://$IOR > ec_roundtrip.$c.txt 2>&1 - - wait -done diff --git a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/server.cpp b/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/server.cpp deleted file mode 100644 index 8c7d83af31a..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/Roundtrip/server.cpp +++ /dev/null @@ -1,168 +0,0 @@ -// $Id$ - -#include "RT_Class.h" -#include "ORB_Holder.h" -#include "Servant_var.h" -#include "RIR_Narrow.h" -#include "RTEC_Initializer.h" -#include "RTServer_Setup.h" -#include "ORB_Task.h" -#include "ORB_Task_Activator.h" - -#include "orbsvcs/Event/EC_Event_Channel.h" -#include "orbsvcs/Event/EC_Default_Factory.h" - -#include "tao/PortableServer/PortableServer.h" -#include "tao/RTPortableServer/RTPortableServer.h" -#include "tao/Strategies/advanced_resource.h" -#include "tao/Messaging/Messaging.h" -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" - -ACE_RCSID (TAO_PERF_RTEC_Roundtrip, - server, - "$Id$") - -const char *ior_output_file = "test.ior"; -int use_rt_corba = 0; -int nthreads = 0; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "o:n:r"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'o': - ior_output_file = get_opts.opt_arg (); - break; - - case 'n': - nthreads = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'r': - use_rt_corba = 1; - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "-o <iorfile> " - "-r (use RT-CORBA) " - "-n nthreads " - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -int main (int argc, char *argv[]) -{ - TAO_EC_Default_Factory::init_svcs (); - - /// Move the test to the real-time class if it is possible. - RT_Class rt_class; - - ACE_TRY_NEW_ENV - { - ORB_Holder orb (argc, argv, "" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (parse_args (argc, argv) != 0) - return 1; - - RTServer_Setup rtserver_setup (use_rt_corba, - orb, - rt_class, - nthreads - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var root_poa = - RIR_Narrow<PortableServer::POA>::resolve (orb, - "RootPOA" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var ec_poa (rtserver_setup.poa ()); - - ORB_Task orb_task (orb); - ORB_Task_Activator orb_task_activator (rt_class.priority_high (), - rt_class.thr_sched_class (), - nthreads, - &orb_task); - - ACE_DEBUG ((LM_DEBUG, "Finished ORB and POA configuration\n")); - - Servant_var<TAO_EC_Event_Channel> ec_impl ( - RTEC_Initializer::create (ec_poa.in (), - ec_poa.in (), - rtserver_setup.rtcorba_setup () - ACE_ENV_ARG_PARAMETER) - ); - ACE_TRY_CHECK; - - ec_impl->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::ObjectId_var ec_id = - ec_poa->activate_object (ec_impl.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - CORBA::Object_var ec_object = - ec_poa->id_to_reference (ec_id.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - RtecEventChannelAdmin::EventChannel_var ec = - RtecEventChannelAdmin::EventChannel::_narrow (ec_object.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::String_var ior = - orb->object_to_string (ec.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - // Output the ior to the <ior_output_file> - FILE *output_file = ACE_OS::fopen (ior_output_file, "w"); - if (output_file == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for writing IOR: %s", - ior_output_file), - 1); - ACE_OS::fprintf (output_file, "%s", ior.in ()); - ACE_OS::fclose (output_file); - - do { - ACE_Time_Value tv (1, 0); - orb->run (tv ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } while (ec_impl->destroyed () == 0); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n")); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/TCP_Baseline/Makefile.am b/TAO/orbsvcs/performance-tests/RTEvent/TCP_Baseline/Makefile.am deleted file mode 100644 index ce147a0d92d..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/TCP_Baseline/Makefile.am +++ /dev/null @@ -1,116 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -ACE_BUILDDIR = $(top_builddir)/.. -ACE_ROOT = $(top_srcdir)/.. -TAO_BUILDDIR = $(top_builddir) -TAO_ROOT = $(top_srcdir) - -noinst_PROGRAMS = - -## Makefile.TCP_Baseline_Client.am - -if BUILD_CORBA_MESSAGING -if BUILD_RT_CORBA -if !BUILD_ACE_FOR_TAO -if !BUILD_MINIMUM_CORBA - -noinst_PROGRAMS += client - -client_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs \ - -I$(srcdir)/../lib - -client_SOURCES = \ - client.cpp - -client_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/performance-tests/RTEvent/lib/libTAO_RTEC_Perf.la \ - $(TAO_BUILDDIR)/tao/libTAO_Strategies.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTCORBAEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Serv.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ - $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \ - $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTPortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTCORBA.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_PI.la \ - $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_MINIMUM_CORBA -endif !BUILD_ACE_FOR_TAO -endif BUILD_RT_CORBA -endif BUILD_CORBA_MESSAGING - -## Makefile.TCP_Baseline_Server.am - -if BUILD_CORBA_MESSAGING -if BUILD_RT_CORBA -if !BUILD_ACE_FOR_TAO -if !BUILD_MINIMUM_CORBA - -noinst_PROGRAMS += server - -server_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs \ - -I$(srcdir)/../lib - -server_SOURCES = \ - server.cpp - -server_LDADD = \ - $(TAO_BUILDDIR)/orbsvcs/performance-tests/RTEvent/lib/libTAO_RTEC_Perf.la \ - $(TAO_BUILDDIR)/tao/libTAO_Strategies.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTCORBAEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Serv.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \ - $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \ - $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \ - $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTPortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_RTCORBA.la \ - $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \ - $(TAO_BUILDDIR)/tao/libTAO_PI.la \ - $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \ - $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \ - $(TAO_BUILDDIR)/tao/libTAO.la \ - $(ACE_BUILDDIR)/ace/libACE.la - -endif !BUILD_MINIMUM_CORBA -endif !BUILD_ACE_FOR_TAO -endif BUILD_RT_CORBA -endif BUILD_CORBA_MESSAGING - -## Clean up template repositories, etc. -clean-local: - -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* - -rm -f gcctemp.c gcctemp so_locations *.ics - -rm -rf cxx_repository ptrepository ti_files - -rm -rf templateregistry ir.out - -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/TAO/orbsvcs/performance-tests/RTEvent/TCP_Baseline/TCP_Baseline.mpc b/TAO/orbsvcs/performance-tests/RTEvent/TCP_Baseline/TCP_Baseline.mpc deleted file mode 100644 index bded52788ee..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/TCP_Baseline/TCP_Baseline.mpc +++ /dev/null @@ -1,30 +0,0 @@ -// $Id$ -project(*server): orbsvcsexe, rtcorbaevent, strategies, minimum_corba { - after += RTEC_Perf - libs += TAO_RTEC_Perf - - specific (automake) { - includes += $(srcdir)/../lib - } else { - includes += ../lib - } - - Source_Files { - server.cpp - } -} - -project(*client): orbsvcsexe, rtcorbaevent, strategies, minimum_corba { - after += RTEC_Perf - libs += TAO_RTEC_Perf - - specific (automake) { - includes += $(srcdir)/../lib - } else { - includes += ../lib - } - - Source_Files { - client.cpp - } -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/TCP_Baseline/client.cpp b/TAO/orbsvcs/performance-tests/RTEvent/TCP_Baseline/client.cpp deleted file mode 100644 index 8c36cbd0349..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/TCP_Baseline/client.cpp +++ /dev/null @@ -1,318 +0,0 @@ -// $Id$ - -#include "RT_Class.h" -#include "Client_Options.h" - -#include "ace/High_Res_Timer.h" -#include "ace/Sample_History.h" -#include "ace/Basic_Stats.h" -#include "ace/Stats.h" -#include "ace/SOCK_Stream.h" -#include "ace/SOCK_Connector.h" -#include "ace/Get_Opt.h" -#include "ace/Task.h" -#include "ace/Barrier.h" -#include "ace/OS_NS_unistd.h" - -ACE_RCSID (TAO_RTEC_PERF_TCP_Baseline, - client, - "$Id$") - -char const * hi_endpoint = "localhost:12345"; -char const * lo_endpoint = "localhost:23456"; - -int -parse_args (int argc, char *argv[]); - -class Scavenger_Task : public ACE_Task_Base -{ -public: - Scavenger_Task (char const * endpoint, - ACE_Barrier * the_barrier, - int period_in_usecs); - - void stop(void); - - virtual int svc (); - -private: - char const * endpoint_; - ACE_Barrier * the_barrier_; - int period_in_usecs_; - ACE_SYNCH_MUTEX mutex_; - int stopped_; -}; - -class Measuring_Task : public ACE_Task_Base -{ -public: - Measuring_Task (char const * endpoint, - ACE_Barrier *the_barrier, - int iterations, - int period_in_usecs); - - virtual int svc(); - - ACE_Sample_History sample_history; - -private: - char const * endpoint_; - ACE_Barrier * the_barrier_; - int iterations_; - int period_in_usecs_; -}; - -int main (int argc, char *argv[]) -{ - RT_Class rt_class; - - Client_Options options (argc, argv); - - if (parse_args (argc, argv) != 0) - return 1; - - ACE_DEBUG ((LM_DEBUG, "Calibrating high res timer ....")); - ACE_High_Res_Timer::calibrate (); - - ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); - ACE_DEBUG ((LM_DEBUG, "Done (%d)\n", gsf)); - - int thread_count = 1 + options.nthreads; - ACE_Barrier the_barrier (thread_count); - - int per_thread_period = options.low_priority_period; - if (options.global_low_priority_rate) - per_thread_period = options.low_priority_period * options.nthreads; - - Scavenger_Task lo_task (lo_endpoint, &the_barrier, - per_thread_period); - lo_task.activate (rt_class.thr_sched_class () | THR_NEW_LWP | THR_JOINABLE, - options.nthreads, 1, - rt_class.priority_low ()); - - Measuring_Task hi_task (hi_endpoint, &the_barrier, - options.iterations, - options.high_priority_period); - hi_task.activate (rt_class.thr_sched_class () | THR_NEW_LWP | THR_JOINABLE, - 1, 1, - rt_class.priority_low ()); - - hi_task.wait (); - lo_task.stop (); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - high prio task joined\n")); - - ACE_Sample_History &history = hi_task.sample_history; - if (options.dump_history) - { - history.dump_samples ("HISTORY", gsf); - } - - ACE_Basic_Stats high_priority_stats; - history.collect_basic_stats (high_priority_stats); - high_priority_stats.dump_results ("High Priority", gsf); - - lo_task.wait (); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - all task(s) joined\n")); - - return 0; -} - -// **************************************************************** - -Scavenger_Task::Scavenger_Task(char const * endpoint, - ACE_Barrier * the_barrier, - int period_in_usecs) - : endpoint_ (endpoint) - , the_barrier_ (the_barrier) - , period_in_usecs_ (period_in_usecs) - , mutex_ () - , stopped_ (0) -{ -} - -void -Scavenger_Task::stop(void) -{ - ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->mutex_); - this->stopped_ = 1; -} - -int -Scavenger_Task::svc(void) -{ - this->the_barrier_->wait (); - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting scavenger thread\n")); - - ACE_SOCK_Stream stream; - { - ACE_INET_Addr remote_sap (this->endpoint_); - ACE_SOCK_Connector connector; - - if (connector.connect(stream, remote_sap) == -1) - { - ACE_ERROR((LM_ERROR, "Cannot connect to <%s>\n", endpoint_)); - return -1; - } - } - - for (;;) - { - ACE_Time_Value period (0, this->period_in_usecs_); - ACE_OS::sleep (period); - - { - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->mutex_, -1); - if (this->stopped_) - break; - } - ACE_hrtime_t start = ACE_OS::gethrtime (); - ssize_t n = stream.send_n(&start, sizeof(start)); - if (n == 0 || n == -1) - break; - - ACE_hrtime_t end; - n = stream.recv(&end, sizeof(end)); - if (n == 0 || n == -1) - break; - - if (start != end) - { - ACE_ERROR((LM_ERROR, - "Mismatched response from <%s>\n", endpoint_)); - break; - } - - } - stream.close(); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Finishing scavenger thread\n")); - return 0; -} - -// **************************************************************** - -Measuring_Task::Measuring_Task (char const * endpoint, - ACE_Barrier * the_barrier, - int iterations, - int period_in_usecs) - : sample_history (iterations) - , endpoint_(endpoint) - , the_barrier_(the_barrier) - , iterations_ (iterations) - , period_in_usecs_ (period_in_usecs) -{ -} - -int -Measuring_Task::svc () -{ - this->the_barrier_->wait (); - - ACE_SOCK_Stream stream; - { - ACE_INET_Addr remote_sap (this->endpoint_); - ACE_SOCK_Connector connector; - - if (connector.connect(stream, remote_sap) == -1) - { - ACE_ERROR((LM_ERROR, "Cannot connect to <%s>\n", endpoint_)); - return -1; - } - } - - for (int i = 0; i != this->iterations_; ++i) - { - ACE_Time_Value period (0, this->period_in_usecs_); - ACE_OS::sleep (period); - - ACE_hrtime_t start = ACE_OS::gethrtime (); - ssize_t n = stream.send_n(&start, sizeof(start)); - if (n == 0) { - ACE_ERROR((LM_ERROR, - "Connection closed while writing data to server <%s>\n", - endpoint_, "")); - break; - } else if (n == -1) { - ACE_ERROR((LM_ERROR, - "Error writing data to server <%s> %p\n", - endpoint_, "")); - break; - } - if (n == 0 || n == -1) - { - ACE_ERROR((LM_ERROR, - "Error sending data to server <%s>\n", endpoint_)); - break; - } - - ACE_hrtime_t end; - n = stream.recv_n(&end, sizeof(end)); - if (n == 0) { - ACE_ERROR((LM_ERROR, - "Connection closed while reading data from server <%s>\n", - endpoint_, "")); - break; - } else if (n == -1) { - ACE_ERROR((LM_ERROR, - "Error reading data from server <%s> %p\n", - endpoint_, "")); - break; - } - - if (start != end) - { - ACE_ERROR((LM_ERROR, - "Mismatched response from <%s>\n", endpoint_)); - return -1; - } - ACE_hrtime_t elapsed = ACE_OS::gethrtime () - start; - - this->sample_history.sample (elapsed); - } - - stream.close(); - - return 0; -} - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "H:L:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'H': - hi_endpoint = get_opts.opt_arg (); - break; - - case 'L': - lo_endpoint = get_opts.opt_arg (); - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "Usage: %s " - "-i iterations (iterations) " - "-h high_priority_period (usecs) " - "-l low_priority_period (usecs) " - "-w high_priority_workload (usecs) " - "-v low_priority_workload (usecs) " - "-r (enable RT-CORBA) " - "-n nthreads (low priority thread) " - "-d (dump history) " - "-z (disable low priority) " - "-H hi_endpoint " - "-L lo_endpoint " - "\n", - argv [0]), - 1); - } - // Indicates sucessful parsing of the command line - return 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/TCP_Baseline/server.cpp b/TAO/orbsvcs/performance-tests/RTEvent/TCP_Baseline/server.cpp deleted file mode 100644 index dcbfac08567..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/TCP_Baseline/server.cpp +++ /dev/null @@ -1,203 +0,0 @@ -// $Id$ - -#include "RT_Class.h" - -#include "ace/Task.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/SOCK_Stream.h" -#include "ace/Acceptor.h" -#include "ace/Svc_Handler.h" -#include "ace/Reactor.h" -#include "ace/TP_Reactor.h" -#include "ace/Get_Opt.h" - -ACE_RCSID (TAO_PERF_RTEC_TCP_Baseline, - server, - "$Id$") - -int use_rt = 0; -int nthreads = 1; -char const * hi_endpoint = "localhost:12345"; -char const * lo_endpoint = "localhost:23456"; - -int -parse_args (int argc, char *argv[]); - -class Task : public ACE_Task_Base -{ -public: - Task(char const * endpoint); - - virtual int svc(); - -private: - char const * endpoint_; - - ACE_Reactor reactor_; -}; - -int main (int argc, char *argv[]) -{ - /// Move the test to the real-time class if it is possible. - RT_Class rt_class; - - if (parse_args (argc, argv) != 0) - return 1; - - Task hi_task(hi_endpoint); - Task lo_task(lo_endpoint); - - hi_task.activate(rt_class.thr_sched_class() | THR_NEW_LWP | THR_JOINABLE, - 1, 1, rt_class.priority_high()); - - lo_task.activate(rt_class.thr_sched_class() | THR_NEW_LWP | THR_JOINABLE, - nthreads, 1, rt_class.priority_low()); - lo_task.wait(); - - hi_task.wait(); - - return 0; -} - -// **************************************************************** - -class Svc_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_SYNCH> -{ -public: - Svc_Handler(ACE_Reactor * reactor = 0); - - virtual int handle_input(ACE_HANDLE); - virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); -}; - -typedef ACE_Acceptor<Svc_Handler,ACE_SOCK_ACCEPTOR> Acceptor; - -Svc_Handler::Svc_Handler (ACE_Reactor * reactor) - : ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_SYNCH> (0, 0, reactor) -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Accepted connection\n")); -} - -int -Svc_Handler::handle_input(ACE_HANDLE h) -{ - const size_t bufsize = BUFSIZ; - char buf[bufsize]; - - while(1) - { - ssize_t n = this->peer().recv(buf, bufsize); - if (n == 0) { - ACE_ERROR((LM_ERROR, - "Connection %d closed while reading data\n", - h, "")); - break; - } else if (n == -1) { - if(errno == EWOULDBLOCK) - return 0; - - ACE_ERROR((LM_ERROR, - "Error on <%d> while reading %p\n", - h, "")); - break; - } - - ssize_t k = this->peer().send(buf, n); - if(k == 0) { - ACE_ERROR((LM_ERROR, - "Connection <%d> closed while writing\n", - h, "")); - break; - } else if (k == -1) { - if(errno == EWOULDBLOCK) - return 0; - - ACE_ERROR((LM_ERROR, - "Error on <%d> while writing %p\n", - h, "")); - break; - } else if (k != n) { - ACE_ERROR((LM_ERROR, - "Short write on <%d>\n", - h, "")); - break; - } - } - - return -1; -} - -int -Svc_Handler::handle_close(ACE_HANDLE h, ACE_Reactor_Mask m) -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Closed connection\n")); - this->peer().close(); - int r = - this->ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_SYNCH>::handle_close (h,m); - return r; -} - -// **************************************************************** - -Task::Task(char const * endpoint) - : endpoint_(endpoint) - , reactor_(new ACE_TP_Reactor) -{ - ACE_INET_Addr local_sap(endpoint_); - Acceptor * acceptor = new Acceptor; - - if(acceptor->open(local_sap, &reactor_, ACE_NONBLOCK) == -1) - { - ACE_ERROR((LM_ERROR, "Cannot open endpoint <%s>\n", endpoint_)); - } -} - -int -Task::svc() -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting thread for %s\n", endpoint_)); - (void) reactor_.run_reactor_event_loop(); - return 0; -} - -// **************************************************************** - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "h:l:n:r"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'h': - hi_endpoint = get_opts.opt_arg (); - break; - - case 'l': - lo_endpoint = get_opts.opt_arg (); - break; - - case 'n': - nthreads = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'r': - use_rt = 1; - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "-o <iorfile> " - "-r (use RT-CORBA) " - "-n nthreads " - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Auto_Disconnect.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Auto_Disconnect.cpp deleted file mode 100644 index 5acd660e5c4..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Auto_Disconnect.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @file Auto_Disconnect.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ -#ifndef TAO_PERF_RTEC_AUTO_DISCONNECT_CPP -#define TAO_PERF_RTEC_AUTO_DISCONNECT_CPP - -#include "Auto_Disconnect.h" - -#if !defined(__ACE_INLINE__) -#include "Auto_Disconnect.inl" -#endif /* __ACE_INLINE__ */ - -template<class Client> Auto_Disconnect<Client>& -Auto_Disconnect<Client>::operator= (Client *client) -{ - this->reset(client); - return *this; -} - -#endif /* TAO_PERF_RTEC_AUTO_DISCONNECT_CPP */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Auto_Disconnect.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Auto_Disconnect.h deleted file mode 100644 index 6cb1a65d988..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Auto_Disconnect.h +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @file Auto_Disconnect.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ -#ifndef TAO_PERF_RTEC_AUTO_DISCONNECT_H -#define TAO_PERF_RTEC_AUTO_DISCONNECT_H - -#include "tao/corba.h" -#include "ace/Auto_Functor.h" - -/** - * @class Disconnect - * - * @brief Helper functor to call the disconnect() method of a class. - */ -template<class Client> -class Disconnect -{ -public: - void operator() (Client *client); -}; - -/** - * @class Auto_Disconnect - * - * @brief Automatically invoke the disconnect() operation on some - * RTEC client. - */ -template<class Client> -class Auto_Disconnect : public ACE_Utils::Auto_Functor<Client,Disconnect<Client> > -{ -public: - /// Constructor - /** - * @param client The client - */ - explicit Auto_Disconnect (Client *s = 0); - - /// Assignment operator - Auto_Disconnect<Client>& operator= (Client *client); -}; - -#if defined(__ACE_INLINE__) -#include "Auto_Disconnect.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Auto_Disconnect.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#endif /* TAO_PERF_RTEC_AUTO_DISCONNECT_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Auto_Disconnect.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/Auto_Disconnect.inl deleted file mode 100644 index 3a09d5c68cf..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Auto_Disconnect.inl +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @file Auto_Disconnect.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ -#include "ace/CORBA_macros.h" - -template<class Client> ACE_INLINE void -Disconnect<Client>::operator () (Client *client) -{ - ACE_DECLARE_NEW_ENV; - ACE_TRY - { - client->disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY { }; - ACE_ENDTRY; -} - -template<class Client> ACE_INLINE -Auto_Disconnect<Client>::Auto_Disconnect (Client *client) - : ACE_Utils::Auto_Functor<Client,Disconnect<Client> > (client) -{ -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Group.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Group.cpp deleted file mode 100644 index 7daaf4ae6b4..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Group.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @file Client_Group.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "Client_Group.h" -#include "Auto_Disconnect.h" - -#if !defined(__ACE_INLINE__) -#include "Client_Group.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - Client_Group, - "$Id$") - -void -Client_Group::init (CORBA::Long experiment_id, - CORBA::Long base_event_type, - CORBA::ULong iterations, - CORBA::Long workload_in_usecs, - ACE_UINT32 gsf, - PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa) -{ - this->init (experiment_id, base_event_type, 1, - iterations, workload_in_usecs, gsf, - supplier_poa, consumer_poa); -} - -void -Client_Group::init (CORBA::Long experiment_id, - CORBA::Long base_event_type, - CORBA::Long event_type_range, - CORBA::ULong iterations, - CORBA::Long workload_in_usecs, - ACE_UINT32 gsf, - PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa) -{ - this->client_pair_.init (experiment_id, - base_event_type, - event_type_range, - iterations, - workload_in_usecs, - gsf, - supplier_poa, - consumer_poa); - this->loopback_pair_.init (experiment_id, base_event_type, - supplier_poa, consumer_poa); -} - -void -Client_Group::connect (RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) -{ - this->client_pair_.connect (ec ACE_ENV_ARG_PARAMETER); - Auto_Disconnect<Client_Pair> client_pair_disconnect (&this->client_pair_); - - this->loopback_pair_.connect (ec ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - Auto_Disconnect<Loopback_Pair> loopback_pair_disconnect (&this->loopback_pair_); - - loopback_pair_disconnect.release (); - client_pair_disconnect.release (); -} - -void -Client_Group::disconnect (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) -{ - Auto_Disconnect<Client_Pair> client_pair_disconnect (&this->client_pair_); - Auto_Disconnect<Loopback_Pair> loopback_pair_disconnect (&this->loopback_pair_); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Group.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Group.h deleted file mode 100644 index ef93ba153c1..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Group.h +++ /dev/null @@ -1,101 +0,0 @@ -/** - * @file Client_Group.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_CLIENT_GROUP_H -#define TAO_PERF_RTEC_CLIENT_GROUP_H - -#include "Servant_var.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "Client_Pair.h" -#include "Loopback_Pair.h" - -/** - * @class Client_Group - * - * @brief Simplify the initialization of a Supplier/Consumer pair - * connected through a Loopback. - */ -class TAO_RTEC_Perf_Export Client_Group -{ -public: - /// Constructor - /** - * We need a default constructor because this class is often used in - * arrays. - */ - Client_Group (void); - - /// Initialize the consumer/supplier pair(s) - /** - * @param experiment_id For tests that run multiple experiments - * this number is changed on each iteration, guaranteeing - * better isolation. - * @param base_event_type The event type generated by the supplier. - * The Loopback_Consumer consumes the same event, the - * Loopback_Supplier generates (base_event_type + 1), and the - * consumer subscribes for that type too. - * @param iterations The number of iterations expected on the test. - * @param workload_in_usecs The consumer workload, in microseconds. - * @param gsf The high resolution timer global scale factor. - * - */ - void init (CORBA::Long experiment_id, - CORBA::Long base_event_type, - CORBA::ULong iterations, - CORBA::Long workload_in_usecs, - ACE_UINT32 gsf, - PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa); - - /// Initialize the consumer/supplier pair(s) - /** - * @param event_type_range The supplier declares more events than it - * generates. - */ - void init (CORBA::Long experiment_id, - CORBA::Long base_event_type, - CORBA::Long base_event_type_range, - CORBA::ULong iterations, - CORBA::Long workload_in_usecs, - ACE_UINT32 gsf, - PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa); - - /// Connect to the event channel - void connect (RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL); - - /// Disconnect from the event channel - void disconnect (ACE_ENV_SINGLE_ARG_DECL); - - //@{ - /** @name Accessors - */ - Supplier *supplier (void) const; - - Consumer *consumer (void) const; - - Loopback_Supplier *loopback_supplier (void) const; - - Loopback_Consumer *loopback_consumer (void) const; - //@} - -private: - Client_Pair client_pair_; - Loopback_Pair loopback_pair_; -}; - -#if defined(__ACE_INLINE__) -#include "Client_Group.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_CLIENT_GROUP_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Group.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Group.inl deleted file mode 100644 index b0ae0d1ce35..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Group.inl +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @file Client_Group.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -ACE_INLINE -Client_Group::Client_Group (void) -{ -} - -ACE_INLINE Supplier * -Client_Group::supplier (void) const -{ - return this->client_pair_.supplier (); -} - -ACE_INLINE Consumer * -Client_Group::consumer (void) const -{ - return this->client_pair_.consumer (); -} - -ACE_INLINE Loopback_Supplier * -Client_Group::loopback_supplier (void) const -{ - return this->loopback_pair_.loopback_supplier (); -} - -ACE_INLINE Loopback_Consumer * -Client_Group::loopback_consumer (void) const -{ - return this->loopback_pair_.loopback_consumer (); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Options.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Options.cpp deleted file mode 100644 index c8e69760669..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Options.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/** - * @file Client_Options.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "Client_Options.h" - -#include "ace/Log_Msg.h" -#include "ace/OS.h" - -ACE_RCSID (TAO_PERF_RTEC, - Client_Options, - "$Id$") - -Client_Options::Client_Options (int &argc, char *argv[]) - : ior ("file://test.ior") - , iterations (1000) - , nthreads (0) - , high_priority_period (0) - , high_priority_workload (0) - , low_priority_period (0) - , low_priority_workload (0) - , low_priority_consumers (0) - , dump_history (0) - , use_rt_corba (0) - , global_low_priority_rate (0) - , unique_low_priority_event (0) - , funky_supplier_publication (0) - , high_priority_is_last (0) -{ - ACE_Arg_Shifter arg_shifter (argc, argv); - - while (arg_shifter.is_anything_left ()) - { - const char *arg = arg_shifter.get_current (); - - if (ACE_OS::strcmp (arg, "-k") == 0) - { - arg_shifter.consume_arg (); - - if (arg_shifter.is_parameter_next ()) - { - this->ior = arg_shifter.get_current (); - arg_shifter.consume_arg (); - } - } - - else if (option (arg_shifter, "-i", iterations)) {} - else if (option (arg_shifter, "-n", nthreads)) {} - else if (option (arg_shifter, "-h", high_priority_period)) {} - else if (option (arg_shifter, "-l", low_priority_period)) {} - else if (option (arg_shifter, "-w", low_priority_workload)) {} - else if (option (arg_shifter, "-v", high_priority_workload)) {} - else if (option (arg_shifter, "-c", low_priority_consumers)) {} - - else if (boolean_option (arg_shifter, "-d", dump_history)) {} - else if (boolean_option (arg_shifter, "-r", use_rt_corba)) {} - else if (boolean_option (arg_shifter, "-g", global_low_priority_rate)) {} - else if (boolean_option (arg_shifter, "-u", unique_low_priority_event)) {} - else if (boolean_option (arg_shifter, "-f", funky_supplier_publication)) {} - else if (boolean_option (arg_shifter, "-x", high_priority_is_last)) {} - - else - { - arg_shifter.ignore_arg (); - } - } -} - -int -Client_Options::option (ACE_Arg_Shifter &arg_shifter, - const char *option_name, - int &option_value) -{ - if (ACE_OS::strcmp (arg_shifter.get_current (), option_name) != 0) - return 0; - arg_shifter.consume_arg (); - if (arg_shifter.is_parameter_next ()) - { - option_value = ACE_OS::atoi (arg_shifter.get_current ()); - arg_shifter.consume_arg (); - } - else - { - ACE_DEBUG ((LM_DEBUG, - "Missing value for option '%s'\n", option_name)); - } - return 1; -} - -int -Client_Options::boolean_option (ACE_Arg_Shifter &arg_shifter, - const char *option_name, - int &option_value) -{ - if (ACE_OS::strcmp (arg_shifter.get_current (), option_name) != 0) - return 0; - arg_shifter.consume_arg (); - option_value = 1; - return 1; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Options.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Options.h deleted file mode 100644 index 8d12ab4fafc..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Options.h +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @file Client_Options.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - * - */ - -#ifndef TAO_RTEC_PERF_CLIENT_OPTIONS_H -#define TAO_RTEC_PERF_CLIENT_OPTIONS_H -#include /**/ "ace/pre.h" - -#include "rtec_perf_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Arg_Shifter.h" - -/// Parse the command-line client_options for the tests. -/** - * Note that some of the tests ignore some of the client_options, but it is - * easier to have them all in a single class. - */ -class TAO_RTEC_Perf_Export Client_Options -{ -public: - /// Constructor - Client_Options (int &argc, char *argv[]); - - const char *ior; - int iterations; - int nthreads; - int high_priority_period; - int high_priority_workload; - int low_priority_period; - int low_priority_workload; - int low_priority_consumers; - - int dump_history; - int use_rt_corba; - int global_low_priority_rate; - int unique_low_priority_event; - int funky_supplier_publication; - int high_priority_is_last; - -private: - int option (ACE_Arg_Shifter &arg_shifter, - const char *option_name, - int &option_value); - - int boolean_option (ACE_Arg_Shifter &arg_shifter, - const char *option_name, - int &option_value); -}; - -#include /**/ "ace/post.h" -#endif /* TAO_RTEC_PERF_CLIENT_OPTIONS_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Pair.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Pair.cpp deleted file mode 100644 index 9f32c911ff2..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Pair.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/** - * @file Client_Pair.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "Client_Pair.h" -#include "Auto_Disconnect.h" - -#if !defined(__ACE_INLINE__) -#include "Client_Pair.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - Client_Pair, - "$Id$") - -void -Client_Pair::init (CORBA::Long experiment_id, - CORBA::Long base_event_type, - CORBA::ULong iterations, - CORBA::Long workload_in_usecs, - ACE_UINT32 gsf, - PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa) -{ - const CORBA::Long source_event_range = 1; - this->init (experiment_id, - base_event_type, - source_event_range, - iterations, - workload_in_usecs, - gsf, - supplier_poa, - consumer_poa); -} - -void -Client_Pair::init (CORBA::Long experiment_id, - CORBA::Long base_event_type, - CORBA::Long source_event_range, - CORBA::ULong iterations, - CORBA::Long workload_in_usecs, - ACE_UINT32 gsf, - PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa) -{ - this->supplier_ = new Supplier (experiment_id, - base_event_type, source_event_range, - supplier_poa); - this->consumer_ = new Consumer (experiment_id, - base_event_type + 1, - iterations, - workload_in_usecs, - gsf, - consumer_poa); -} - -void -Client_Pair::connect (RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) -{ - this->supplier_->connect (ec ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - Auto_Disconnect<Supplier> supplier_disconnect (this->supplier_); - - this->consumer_->connect (ec ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - Auto_Disconnect<Consumer> consumer_disconnect (this->consumer_); - - consumer_disconnect.release (); - supplier_disconnect.release (); -} - -void -Client_Pair::disconnect (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) -{ - Auto_Disconnect<Supplier> supplier_disconnect (this->supplier_); - Auto_Disconnect<Consumer> consumer_disconnect (this->consumer_); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Pair.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Pair.h deleted file mode 100644 index 8dc4e8b03b2..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Pair.h +++ /dev/null @@ -1,100 +0,0 @@ -/** - * @file Client_Pair.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_CLIENT_PAIR_H -#define TAO_PERF_RTEC_CLIENT_PAIR_H - -#include "Servant_var.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "Consumer.h" -#include "Supplier.h" - -/** - * @class Client_Pair - * - * @brief Simplify the initialization of a Supplier/Consumer pair - * connected to the event channel. - */ -class TAO_RTEC_Perf_Export Client_Pair -{ -public: - /// Constructor - /** - * We need a default constructor because this class is often used in - * arrays. - */ - Client_Pair (void); - - /// Initialize the consumer/supplier pair - /** - * @param experiment_id For tests that run multiple experiments - * this number is changed on each iteration, guaranteeing - * better isolation. - * @param base_event_type The event type generated by the supplier. - * The Loopback_Consumer consumes the same event, the - * Loopback_Supplier generates (base_event_type + 1), and the - * consumer subscribes for that type too. - * @param iterations The number of iterations expected on the test. - * @param workload_in_usecs The consumer workload, in microseconds. - * @param gsf The high resolution timer global scale factor. - * - */ - void init (CORBA::Long experiment_id, - CORBA::Long base_event_type, - CORBA::ULong iterations, - CORBA::Long workload_in_usecs, - ACE_UINT32 gsf, - PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa); - - /// Initialize the consumer/supplier pair - /** - * This variant works as the previous one, but it allows for - * multiple events in the supplier-side. - * - * @param source_event_range The number of events declared by the - * source. - */ - void init (CORBA::Long experiment_id, - CORBA::Long base_event_type, - CORBA::Long source_event_range, - CORBA::ULong iterations, - CORBA::Long workload_in_usecs, - ACE_UINT32 gsf, - PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa); - - /// Connect to the event channel - void connect (RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL); - - /// Disconnect from the event channel - void disconnect (ACE_ENV_SINGLE_ARG_DECL); - - //@{ - /** @name Accessors - */ - Supplier *supplier (void) const; - - Consumer *consumer (void) const; - //@} - -private: - Servant_var<Supplier> supplier_; - Servant_var<Consumer> consumer_; -}; - -#if defined(__ACE_INLINE__) -#include "Client_Pair.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_CLIENT_PAIR_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Pair.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Pair.inl deleted file mode 100644 index a4c0f7cabb7..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Pair.inl +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @file Client_Pair.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -ACE_INLINE -Client_Pair::Client_Pair (void) -{ -} - -ACE_INLINE Supplier * -Client_Pair::supplier (void) const -{ - return this->supplier_.in (); -} - -ACE_INLINE Consumer * -Client_Pair::consumer (void) const -{ - return this->consumer_.in (); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Consumer.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Consumer.cpp deleted file mode 100644 index 5fc7489897e..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Consumer.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/** - * @file Consumer.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "Consumer.h" -#include "Implicit_Deactivator.h" -#include "orbsvcs/Event_Service_Constants.h" -#include "ace/OS_NS_unistd.h" - -ACE_RCSID (TAO_PERF_RTEC, - Consumer, - "$Id$") - -Consumer::Consumer (CORBA::Long experiment_id, - CORBA::Long event_type, - CORBA::ULong iterations, - CORBA::Long workload_in_usecs, - ACE_UINT32 gsf, - PortableServer::POA_ptr poa) - : experiment_id_ (experiment_id) - , event_type_ (event_type) - , sample_history_ (iterations) - , workload_in_usecs_ (workload_in_usecs) - , gsf_ (gsf) - , default_POA_ (PortableServer::POA::_duplicate (poa)) -{ -} - -void -Consumer::connect (RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) -{ - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = - ec->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (!CORBA::is_nil (this->proxy_supplier_.in ())) - return; - - this->proxy_supplier_ = - consumer_admin->obtain_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - - RtecEventComm::PushConsumer_var consumer = - this->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - RtecEventChannelAdmin::ConsumerQOS consumer_qos; - consumer_qos.is_gateway = 0; - consumer_qos.dependencies.length (2); - RtecEventComm::EventHeader& h0 = - consumer_qos.dependencies[0].event.header; - h0.type = ACE_ES_DISJUNCTION_DESIGNATOR; - h0.source = 1; - - RtecEventComm::EventHeader& h1 = - consumer_qos.dependencies[1].event.header; - h1.type = this->event_type_; - h1.source = this->experiment_id_; - - this->proxy_supplier_->connect_push_consumer (consumer.in (), - consumer_qos - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; -} - -void -Consumer::disconnect (ACE_ENV_SINGLE_ARG_DECL) -{ - RtecEventChannelAdmin::ProxyPushSupplier_var proxy; - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (CORBA::is_nil (this->proxy_supplier_.in ())) - return; - proxy = this->proxy_supplier_._retn (); - } - - Implicit_Deactivator deactivator (this - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_TRY { - proxy->disconnect_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } ACE_CATCHANY { - } ACE_ENDTRY; -} - -ACE_Sample_History & -Consumer::sample_history (void) -{ - return this->sample_history_; -} - -void -Consumer::push (const RtecEventComm::EventSet &events - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ACE_hrtime_t now = ACE_OS::gethrtime (); - - ACE_hrtime_t creation; - ORBSVCS_Time::TimeT_to_hrtime (creation, - events[0].header.creation_time); - - while (this->workload_in_usecs_ > 0) - { - ACE_hrtime_t elapsed = ACE_OS::gethrtime () - now; - if (elapsed > this->gsf_ * this->workload_in_usecs_) - break; - ACE_OS::sleep (0); - } - - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (sample_history_.max_samples () == sample_history_.sample_count ()) - return; - this->sample_history_.sample (now - creation); -} - -void -Consumer::disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - this->proxy_supplier_ = - RtecEventChannelAdmin::ProxyPushSupplier::_nil (); -} - -PortableServer::POA_ptr -Consumer::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::POA::_duplicate (this->default_POA_.in ()); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Consumer.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Consumer.h deleted file mode 100644 index f9206fe4ba2..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Consumer.h +++ /dev/null @@ -1,88 +0,0 @@ -/** - * @file Consumer.h - * - * $Id$ - * - */ - -#ifndef TAO_PERF_RTEC_CONSUMER_H -#define TAO_PERF_RTEC_CONSUMER_H - -#include "rtec_perf_export.h" -#include "orbsvcs/RtecEventCommS.h" -#include "orbsvcs/RtecEventChannelAdminC.h" - -#include "ace/Sample_History.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class Consumer - * - * @brief Implement a simple consumer to keep track of the latency - * - */ -class TAO_RTEC_Perf_Export Consumer - : public virtual POA_RtecEventComm::PushConsumer - -{ -public: - /// Constructor - Consumer (CORBA::Long experiment_id, - CORBA::Long event_type, - CORBA::ULong iterations, - CORBA::Long workload_in_usecs, - ACE_UINT32 gsf, - PortableServer::POA_ptr poa); - - /// Connect to the event channel - void connect (RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL); - - /// Disconnect from the event channel - void disconnect (ACE_ENV_SINGLE_ARG_DECL); - - /// Access the history of samples - ACE_Sample_History &sample_history (void); - - //@{ - /** @name The RtecEventComm::PushConsumer methods - */ - virtual void push (const RtecEventComm::EventSet& events - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - //@} - -private: - /// Synchronize access to the internal data - TAO_SYNCH_MUTEX mutex_; - - /// The proxy this object is connected to - RtecEventChannelAdmin::ProxyPushSupplier_var proxy_supplier_; - - /// The experiment id - CORBA::Long experiment_id_; - - /// The event type - CORBA::Long event_type_; - - /// The history of latency samples - ACE_Sample_History sample_history_; - - /// The time spent processing each event, in microseconds - CORBA::ULong workload_in_usecs_; - - /// The global scale factor for the high resolution timers - ACE_UINT32 gsf_; - - /// The default poa - PortableServer::POA_var default_POA_; -}; - -#endif /* TAO_PERF_RTEC_CONSUMER_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Control.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Control.cpp deleted file mode 100644 index b35d809551c..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Control.cpp +++ /dev/null @@ -1,179 +0,0 @@ -/** - * @file Control.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "Control.h" -#include "ORB_Shutdown.h" -#include "Shutdown.h" -#include "Auto_Disconnect.h" - -#include "orbsvcs/Event_Service_Constants.h" - -#include "ace/High_Res_Timer.h" -#include "ace/Sample_History.h" -#include "ace/Basic_Stats.h" -#include "ace/Auto_Ptr.h" - -ACE_RCSID (TAO_RTEC_Perf, - Control, - "$Id$") - -Control::Control (size_t peers_expected, - size_t iterations, - int do_dump_history, - CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa) - : peers_expected_ (peers_expected) - , iterations_ (iterations) - , do_dump_history_ (do_dump_history) - , orb_ (CORBA::ORB::_duplicate (orb)) - , poa_ (PortableServer::POA::_duplicate (poa)) - , peers_count_ (0) - , peers_ (new Federated_Test::Peer_var[this->peers_expected_]) -{ -} - -Control::~Control (void) -{ - delete[] this->peers_; -} - -void -Control::join (Federated_Test::Peer_ptr peer - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (this->peers_count_ == this->peers_expected_) - return; - - this->peers_[this->peers_count_++] = - Federated_Test::Peer::_duplicate (peer); - - if (this->peers_count_ < this->peers_expected_) - return; - } - - /// Automatically shutdown the ORB - ACE_Utils::Auto_Functor<CORBA::ORB,ORB_Shutdown> orb_shutdown (this->orb_.in ()); - - /// Automatically shutdown the peers - typedef ACE_Utils::Auto_Functor<Federated_Test::Peer,Shutdown<Federated_Test::Peer> > Peer_Shutdown; - ACE_Auto_Basic_Array_Ptr<Peer_Shutdown> peer_shutdown ( - new Peer_Shutdown[this->peers_count_] - ); - - size_t i; - for (i = 0; i != this->peers_count_; ++i) - { - peer_shutdown[i].reset(this->peers_[i].in()); - } - - ACE_DEBUG ((LM_DEBUG, - "Control (%P|%t) Building the federation\n")); - - /// Build the EC federation - for (i = 0; i != this->peers_count_; ++i) - { - for (size_t j = 0; j != this->peers_count_; ++j) - { - if (i != j) - { - this->peers_[j]->connect (this->peers_[i].in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - } - } - - /// ... run the test(s) ... - for (i = 0; i != this->peers_count_; ++i) - { - /// ... automatically release the object references ... - ACE_Auto_Basic_Array_Ptr<Federated_Test::Loopback_var> loopbacks ( - new Federated_Test::Loopback_var[2*this->peers_count_] - ); - - /// ... and automatically disconnect the loopbacks ... - typedef Auto_Disconnect<Federated_Test::Loopback> Loopback_Disconnect; - ACE_Auto_Basic_Array_Ptr<auto_ptr<Loopback_Disconnect> > disconnects ( - new auto_ptr<Loopback_Disconnect>[2*this->peers_count_] - ); - - ACE_DEBUG ((LM_DEBUG, - "Control (%P|%t) Running test for peer %d\n", - i)); - CORBA::Long experiment_id = 128 + i; - CORBA::Long base_event_type = ACE_ES_EVENT_UNDEFINED; - - size_t lcount = 0; - - size_t j; - for (j = 0; j != this->peers_count_; ++j) - { - if (j != i) - { - loopbacks[lcount] = - this->peers_[j]->setup_loopback (experiment_id, - base_event_type - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_AUTO_PTR_RESET (disconnects[lcount], - new Loopback_Disconnect ( - loopbacks[lcount].in ()), - Loopback_Disconnect - ); - lcount++; - - loopbacks[lcount] = - this->peers_[j]->setup_loopback (experiment_id, - base_event_type + 2 - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_AUTO_PTR_RESET (disconnects[lcount], - new Loopback_Disconnect ( - loopbacks[lcount].in ()), - Loopback_Disconnect - ); - lcount++; - } - } - - Federated_Test::Experiment_Results_var results = - this->peers_[i]->run_experiment (experiment_id, - this->iterations_ - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_Sample_History history (results->length ()); - for (CORBA::ULong k = 0; k != results->length (); ++k) - history.sample (results[k]); - - // We use a fake scale factor because the peer already converted - // to microseconds... - const ACE_UINT32 fake_scale_factor = 1; - - ACE_Basic_Stats stats; - history.collect_basic_stats (stats); - stats.dump_results ("Total", fake_scale_factor); - - if (this->do_dump_history_) - { - history.dump_samples ("HISTORY", fake_scale_factor); - } - } -} - -PortableServer::POA_ptr -Control::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::POA::_duplicate (this->poa_.in ()); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Control.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Control.h deleted file mode 100644 index 9b09d063fb0..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Control.h +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @file Control.h - * - * $Id$ - * - */ - -#ifndef TAO_RTEC_PERF_CONTROL_H -#define TAO_RTEC_PERF_CONTROL_H -#include /**/ "ace/pre.h" - -#include "Federated_TestS.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class Control - * - * @brief Implement the Federated_Test::Control interface - * - */ -class TAO_RTEC_Perf_Export Control - : public virtual POA_Federated_Test::Control -{ -public: - /// Constructor - Control (size_t peers_expected, - size_t iterations, - int do_dump_history, - CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa); - - /// Destructor - virtual ~Control (void); - - //@{ - /** @name The Federated_Test::Control methods - */ - virtual void join (Federated_Test::Peer_ptr peer - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - //@} - -private: - /// Synchronize access to the internal data - TAO_SYNCH_MUTEX mutex_; - - /// Number of peers expected - size_t peers_expected_; - - /// Number of iterations on each test - size_t iterations_; - - /// This flag is set to 1 to dump the complete test history - int do_dump_history_; - - /// Keep a reference to the ORB, used in shutdown - CORBA::ORB_var orb_; - - /// The default POA - PortableServer::POA_var poa_; - - /// Current number of items in the in the @c peers_ array. - size_t peers_count_; - - /// An array to keep the list of peers. - /** - * @todo I would like to use ACE_Array<> but the interface is too - * confusing. std::vector<> would be better, but I'm not allowed to - */ - Federated_Test::Peer_var *peers_; -}; - -#include /**/ "ace/post.h" -#endif /* TAO_RTEC_PERF_CONTROL_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/EC_Destroyer.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/EC_Destroyer.cpp deleted file mode 100644 index 220c8c3957c..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/EC_Destroyer.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @file EC_Destroyer.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "EC_Destroyer.h" - -#if !defined(__ACE_INLINE__) -#include "EC_Destroyer.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - EC_Destroyer, - "$Id$") - -EC_Destroyer::EC_Destroyer (RtecEventChannelAdmin::EventChannel_ptr ec) - : ec_ (RtecEventChannelAdmin::EventChannel::_duplicate (ec)) -{ -} - -EC_Destroyer::~EC_Destroyer (void) -{ - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY { - this->ec_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } ACE_CATCH (CORBA::Exception, ex) { - // @@ TODO Log this event, check the Servant_var.cpp comments for - // details. - } ACE_ENDTRY; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/EC_Destroyer.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/EC_Destroyer.h deleted file mode 100644 index 0c622a996a8..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/EC_Destroyer.h +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @file EC_Destroyer.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_EC_DESTROYER_H -#define TAO_PERF_RTEC_EC_DESTROYER_H - -#include "rtec_perf_export.h" -#include "orbsvcs/RtecEventChannelAdminC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class EC_Destroyer - * - * @brief Implement a helper class to destroy a Real-time Event - * Channel. - * - */ -class TAO_RTEC_Perf_Export EC_Destroyer -{ -public: - /// Constructor - EC_Destroyer (RtecEventChannelAdmin::EventChannel_ptr ec); - - /// Destructor - /** - * @todo This method could benefit from the error logging described - * in Servant_var.cpp - */ - ~EC_Destroyer (void); - -private: - /// The event channel - RtecEventChannelAdmin::EventChannel_var ec_; -}; - -#if defined(__ACE_INLINE__) -#include "EC_Destroyer.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_EC_DESTROYER_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/EC_Destroyer.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/EC_Destroyer.inl deleted file mode 100644 index 8106257cde1..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/EC_Destroyer.inl +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @file EC_Destroyer.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Federated_Test.idl b/TAO/orbsvcs/performance-tests/RTEvent/lib/Federated_Test.idl deleted file mode 100644 index ac013f92dd2..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Federated_Test.idl +++ /dev/null @@ -1,105 +0,0 @@ -/** - * @file Federated_Test.idl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - * - */ - -module Federated_Test -{ - interface Peer; - - interface Loopback; - - /** - * @interface Coordinator - * - * @brief Controls a federated test. - * - * Implementations of the Control interface: - * - * -# wait for all the peers to join - * -# connecting the peers to each other - * -# run different experiments on each peer - * -# collect the results and print them - * - */ - interface Control - { - /// Join a new peer into the simulation. - /** - * Implementations of this interface arbitrarly decide when there - * are "enough" peers to run the test. - */ - void join (in Peer the_peer); - }; - - /// The results of a single experiment - typedef sequence<unsigned long long> Experiment_Results; - - /** - * @interface Peer - * - * @brief A member of a federated test - * - * Peers define the required interface to participate in a federated - * test. - */ - interface Peer - { - /// Shutdown the peer - void shutdown (); - - /// Setup an Consumer/Supplier loopback pair - /** - * Some experiments require one or more peers to setup a - * "loopback" through their event channel, i.e. a - * Consumer/Supplier pair that simply "loop" every event they - * receive through the event channel. - * - * @param experiment_id Each experiment receives a unique ID to - * separate resources. - * - * @param base_event_type The type the Consumer part of the - * loopback should subscribe to, the supplier generate events of - * type base_event_type + 1 - * - * @return The returned object can be used to disconnect and - * destroy the loopback elements. - */ - Loopback setup_loopback (in long experiment_id, - in long base_event_type); - - /// Run a single experiment - /** - * @param experiment_id Each experiment is assigned a different ID - * by the Control object. - * @param iterations How many iterations of the experiment should - * be run. - * - * @return All the samples captured in the experiment, the samples - * are returned in microseconds. - */ - Experiment_Results run_experiment (in long experiment_id, - in long iterations); - - /// Return the event channel in this peer - readonly attribute Object channel; - - /// Connect to a remote peer - void connect (in Peer remote_peer); - }; - - /** - * @interface Loopback - * - * @brief Control the elements on a Consumer/Supplier loopback pair. - */ - interface Loopback - { - /// Disconnect and destroy the loopback elements - void disconnect (); - }; -}; diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Implicit_Deactivator.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Implicit_Deactivator.cpp deleted file mode 100644 index ded3aa19ae6..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Implicit_Deactivator.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file Implicit_Deactivator.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "Implicit_Deactivator.h" -#include "tao/PortableServer/Servant_Base.h" -#include "tao/Environment.h" -#include "ace/Swap.h" - -#if !defined(__ACE_INLINE__) -#include "Implicit_Deactivator.inl" -#endif /* __ACE_INLINE__ */ - -Implicit_Deactivator::Implicit_Deactivator (PortableServer::Servant servant - ACE_ENV_ARG_DECL) -{ - this->poa_ = - servant->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->id_ = - this->poa_->servant_to_id (servant ACE_ENV_ARG_PARAMETER); - ACE_CHECK; -} - -Implicit_Deactivator::Implicit_Deactivator (Implicit_Deactivator &rhs) - : poa_ (rhs.poa_) - , id_ (rhs.id_) -{ - rhs.release (); -} - -Implicit_Deactivator& -Implicit_Deactivator::operator= (Implicit_Deactivator &rhs) -{ - Implicit_Deactivator tmp (rhs); - // @@ This seems bogus, there should be a more efficient way to swap - // vars - ACE_Swap<PortableServer::POA_var>::swap (this->poa_, tmp.poa_); - ACE_Swap<PortableServer::ObjectId_var>::swap (this->id_, tmp.id_); - return *this; -} - -Implicit_Deactivator::~Implicit_Deactivator () -{ - if (this->id_.ptr () == 0) - return; - - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY { - this->poa_->deactivate_object (this->id_.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } ACE_CATCHANY { - // @@ TODO This event should be logged. Cannot throw because that - // would make it impossible to use this class effectively. - // Read Servant_var.cpp for more details. - } ACE_ENDTRY; -} - -Implicit_Deactivator& -Implicit_Deactivator::operator= (PortableServer::Servant servant) -{ - Implicit_Deactivator tmp (servant); - // @@ This seems bogus, there should be a more efficient way to swap - // vars - ACE_Swap<PortableServer::POA_var>::swap (this->poa_, tmp.poa_); - ACE_Swap<PortableServer::ObjectId_var>::swap (this->id_, tmp.id_); - return *this; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Implicit_Deactivator.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Implicit_Deactivator.h deleted file mode 100644 index d7140a3275c..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Implicit_Deactivator.h +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @file Implicit_Deactivator.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ -#ifndef TAO_PERF_RTEC_IMPLICIT_DEACTIVATOR_H -#define TAO_PERF_RTEC_IMPLICIT_DEACTIVATOR_H - -#include "rtec_perf_export.h" -#include "tao/PortableServer/PortableServer.h" - -/** - * @class Implicit_Deactivator - * - * @brief Automatically deactivate an implicitly activated object. - */ -class TAO_RTEC_Perf_Export Implicit_Deactivator -{ -public: - /// Constructor - /** - * @param client The client - */ - explicit Implicit_Deactivator (PortableServer::Servant servant = 0 - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - Implicit_Deactivator (Implicit_Deactivator& rhs); - Implicit_Deactivator& operator= (Implicit_Deactivator& rhs); - - /// Destructor - ~Implicit_Deactivator (void); - - /// Assignment operator - Implicit_Deactivator& operator= (PortableServer::Servant servant); - - /// Release the servant, i.e. the destructor does not deactivate anything - void release (void); - -private: - /// The POA - PortableServer::POA_var poa_; - - /// The object id - PortableServer::ObjectId_var id_; -}; - -#if defined(__ACE_INLINE__) -#include "Implicit_Deactivator.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_IMPLICIT_DEACTIVATOR_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Implicit_Deactivator.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/Implicit_Deactivator.inl deleted file mode 100644 index b220d7959e4..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Implicit_Deactivator.inl +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @file Implicit_Deactivator.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -ACE_INLINE void -Implicit_Deactivator::release (void) -{ - this->id_ = 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback.cpp deleted file mode 100644 index 41c08b2a882..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @file Loopback.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "Loopback.h" -#include "Auto_Disconnect.h" -#include "Implicit_Deactivator.h" - -ACE_RCSID (TAO_RTEC_Perf, - Loopback, - "$Id$") - -Loopback::Loopback (CORBA::Long experiment_id, - CORBA::Long base_event_type, - PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa, - RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) -{ - this->loopback_pair_.init (experiment_id, - base_event_type, - supplier_poa, - consumer_poa); - - this->loopback_pair_.connect (ec ACE_ENV_ARG_PARAMETER); -} - -void -Loopback::disconnect (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - Auto_Disconnect<Loopback_Pair> disconnect (&this->loopback_pair_); - - Implicit_Deactivator deactivator (this ACE_ENV_ARG_PARAMETER); - ACE_CHECK; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback.h deleted file mode 100644 index 384c42cd3cb..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback.h +++ /dev/null @@ -1,47 +0,0 @@ -/** - * @file Loopback.h - * - * $Id$ - * - */ - -#ifndef TAO_RTEC_PERF_LOOPBACK_H -#define TAO_RTEC_PERF_LOOPBACK_H - -#include "Federated_TestS.h" -#include "Loopback_Pair.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class Loopback - * - * @brief Implement the Control::Loopback interface - * - */ -class TAO_RTEC_Perf_Export Loopback - : public virtual POA_Federated_Test::Loopback -{ -public: - /// Constructor - Loopback (CORBA::Long experiment_id, - CORBA::Long base_event_type, - PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa, - RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL); - - //@{ - /** @name The Federated_Test::Loopback methods - */ - virtual void disconnect (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - //@} - -private: - Loopback_Pair loopback_pair_; -}; - -#endif /* TAO_RTEC_PERF_LOOPBACK_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Consumer.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Consumer.cpp deleted file mode 100644 index 2c3d1f8084e..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Consumer.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/** - * @file Loopback_Consumer.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "Loopback_Consumer.h" -#include "Implicit_Deactivator.h" -#include "orbsvcs/Event_Service_Constants.h" - -ACE_RCSID (PERF_RTEC, - Loopback_Consumer, - "$Id$") - -Loopback_Consumer:: -Loopback_Consumer (CORBA::Long experiment_id, - CORBA::Long event_type, - Loopback_Supplier *supplier, - PortableServer::POA_ptr poa) - : experiment_id_ (experiment_id) - , event_type_ (event_type) - , supplier_ (TAO::Utils::Servant_Var<Loopback_Supplier>::_duplicate (supplier)) - , default_POA_ (PortableServer::POA::_duplicate (poa)) -{ -} - -void -Loopback_Consumer::connect (RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) -{ - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = - ec->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (!CORBA::is_nil (this->proxy_supplier_.in ())) - return; - - this->proxy_supplier_ = - consumer_admin->obtain_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - - RtecEventComm::PushConsumer_var consumer = - this->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - RtecEventChannelAdmin::ConsumerQOS consumer_qos; - consumer_qos.is_gateway = 0; - consumer_qos.dependencies.length (2); - RtecEventComm::EventHeader& h0 = - consumer_qos.dependencies[0].event.header; - h0.type = ACE_ES_DISJUNCTION_DESIGNATOR; - h0.source = 1; - - RtecEventComm::EventHeader& h1 = - consumer_qos.dependencies[1].event.header; - h1.source = this->experiment_id_; - h1.type = this->event_type_; - - this->proxy_supplier_->connect_push_consumer (consumer.in (), - consumer_qos - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; -} - -void -Loopback_Consumer::disconnect (ACE_ENV_SINGLE_ARG_DECL) -{ - RtecEventChannelAdmin::ProxyPushSupplier_var proxy; - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (CORBA::is_nil (this->proxy_supplier_.in ())) - return; - proxy = this->proxy_supplier_._retn (); - } - - Implicit_Deactivator deactivator (this - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_TRY - { - proxy->disconnect_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY {} ACE_ENDTRY; -} - -void -Loopback_Consumer::push (const RtecEventComm::EventSet &events - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // ACE_DEBUG ((LM_DEBUG, "Loopback_Consumer::push (%P|%t)\n")); - this->supplier_->push (events ACE_ENV_ARG_PARAMETER); -} - -void -Loopback_Consumer::disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - this->proxy_supplier_ = - RtecEventChannelAdmin::ProxyPushSupplier::_nil (); -} - -PortableServer::POA_ptr -Loopback_Consumer::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::POA::_duplicate (this->default_POA_.in ()); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Consumer.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Consumer.h deleted file mode 100644 index 4ff3203146c..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Consumer.h +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @file Loopback_Consumer.h - * - * $Id$ - * - */ - -#ifndef TAO_PERF_RTEC_LOOPBACK_CONSUMER_H -#define TAO_PERF_RTEC_LOOPBACK_CONSUMER_H - -#include "Loopback_Supplier.h" -#include "tao/Utils/Servant_Var.h" -#include "orbsvcs/RtecEventCommS.h" -#include "orbsvcs/RtecEventChannelAdminC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class Loopback_Consumer - * - * @brief Implement a simple consumer to keep track of the latency - * - */ -class TAO_RTEC_Perf_Export Loopback_Consumer - : public virtual POA_RtecEventComm::PushConsumer - -{ -public: - /// Constructor - Loopback_Consumer (CORBA::Long experiment_id, - CORBA::Long event_type, - Loopback_Supplier *supplier, - PortableServer::POA_ptr poa); - - /// Connect to the event channel - void connect (RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL); - - /// Disconnect from the event channel - void disconnect (ACE_ENV_SINGLE_ARG_DECL); - - //@{ - /** @name The RtecEventComm::PushConsumer methods - */ - virtual void push (const RtecEventComm::EventSet& events - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - //@} - -private: - /// Synchronize access to the internal data - TAO_SYNCH_MUTEX mutex_; - - /// The experiment id - CORBA::Long experiment_id_; - - /// The event type this consumer subscribes to - CORBA::Long event_type_; - - /// The supplier used to close the loopback - TAO::Utils::Servant_Var<Loopback_Supplier> supplier_; - - /// The proxy this object is connected to - RtecEventChannelAdmin::ProxyPushSupplier_var proxy_supplier_; - - /// The default poa - PortableServer::POA_var default_POA_; -}; - -#endif /* ECFL_LOOPBACK_CONSUMER_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Pair.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Pair.cpp deleted file mode 100644 index 5a0c80aed0c..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Pair.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @file Loopback_Pair.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "Loopback_Pair.h" -#include "Auto_Disconnect.h" - -#if !defined(__ACE_INLINE__) -#include "Loopback_Pair.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - Loopback_Pair, - "$Id$") - -void -Loopback_Pair::init (CORBA::Long experiment_id, - CORBA::Long base_event_type, - PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa) -{ - this->loopback_supplier_ = new Loopback_Supplier (experiment_id, - base_event_type + 1, - supplier_poa); - this->loopback_consumer_ = new Loopback_Consumer (experiment_id, - base_event_type, - loopback_supplier_.in (), - consumer_poa); -} - -void -Loopback_Pair::connect (RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) -{ - this->loopback_supplier_->connect (ec ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - Auto_Disconnect<Loopback_Supplier> loopback_supplier_disconnect (this->loopback_supplier_); - - this->loopback_consumer_->connect (ec ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - Auto_Disconnect<Loopback_Consumer> loopback_consumer_disconnect (this->loopback_consumer_); - - loopback_consumer_disconnect.release (); - loopback_supplier_disconnect.release (); -} - -void -Loopback_Pair::disconnect (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) -{ - Auto_Disconnect<Loopback_Supplier> loopback_supplier_disconnect (this->loopback_supplier_); - Auto_Disconnect<Loopback_Consumer> loopback_consumer_disconnect (this->loopback_consumer_); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Pair.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Pair.h deleted file mode 100644 index d70b8bfd9a4..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Pair.h +++ /dev/null @@ -1,79 +0,0 @@ -/** - * @file Loopback_Pair.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_LOOPBACK_PAIR_H -#define TAO_PERF_RTEC_LOOPBACK_PAIR_H - -#include "Servant_var.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "Loopback_Supplier.h" -#include "Loopback_Consumer.h" - -/** - * @class Loopback_Pair - * - * @brief Simplify the initialization of a Loopback connection through - * the event channel. - */ -class TAO_RTEC_Perf_Export Loopback_Pair -{ -public: - /// Constructor - /** - * We need a default constructor because this class is often used in - * arrays. - */ - Loopback_Pair (void); - - /** - * @param experiment_id For tests that run multiple experiments - * this number is changed on each iteration, guaranteeing - * better isolation. - * @param base_event_type The event type generated by the supplier. - * The Loopback_Consumer consumes the same event, the - * Loopback_Supplier generates (base_event_type + 1), and the - * consumer subscribes for that type too. - * @param iterations The number of iterations expected on the test. - * @param workload_in_usecs The consumer workload, in microseconds. - * @param gsf The high resolution timer global scale factor. - * - */ - void init (CORBA::Long experiment_id, - CORBA::Long base_event_type, - PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa); - - /// Connect to the event channel - void connect (RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL); - - /// Disconnect from the event channel - void disconnect (ACE_ENV_SINGLE_ARG_DECL); - - //@{ - /** @name Accessors - */ - Loopback_Supplier *loopback_supplier (void) const; - - Loopback_Consumer *loopback_consumer (void) const; - //@} - -private: - Servant_var<Loopback_Supplier> loopback_supplier_; - Servant_var<Loopback_Consumer> loopback_consumer_; -}; - -#if defined(__ACE_INLINE__) -#include "Loopback_Pair.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_LOOPBACK_PAIR_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Pair.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Pair.inl deleted file mode 100644 index 64079dad6d5..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Pair.inl +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @file Loopback_Pair.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -ACE_INLINE -Loopback_Pair::Loopback_Pair (void) -{ -} - -ACE_INLINE Loopback_Supplier * -Loopback_Pair::loopback_supplier (void) const -{ - return this->loopback_supplier_.in (); -} - -ACE_INLINE Loopback_Consumer * -Loopback_Pair::loopback_consumer (void) const -{ - return this->loopback_consumer_.in (); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Supplier.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Supplier.cpp deleted file mode 100644 index 1e516958c44..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Supplier.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/** - * @file Loopback_Supplier.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "Loopback_Supplier.h" -#include "Implicit_Deactivator.h" - -ACE_RCSID (TAO_PERF_RTEC, - Loopback_Supplier, - "$Id$") - -Loopback_Supplier::Loopback_Supplier (CORBA::Long experiment_id, - CORBA::Long response_type, - PortableServer::POA_ptr poa) - : experiment_id_ (experiment_id) - , response_type_ (response_type) - , default_POA_ (PortableServer::POA::_duplicate (poa)) - , counter_ (0) -{ -} - -void -Loopback_Supplier::connect (RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) -{ - RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = - ec->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (!CORBA::is_nil (this->proxy_consumer_.in ())) - return; - - this->proxy_consumer_ = - supplier_admin->obtain_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - - RtecEventComm::PushSupplier_var supplier = - this->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - RtecEventChannelAdmin::SupplierQOS supplier_qos; - supplier_qos.is_gateway = 0; - supplier_qos.publications.length (1); - RtecEventComm::EventHeader& sh0 = - supplier_qos.publications[0].event.header; - sh0.type = this->response_type_; - sh0.source = this->experiment_id_; - - this->proxy_consumer_->connect_push_supplier (supplier.in (), - supplier_qos - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; -} - -void -Loopback_Supplier::disconnect (ACE_ENV_SINGLE_ARG_DECL) -{ - RtecEventChannelAdmin::ProxyPushConsumer_var proxy; - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (CORBA::is_nil (this->proxy_consumer_.in ())) - return; - proxy = this->proxy_consumer_._retn (); - } - - Implicit_Deactivator deactivator (this - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_TRY { - proxy->disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } ACE_CATCHANY { - } ACE_ENDTRY; -} - -void -Loopback_Supplier::push (const RtecEventComm::EventSet &source - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // ACE_DEBUG ((LM_DEBUG, "Loopback_Supplier pushing\n")); - RtecEventChannelAdmin::ProxyPushConsumer_var proxy; - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (CORBA::is_nil (this->proxy_consumer_.in ())) - return; - proxy = this->proxy_consumer_; - -#if 0 - this->counter_ += source.length (); - if ((this->counter_ + 1) % 1000 == 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) - Loopback (%d) sending %d messages\n", - this->response_type_, this->counter_ + 1)); - } -#endif /* 0 */ - } - - // ACE_DEBUG ((LM_DEBUG, "Loopback_Supplier::push (%P|%t)\n")); - RtecEventComm::EventSet events (source); - for (CORBA::ULong i = 0; i != events.length (); ++i) - { - events[i].header.ttl = 1; - events[i].header.type = this->response_type_; - events[i].header.source = this->experiment_id_; - } - - proxy->push (events ACE_ENV_ARG_PARAMETER); -} - -void -Loopback_Supplier::disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - this->proxy_consumer_ = - RtecEventChannelAdmin::ProxyPushConsumer::_nil (); -} - -PortableServer::POA_ptr -Loopback_Supplier::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::POA::_duplicate (this->default_POA_.in ()); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Supplier.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Supplier.h deleted file mode 100644 index 24f2055cf04..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Loopback_Supplier.h +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @file Loopback_Supplier.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_RTEC_LOOPBACK_SUPPLIER_H -#define TAO_RTEC_LOOPBACK_SUPPLIER_H - -#include "rtec_perf_export.h" -#include "orbsvcs/RtecEventCommS.h" -#include "orbsvcs/RtecEventChannelAdminC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class Loopback_Supplier - * - * @brief Implement a simple supplier to keep track of the latency - * - */ -class TAO_RTEC_Perf_Export Loopback_Supplier - : public virtual POA_RtecEventComm::PushSupplier -{ -public: - /// Constructor - /** - * The experiment ID is used to configure the supplier ID on the - * publication. - */ - Loopback_Supplier (CORBA::Long experiment_id, - CORBA::Long response_type, - PortableServer::POA_ptr poa); - - /// Connect to the event channel - void connect (RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL); - - /// Disconnect from the event channel - void disconnect (ACE_ENV_SINGLE_ARG_DECL); - - void push (const RtecEventComm::EventSet &events - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - - //@{ - /** @name The RtecEventComm::PushSupplier methods - */ - virtual void disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - //@} - -private: - /// The experiment id - /// Synchronize access to the internal data - TAO_SYNCH_MUTEX mutex_; - - /// The experiment id - CORBA::Long experiment_id_; - - /// The response event type - CORBA::Long response_type_; - - /// The proxy this object is connected to - RtecEventChannelAdmin::ProxyPushConsumer_var proxy_consumer_; - - /// The default poa - PortableServer::POA_var default_POA_; - - /// Count the number of events processed - CORBA::ULong counter_; -}; - -#endif /* TAO_RTEC_LOOPBACK_SUPPLIER_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.cpp deleted file mode 100644 index 36154df9fcd..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/** - * @file Low_Priority_Setup.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_LOW_PRIORITY_SETUP_CPP -#define TAO_PERF_RTEC_LOW_PRIORITY_SETUP_CPP - -#include "Low_Priority_Setup.h" - -#include "ace/Basic_Stats.h" -#include "ace/Sample_History.h" - -template<class Client_Type> Low_Priority_Setup<Client_Type>:: -Low_Priority_Setup (int consumer_count, - int iterations, - int use_different_types, - CORBA::Long experiment_id, - CORBA::Long base_event_type, - int workload, - ACE_UINT32 gsf, - int nthreads, - int thread_priority, - int thread_sched_class, - int per_thread_period, - PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa, - RtecEventChannelAdmin::EventChannel_ptr ec, - ACE_Barrier *barrier - ACE_ENV_ARG_DECL) - : consumer_count_ (consumer_count) - , clients_ (consumer_count ? new Client_Type[consumer_count] : 0) - , disconnect_ (consumer_count ? new Client_Auto_Disconnect[consumer_count] : 0) - , nthreads_ (nthreads) - , tasks_ (nthreads ? new Send_Task[nthreads] : 0) - , stoppers_ (nthreads ? new Auto_Send_Task_Stopper[nthreads] : 0) -{ - for (int i = 0; i != consumer_count; ++i) - { - int per_consumer_workload = - workload / this->consumer_count_; - if (workload != 0 && per_consumer_workload == 0) - per_consumer_workload = 1; - - CORBA::Long event_type = - base_event_type; - if (use_different_types) - event_type = base_event_type + 2 * i; - - this->clients_[i].init (experiment_id, - event_type, - iterations, - per_consumer_workload, - gsf, - supplier_poa, - consumer_poa); - this->clients_[i].connect (ec - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - // Automatically disconnect the group if the connection was - // successful - this->disconnect_[i] = &this->clients_[i]; - } - - for (int j = 0; j != nthreads; ++j) - { - CORBA::Long event_type = - base_event_type; - if (use_different_types) - event_type = base_event_type + 2 * j; - - this->tasks_[j].init (0, - per_thread_period, - j * per_thread_period, - event_type, - experiment_id, - this->clients_[j].supplier (), - barrier); - this->tasks_[j].thr_mgr (&this->thr_mgr_); - ACE_AUTO_PTR_RESET (this->stoppers_[j], - new Send_Task_Stopper (thread_priority, - thread_sched_class, - &this->tasks_[j]), - Send_Task_Stopper); - } -} - -template<class Client_Type> void -Low_Priority_Setup<Client_Type>::stop_all_threads (void) -{ - ACE_DEBUG ((LM_DEBUG, "Stopping:")); - for (int i = 0; i != this->nthreads_; ++i) - { - this->tasks_[i].stop (); - ACE_DEBUG ((LM_DEBUG, " %d", i)); - } - ACE_DEBUG ((LM_DEBUG, "\n")); - this->thr_mgr_.wait (); - - /// Resetting the auto_ptr<> destroys all the objects. The - /// destructors automatically stop and wait for all the threads. - /// Depending on your personal bias this is either "super neat" or - /// "a horrible kludge", IMHO is just good use of the language :-) - this->stoppers_.reset (0); -} - -template<class Client_Type> void -Low_Priority_Setup<Client_Type>::collect_basic_stats (ACE_Basic_Stats &stats) -{ - for (int i = 0; i != this->consumer_count_; ++i) - { - ACE_Sample_History &history = - this->clients_[i].consumer ()->sample_history (); - history.collect_basic_stats (stats); - } -} - -#endif /* TAO_PERF_RTEC_LOW_PRIORITY_SETUP_CPP */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.h deleted file mode 100644 index e6f5315abd0..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file Low_Priority_Setup.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_LOW_PRIORITY_SETUP_H -#define TAO_PERF_RTEC_LOW_PRIORITY_SETUP_H - -#include "Auto_Disconnect.h" -#include "Send_Task.h" -#include "Send_Task_Stopper.h" -#include "ace/Auto_Ptr.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -class RT_Class; - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -class ACE_Basic_Stats; -ACE_END_VERSIONED_NAMESPACE_DECL - -/** - * @class Low_Priority_Setup - * - * @brief Simplify the initialization of performance tests clients - * - */ -template<class Client_Type> -class Low_Priority_Setup -{ -public: - /// Constructor - Low_Priority_Setup (int consumer_count, - int iterations, - int use_different_types, - CORBA::Long experiment_id, - CORBA::Long base_event_type, - int workload, - ACE_UINT32 gsf, - int nthreads, - int thread_priority, - int thread_sched_class, - int per_thread_period, - PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa, - RtecEventChannelAdmin::EventChannel_ptr ec, - ACE_Barrier *barrier - ACE_ENV_ARG_DECL); - - /// Stop all running threads - void stop_all_threads (void); - - /// Collect the stats from all the clients - void collect_basic_stats (ACE_Basic_Stats &stats); - - typedef ACE_Auto_Basic_Array_Ptr<Client_Type> Client_Array; - typedef Auto_Disconnect<Client_Type> Client_Auto_Disconnect; - typedef ACE_Auto_Basic_Array_Ptr<Client_Auto_Disconnect> Client_Auto_Disconnect_Array; - typedef ACE_Auto_Basic_Array_Ptr<Send_Task> Send_Task_Array; - typedef auto_ptr<Send_Task_Stopper> Auto_Send_Task_Stopper; - typedef ACE_Auto_Basic_Array_Ptr<Auto_Send_Task_Stopper> Send_Task_Stopper_Array; - -private: - int consumer_count_; - Client_Array clients_; - Client_Auto_Disconnect_Array disconnect_; - - int nthreads_; - Send_Task_Array tasks_; - Send_Task_Stopper_Array stoppers_; - ACE_Thread_Manager thr_mgr_; -}; - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Low_Priority_Setup.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#endif /* TAO_PERF_RTEC_LOW_PRIORITY_SETUP_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.inl deleted file mode 100644 index e9f4cab94a8..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.inl +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @file Low_Priority_Setup.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Makefile.am b/TAO/orbsvcs/performance-tests/RTEvent/lib/Makefile.am deleted file mode 100644 index cc8e9942d43..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Makefile.am +++ /dev/null @@ -1,181 +0,0 @@ -## Process this file with automake to create Makefile.in -## -## $Id$ -## -## This file was generated by MPC. Any changes made directly to -## this file will be lost the next time it is generated. -## -## MPC Command: -## ../bin/mwc.pl -type automake -noreldefs TAO.mwc - -ACE_BUILDDIR = $(top_builddir)/.. -ACE_ROOT = $(top_srcdir)/.. -TAO_BUILDDIR = $(top_builddir) -TAO_IDL = ACE_ROOT=$(ACE_ROOT) TAO_ROOT=$(TAO_ROOT) $(TAO_BUILDDIR)/TAO_IDL/tao_idl -TAO_IDL_DEP = $(TAO_BUILDDIR)/TAO_IDL/tao_idl -TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) -I$(srcdir) -g $(ACE_BUILDDIR)/apps/gperf/src/gperf -TAO_ROOT = $(top_srcdir) - - -## Makefile.RTEC_Perf.am - -if BUILD_CORBA_MESSAGING -if BUILD_RT_CORBA -if !BUILD_ACE_FOR_TAO -if !BUILD_MINIMUM_CORBA - -BUILT_SOURCES = \ - Federated_TestC.cpp \ - Federated_TestC.h \ - Federated_TestC.inl \ - Federated_TestS.cpp \ - Federated_TestS.h \ - Federated_TestS.inl \ - Federated_TestS_T.cpp \ - Federated_TestS_T.h \ - Federated_TestS_T.inl - -CLEANFILES = \ - Federated_Test-stamp \ - Federated_TestC.cpp \ - Federated_TestC.h \ - Federated_TestC.inl \ - Federated_TestS.cpp \ - Federated_TestS.h \ - Federated_TestS.inl \ - Federated_TestS_T.cpp \ - Federated_TestS_T.h \ - Federated_TestS_T.inl - -Federated_TestC.cpp Federated_TestC.h Federated_TestC.inl Federated_TestS.cpp Federated_TestS.h Federated_TestS.inl Federated_TestS_T.cpp Federated_TestS_T.h Federated_TestS_T.inl: Federated_Test-stamp - -Federated_Test-stamp: $(srcdir)/Federated_Test.idl $(TAO_IDL_DEP) - $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs -GT -Wb,export_macro=TAO_RTEC_Perf_Export -Wb,export_include=rtec_perf_export.h $(srcdir)/Federated_Test.idl - @touch $@ - -noinst_LTLIBRARIES = libTAO_RTEC_Perf.la - -libTAO_RTEC_Perf_la_CPPFLAGS = \ - -I$(ACE_ROOT) \ - -I$(ACE_BUILDDIR) \ - -I$(TAO_ROOT) \ - -I$(TAO_BUILDDIR) \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_BUILDDIR)/orbsvcs \ - -DTAO_RTEC_PERF_BUILD_DLL - -libTAO_RTEC_Perf_la_SOURCES = \ - Client_Group.cpp \ - Client_Options.cpp \ - Client_Pair.cpp \ - Consumer.cpp \ - Control.cpp \ - EC_Destroyer.cpp \ - Federated_TestC.cpp \ - Federated_TestS.cpp \ - Implicit_Deactivator.cpp \ - Loopback.cpp \ - Loopback_Consumer.cpp \ - Loopback_Pair.cpp \ - Loopback_Supplier.cpp \ - ORB_Holder.cpp \ - ORB_Shutdown.cpp \ - ORB_Task.cpp \ - ORB_Task_Activator.cpp \ - Peer_Base.cpp \ - PriorityBand_Setup.cpp \ - RTCORBA_Setup.cpp \ - RTClient_Setup.cpp \ - RTEC_Initializer.cpp \ - RTPOA_Setup.cpp \ - RTServer_Setup.cpp \ - RT_Class.cpp \ - Send_Task.cpp \ - Send_Task_Stopper.cpp \ - Supplier.cpp \ - SyncScope_Setup.cpp - -noinst_HEADERS = \ - Auto_Disconnect.cpp \ - Auto_Disconnect.h \ - Auto_Disconnect.inl \ - Client_Group.h \ - Client_Group.inl \ - Client_Options.h \ - Client_Pair.h \ - Client_Pair.inl \ - Consumer.h \ - Control.h \ - EC_Destroyer.h \ - EC_Destroyer.inl \ - Federated_Test.idl \ - Federated_TestC.h \ - Federated_TestC.inl \ - Federated_TestS.h \ - Federated_TestS.inl \ - Federated_TestS_T.cpp \ - Federated_TestS_T.h \ - Federated_TestS_T.inl \ - Implicit_Deactivator.h \ - Implicit_Deactivator.inl \ - Loopback.h \ - Loopback_Consumer.h \ - Loopback_Pair.h \ - Loopback_Pair.inl \ - Loopback_Supplier.h \ - Low_Priority_Setup.cpp \ - Low_Priority_Setup.h \ - Low_Priority_Setup.inl \ - ORB_Holder.h \ - ORB_Holder.inl \ - ORB_Shutdown.h \ - ORB_Shutdown.inl \ - ORB_Task.h \ - ORB_Task.inl \ - ORB_Task_Activator.h \ - ORB_Task_Activator.inl \ - Peer_Base.h \ - PriorityBand_Setup.h \ - PriorityBand_Setup.inl \ - RIR_Narrow.cpp \ - RIR_Narrow.h \ - RTCORBA_Setup.h \ - RTCORBA_Setup.inl \ - RTClient_Setup.h \ - RTClient_Setup.inl \ - RTEC_Initializer.h \ - RTPOA_Setup.h \ - RTPOA_Setup.inl \ - RTServer_Setup.h \ - RTServer_Setup.inl \ - RT_Class.h \ - RT_Class.inl \ - Send_Task.h \ - Send_Task_Stopper.h \ - Send_Task_Stopper.inl \ - Servant_var.cpp \ - Servant_var.h \ - Servant_var.inl \ - Shutdown.cpp \ - Shutdown.h \ - Shutdown.inl \ - Supplier.h \ - SyncScope_Setup.h \ - SyncScope_Setup.inl \ - Task_Activator.cpp \ - Task_Activator.h \ - Task_Activator.inl \ - rtec_perf_export.h - -endif !BUILD_MINIMUM_CORBA -endif !BUILD_ACE_FOR_TAO -endif BUILD_RT_CORBA -endif BUILD_CORBA_MESSAGING - -## Clean up template repositories, etc. -clean-local: - -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.* - -rm -f gcctemp.c gcctemp so_locations *.ics - -rm -rf cxx_repository ptrepository ti_files - -rm -rf templateregistry ir.out - -rm -rf ptrepository SunWS_cache Templates.DB diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Holder.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Holder.cpp deleted file mode 100644 index a2ee9263b1f..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Holder.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file ORB_Holder.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "ORB_Holder.h" - -#if !defined(__ACE_INLINE__) -#include "ORB_Holder.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - ORB_Holder, - "$Id$") - -ORB_Holder::ORB_Holder (int &argc, char *argv[], - const char *orb_id - ACE_ENV_ARG_DECL) - : orb_ (CORBA::ORB_init (argc, argv, orb_id - ACE_ENV_ARG_PARAMETER)) -{ -} - -ORB_Holder::~ORB_Holder (void) -{ - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY { - this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } ACE_CATCH (CORBA::Exception, ex) { - // @@ TODO Log this event, check the Servant_var.cpp comments for - // details. - } ACE_ENDTRY; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Holder.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Holder.h deleted file mode 100644 index a600f780980..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Holder.h +++ /dev/null @@ -1,62 +0,0 @@ -/** - * @file ORB_Holder.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_ORB_HOLDER_H -#define TAO_PERF_RTEC_ORB_HOLDER_H - -#include "rtec_perf_export.h" -#include "tao/ORB.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class ORB_Holder - * - * @brief Implement a helper class to initialize and destroy an ORB. - * - */ -class TAO_RTEC_Perf_Export ORB_Holder -{ -public: - /// Constructor - ORB_Holder (int &argc, char *argv[], - const char *orb_id = 0 - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - - /// Destructor - /** - * @todo This method could benefit from the error logging described - * in Servant_var.cpp - */ - ~ORB_Holder (void); - - /// Access the underlying ORB, using the canonical CORBA memory - /// management model - CORBA::ORB_ptr orb (void); - - /// Implicit conversion to CORBA::ORB_ptr - /** - * It behaves as the .in() methods in the T_var classes. - */ - operator CORBA::ORB_ptr () const; - - /// Smart pointer behavior - CORBA::ORB_ptr operator-> () const; - -private: - /// The ORB - CORBA::ORB_var orb_; -}; - -#if defined(__ACE_INLINE__) -#include "ORB_Holder.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_ORB_HOLDER_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Holder.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Holder.inl deleted file mode 100644 index 60900f61610..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Holder.inl +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @file ORB_Holder.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -ACE_INLINE CORBA::ORB_ptr -ORB_Holder::orb (void) -{ - return CORBA::ORB::_duplicate (this->orb_.in ()); -} - -ACE_INLINE -ORB_Holder::operator CORBA::ORB_ptr (void) const -{ - return this->orb_.in (); -} - -ACE_INLINE CORBA::ORB_ptr -ORB_Holder::operator-> (void) const -{ - return this->orb_.in (); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Shutdown.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Shutdown.cpp deleted file mode 100644 index 2071b0a718e..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Shutdown.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @file ORB_Shutdown.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ -#include "ORB_Shutdown.h" - -#if !defined(__ACE_INLINE__) -#include "ORB_Shutdown.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - ORB_Shutdown, - "$Id$") diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Shutdown.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Shutdown.h deleted file mode 100644 index 4e26067d2a4..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Shutdown.h +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @file ORB_Shutdown.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ -#ifndef TAO_PERF_RTEC_ORB_SHUTDOWN_H -#define TAO_PERF_RTEC_ORB_SHUTDOWN_H -#include /**/ "ace/pre.h" - -#include "rtec_perf_export.h" -#include "tao/ORB.h" - -/** - * @class ORB_Shutdown - * - * @brief Helper functor to call the shutdown() operation in the ORB. - */ -class ORB_Shutdown -{ -public: - void operator() (CORBA::ORB_ptr orb); -}; - -#if defined(__ACE_INLINE__) -#include "ORB_Shutdown.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* TAO_PERF_RTEC_ORB_SHUTDOWN_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Shutdown.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Shutdown.inl deleted file mode 100644 index 13fbb623600..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Shutdown.inl +++ /dev/null @@ -1,23 +0,0 @@ -// -*- C++ -*- - -/** - * @file ORB_Shutdown.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -ACE_INLINE void -ORB_Shutdown::operator () (CORBA::ORB_ptr orb) -{ - ACE_DECLARE_NEW_ENV; - ACE_TRY - { - orb->shutdown (0 - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY { }; - ACE_ENDTRY; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task.cpp deleted file mode 100644 index 369d7f358fa..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @file ORB_Task.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "ORB_Task.h" - -#if !defined(__ACE_INLINE__) -#include "ORB_Task.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - ORB_Task, - "$Id$") - -ORB_Task::ORB_Task (CORBA::ORB_ptr orb) - : orb_ (CORBA::ORB::_duplicate (orb)) -{ -} - -int -ORB_Task::svc (void) -{ - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - return -1; - } - ACE_ENDTRY; - return 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task.h deleted file mode 100644 index 28240439233..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task.h +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @file ORB_Task.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_ORB_TASK_H -#define TAO_PERF_RTEC_ORB_TASK_H - -#include "rtec_perf_export.h" -#include "tao/ORB.h" -#include "ace/Task.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class ORB_Task - * - * @brief Implement a simple ACE_Task to send the events - * - */ -class TAO_RTEC_Perf_Export ORB_Task : public ACE_Task_Base -{ -public: - /// Constructor - ORB_Task (CORBA::ORB_ptr orb); - - /// Run the event loop - int svc (void); - - /// Smart-pointer operator - CORBA::ORB_ptr operator-> (void) const; - -private: - CORBA::ORB_var orb_; -}; - -#if defined(__ACE_INLINE__) -#include "ORB_Task.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_ORB_TASK_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task.inl deleted file mode 100644 index 66344be0f08..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task.inl +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @file ORB_Task.inl - * -` * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -ACE_INLINE CORBA::ORB_ptr -ORB_Task::operator-> (void) const -{ - return this->orb_.in (); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task_Activator.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task_Activator.cpp deleted file mode 100644 index 42bc3fb5676..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task_Activator.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @file ORB_Task_Activator.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "ORB_Task_Activator.h" - -#if !defined(__ACE_INLINE__) -#include "ORB_Task_Activator.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - ORB_Task_Activator, - "$Id$") - -ORB_Task_Activator::~ORB_Task_Activator (void) -{ - if (this->task_ == 0) - return; - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY { - (*this->task_)->shutdown (0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } ACE_CATCHANY { - } ACE_ENDTRY; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task_Activator.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task_Activator.h deleted file mode 100644 index 1a81ca995cc..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task_Activator.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @file ORB_Task_Activator.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_ORB_TASK_ACTIVATOR_H -#define TAO_PERF_RTEC_ORB_TASK_ACTIVATOR_H - -#include "ORB_Task.h" -#include "Task_Activator.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class ORB_Task_Activator - * - * @brief Implement a helper class to activate and stop Send_Tasks. - * - */ -class TAO_RTEC_Perf_Export ORB_Task_Activator : public Task_Activator<ORB_Task> -{ -public: - /// Constructor - ORB_Task_Activator (int priority, - int scheduling_class, - int nthreads, - ORB_Task *task); - - /// Destructor, stop the task and wait for it - ~ORB_Task_Activator (void); -}; - -#if defined(__ACE_INLINE__) -#include "ORB_Task_Activator.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_ORB_TASK_ACTIVATOR_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task_Activator.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task_Activator.inl deleted file mode 100644 index ac24f29094c..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/ORB_Task_Activator.inl +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @file ORB_Task_Activator.inl - * -` * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -ACE_INLINE -ORB_Task_Activator::ORB_Task_Activator (int priority, - int scheduling_class, - int nthreads, - ORB_Task *task) - : Task_Activator<ORB_Task> (priority, - scheduling_class, - nthreads, - task) -{ -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Peer_Base.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Peer_Base.cpp deleted file mode 100644 index 2b0a05a1eee..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Peer_Base.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/** - * @file Peer_Base.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "Peer_Base.h" -#include "RTServer_Setup.h" -#include "RIR_Narrow.h" -#include "Servant_var.h" -#include "RTEC_Initializer.h" -#include "EC_Destroyer.h" -#include "Auto_Disconnect.h" -#include "Loopback.h" - -#include "orbsvcs/Event/EC_Event_Channel.h" -#include "orbsvcs/Event/EC_Gateway_IIOP.h" - -ACE_RCSID (TAO_RTEC_Perf, - Peer_Base, - "$Id$") - -Peer_Base::Peer_Base (CORBA::ORB_ptr orb, - RTServer_Setup &rtserver_setup - ACE_ENV_ARG_DECL) - : orb_ (CORBA::ORB::_duplicate (orb)) - , poa_ (rtserver_setup.poa ()) -{ - Servant_var<TAO_EC_Event_Channel> ec_impl ( - RTEC_Initializer::create (this->poa_.in (), - this->poa_.in (), - rtserver_setup.rtcorba_setup () - ACE_ENV_ARG_PARAMETER) - ); - ACE_CHECK; - - ec_impl->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - PortableServer::ObjectId_var ec_id = - this->poa_->activate_object (ec_impl.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - CORBA::Object_var ec_object = - this->poa_->id_to_reference (ec_id.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - this->event_channel_ = - RtecEventChannelAdmin::EventChannel::_narrow (ec_object.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; -} - -Peer_Base::~Peer_Base (void) -{ -} - -void -Peer_Base::shutdown (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - { - EC_Destroyer ec_destroyer (this->event_channel_.in ()); - this->event_channel_ = - RtecEventChannelAdmin::EventChannel::_nil (); - } - - this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); -} - -CORBA::Object_ptr -Peer_Base::channel (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return CORBA::Object::_duplicate (this->event_channel_.in ()); -} - -void -Peer_Base::connect (Federated_Test::Peer_ptr remote_peer - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Connecting....\n")); - CORBA::Object_var remote_ec_object = - remote_peer->channel (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - RtecEventChannelAdmin::EventChannel_var remote_ec = - RtecEventChannelAdmin::EventChannel::_narrow (remote_ec_object.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - Servant_var<TAO_EC_Gateway_IIOP> gateway (new TAO_EC_Gateway_IIOP); - gateway->init (remote_ec.in (), - this->event_channel_.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - RtecEventChannelAdmin::Observer_var observer = - gateway->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - RtecEventChannelAdmin::Observer_Handle h = - this->event_channel_->append_observer (observer.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - gateway->observer_handle (h); -} - -Federated_Test::Loopback_ptr -Peer_Base::setup_loopback (CORBA::Long experiment_id, - CORBA::Long base_event_type - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - Servant_var<Loopback> loopback ( - new Loopback (experiment_id, - base_event_type, - this->poa_.in (), - this->poa_.in (), - this->event_channel_.in () - ACE_ENV_ARG_PARAMETER)); - ACE_CHECK_RETURN (Federated_Test::Loopback::_nil ()); - - Auto_Disconnect<Loopback> disconnect (loopback); - - Federated_Test::Loopback_var lb = - loopback->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (Federated_Test::Loopback::_nil ()); - - disconnect.release (); - - return lb._retn (); -} - -PortableServer::POA_ptr -Peer_Base::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::POA::_duplicate (this->poa_.in ()); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Peer_Base.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Peer_Base.h deleted file mode 100644 index 948ef5b20a1..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Peer_Base.h +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @file Peer_Base.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - * - */ - -#ifndef TAO_RTEC_PERF_PEER_BASE_H -#define TAO_RTEC_PERF_PEER_BASE_H - -#include "Federated_TestS.h" -#include "orbsvcs/RtecEventChannelAdminC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -class RTServer_Setup; - -/** - * @class Peer_Base - * - * @brief Implement the shared portions of Federated_Test::Peer - * servants - * - */ -class TAO_RTEC_Perf_Export Peer_Base - : public virtual POA_Federated_Test::Peer -{ -public: - /// Constructor - Peer_Base (CORBA::ORB_ptr orb, - RTServer_Setup &rtserver_setup - ACE_ENV_ARG_DECL); - - /// Destructor - virtual ~Peer_Base (void); - - //@{ - /** @name The Federated_Test::Peer methods - */ - virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual CORBA::Object_ptr - channel (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void connect (Federated_Test::Peer_ptr remote_peer - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - - Federated_Test::Loopback_ptr setup_loopback (CORBA::Long experiment_id, - CORBA::Long base_event_type - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - - PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - //@} - -protected: - /// Keep a reference to the ORB, used in shutdown - CORBA::ORB_var orb_; - - /// The POA used for the suppliers, consumers, activate the EC and - /// as this servant's _default_POA() - PortableServer::POA_var poa_; - - /// Event Channel references - RtecEventChannelAdmin::EventChannel_var event_channel_; -}; - -#endif /* TAO_RTEC_PERF_PEER_BASE_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/PriorityBand_Setup.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/PriorityBand_Setup.cpp deleted file mode 100644 index bbb980bde7b..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/PriorityBand_Setup.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/** - * @file PriorityBand_Setup.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "PriorityBand_Setup.h" -#include "RTCORBA_Setup.h" -#include "RIR_Narrow.h" - -#if !defined(__ACE_INLINE__) -#include "PriorityBand_Setup.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - PriorityBand_Setup, - "$Id$") - -PriorityBand_Setup::PriorityBand_Setup (CORBA::ORB_ptr orb, - const RTCORBA_Setup &rtcorba_setup - ACE_ENV_ARG_DECL) -{ - CORBA::PolicyManager_var policy_manager = - RIR_Narrow<CORBA::PolicyManager>::resolve (orb, - "ORBPolicyManager" - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - RTCORBA::RTORB_var rtorb = - RIR_Narrow<RTCORBA::RTORB>::resolve (orb, - "RTORB" - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - const RTCORBA::ThreadpoolLanes &lanes = rtcorba_setup.lanes (); - - RTCORBA::PriorityBands priority_bands (3); priority_bands.length (3); - for (CORBA::ULong i = 0; i != lanes.length (); ++i) - { - priority_bands[i].low = lanes[i].lane_priority; - priority_bands[i].high = lanes[i].lane_priority; - } - - CORBA::PolicyList policy_list (1); policy_list.length (1); - - policy_list[0] = - rtorb->create_priority_banded_connection_policy (priority_bands - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - policy_manager->set_policy_overrides (policy_list, - CORBA::ADD_OVERRIDE - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; -} - -PriorityBand_Setup::~PriorityBand_Setup (void) -{ -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/PriorityBand_Setup.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/PriorityBand_Setup.h deleted file mode 100644 index 33cebd601cf..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/PriorityBand_Setup.h +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @file PriorityBand_Setup.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_PRIORITYBAND_SETUP_H -#define TAO_PERF_RTEC_PRIORITYBAND_SETUP_H - -#include "rtec_perf_export.h" -#include "tao/ORB.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -class RTCORBA_Setup; - -/** - * @class PriorityBand_Setup - * - * @brief Simplify the initialization of performance tests. - * - */ -class TAO_RTEC_Perf_Export PriorityBand_Setup -{ -public: - /// Constructor - PriorityBand_Setup (CORBA::ORB_ptr orb, - const RTCORBA_Setup &rtcorba_setup - ACE_ENV_ARG_DECL); - - /// Destructor - /** - * It is a no-op, but it shuts up g++ - */ - ~PriorityBand_Setup (void); -}; - -#if defined(__ACE_INLINE__) -#include "PriorityBand_Setup.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_PRIORITYBAND_SETUP_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/PriorityBand_Setup.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/PriorityBand_Setup.inl deleted file mode 100644 index c9ee6e6c756..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/PriorityBand_Setup.inl +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @file PriorityBand_Setup.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RIR_Narrow.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/RIR_Narrow.cpp deleted file mode 100644 index ba719129de4..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RIR_Narrow.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @file RIR_Narrow.cpp - * - * $Id$ - * - * @author Jody Hagins <jody@atdesk.com> - * @author Carlos O'Ryan <coryan@uci.edu> - */ -#ifndef TAO_PERF_RTEC_RIR_NARROW_CPP -#define TAO_PERF_RTEC_RIR_NARROW_CPP - -#include "RIR_Narrow.h" - -#include "tao/Environment.h" - -#include "ace/Log_Msg.h" - -template<class Interface> ACE_TYPENAME RIR_Narrow<Interface>::Interface_ptr -RIR_Narrow<Interface>::resolve (CORBA::ORB_ptr orb, - const char *object_id - ACE_ENV_ARG_DECL) -{ - Interface_var interface; - - ACE_TRY - { - CORBA::Object_var object = - orb->resolve_initial_references (object_id - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - interface = Interface::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (CORBA::is_nil (interface.in ())) - { - ACE_ERROR ((LM_ERROR, - "Panic - error while narrowing <%s>\n", - object_id)); - ACE_OS::exit (1); - } - }ACE_CATCHANY{ - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Caught an exception \n"); - } - ACE_ENDTRY; - return interface._retn (); -} - -#endif /* TAO_PERF_RTEC_RIR_NARROW_CPP */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RIR_Narrow.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/RIR_Narrow.h deleted file mode 100644 index 3cb61f27724..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RIR_Narrow.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @file RIR_Narrow.h - * - * $Id$ - * - * @author Jody Hagins <jody@atdesk.com> - * @author Carlos O'Ryan <coryan@uci.edu> - * - */ -#ifndef TAO_PERF_RTEC_RIR_NARROW_H -#define TAO_PERF_RTEC_RIR_NARROW_H - -#include "tao/ORB.h" -#include "tao/Object.h" - -/** - * @class RIR_Narrow - * - * @brief Implement a helper method to narrow the results from - * resolve_initial_references. - * - */ -template<class Interface> -class RIR_Narrow -{ -public: - typedef ACE_TYPENAME Interface::_ptr_type Interface_ptr; - typedef ACE_TYPENAME Interface::_var_type Interface_var; - - static Interface_ptr resolve (CORBA::ORB_ptr orb, - const char *object_id - ACE_ENV_ARG_DECL); -}; - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "RIR_Narrow.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#endif /* TAO_PERF_RTEC_RIR_NARROW_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTCORBA_Setup.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTCORBA_Setup.cpp deleted file mode 100644 index b5c6d99ae37..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTCORBA_Setup.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/** - * @file RTCORBA_Setup.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "RTCORBA_Setup.h" -#include "RIR_Narrow.h" -#include "RT_Class.h" - -#include "ace/Log_Msg.h" - -#if !defined(__ACE_INLINE__) -#include "RTCORBA_Setup.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - RTCORBA_Setup, - "$Id$") - -RTCORBA_Setup::RTCORBA_Setup (CORBA::ORB_ptr orb, - const RT_Class &rtclass, - int nthreads - ACE_ENV_ARG_DECL) - : lanes_ (3) -{ - this->priority_mapping_manager_ = - RIR_Narrow<RTCORBA::PriorityMappingManager>::resolve (orb, - "PriorityMappingManager" - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - this->priority_mapping_ = - this->priority_mapping_manager_->mapping (); - - RTCORBA::Current_var current = - RIR_Narrow<RTCORBA::Current>::resolve (orb, - "RTCurrent" - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - RTCORBA::Priority corba_prc_priority; - this->priority_mapping_->to_CORBA (rtclass.priority_process (), - corba_prc_priority); - - current->the_priority (corba_prc_priority - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - this->lanes_.length (3); - - this->setup_lane (rtclass.priority_high (), - this->lanes_[0] - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - this->setup_lane (rtclass.priority_process (), - this->lanes_[1] - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - this->setup_lane (rtclass.priority_low (), - this->lanes_[2] - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - this->lanes_[2].static_threads = nthreads; - - this->process_priority_ = this->lanes_[1].lane_priority; -} - -void -RTCORBA_Setup::setup_lane (int priority, - RTCORBA::ThreadpoolLane &lane - ACE_ENV_ARG_DECL) -{ - if (!this->priority_mapping_->to_CORBA (priority, - lane.lane_priority)) - ACE_THROW (CORBA::BAD_PARAM ()); - - lane.static_threads = 1; - lane.dynamic_threads = 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTCORBA_Setup.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTCORBA_Setup.h deleted file mode 100644 index 96f7c487daf..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTCORBA_Setup.h +++ /dev/null @@ -1,63 +0,0 @@ -/** - * @file RTCORBA_Setup.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_RTCORBA_SETUP_H -#define TAO_PERF_RTEC_RTCORBA_SETUP_H - -#include "rtec_perf_export.h" -#include "tao/RTCORBA/RTCORBA.h" -#include "tao/RTCORBA/Priority_Mapping_Manager.h" -#include "ace/Auto_Ptr.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -class RT_Class; - -/** - * @class RTCORBA_Setup - * - * @brief Simplify the initialization of performance tests. - * - */ -class TAO_RTEC_Perf_Export RTCORBA_Setup -{ -public: - /// Constructor - RTCORBA_Setup (CORBA::ORB_ptr orb, - const RT_Class &rtclass, - int nthreads - ACE_ENV_ARG_DECL); - - /// Return the thread pool lanes appropriate for the benchamrks - const RTCORBA::ThreadpoolLanes & lanes (void) const; - - /// Return the priority of the process - RTCORBA::Priority process_priority (void) const; - -private: - void setup_lane (int priority, RTCORBA::ThreadpoolLane &lane - ACE_ENV_ARG_DECL_WITH_DEFAULTS ); - -private: - RTCORBA::PriorityMappingManager_var priority_mapping_manager_; - - RTCORBA::ThreadpoolLanes lanes_; - - RTCORBA::Priority process_priority_; - - /// Just a plain pointer, the ORB owns the memory... - RTCORBA::PriorityMapping *priority_mapping_; -}; - -#if defined(__ACE_INLINE__) -#include "RTCORBA_Setup.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_RTCORBA_SETUP_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTCORBA_Setup.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTCORBA_Setup.inl deleted file mode 100644 index e63b68593e3..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTCORBA_Setup.inl +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @file RTCORBA_Setup.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -ACE_INLINE const RTCORBA::ThreadpoolLanes & -RTCORBA_Setup::lanes (void) const -{ - return this->lanes_; -} - -ACE_INLINE RTCORBA::Priority -RTCORBA_Setup::process_priority (void) const -{ - return this->process_priority_; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTClient_Setup.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTClient_Setup.cpp deleted file mode 100644 index 6e3d06125f6..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTClient_Setup.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @file RTClient_Setup.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "RTClient_Setup.h" -#include "RIR_Narrow.h" -#include "tao/RTCORBA/RTCORBA.h" - -#include "ace/Log_Msg.h" - -#if !defined(__ACE_INLINE__) -#include "RTClient_Setup.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - RTClient_Setup, - "$Id$") - -RTClient_Setup::RTClient_Setup (int use_rt_corba, - CORBA::ORB_ptr orb, - const RT_Class &rt_class, - int nthreads - ACE_ENV_ARG_DECL) - : use_rt_corba_ (use_rt_corba) - , syncscope_setup_ (orb ACE_ENV_ARG_PARAMETER) -{ - ACE_CHECK; - - if (use_rt_corba) - { - ACE_AUTO_PTR_RESET (this->rtcorba_setup_, - new RTCORBA_Setup (orb, - rt_class, - nthreads - ACE_ENV_ARG_PARAMETER), - RTCORBA_Setup - ); - ACE_CHECK; - -#if 0 - ACE_AUTO_PTR_RESET (this->priorityband_setup_, - new PriorityBand_Setup (orb, - *this->rtcorba_setup_ - ACE_ENV_ARG_PARAMETER), - PriorityBand_Setup - ); - ACE_CHECK; - -#endif /* 0 */ - } -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTClient_Setup.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTClient_Setup.h deleted file mode 100644 index 8bea1503961..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTClient_Setup.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file RTClient_Setup.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_RTCLIENT_SETUP_H -#define TAO_PERF_RTEC_RTCLIENT_SETUP_H -#include /**/ "ace/pre.h" - -#include "RTCORBA_Setup.h" -#include "PriorityBand_Setup.h" -#include "SyncScope_Setup.h" -#include "ace/Auto_Ptr.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -class RT_Class; - -/** - * @class RTClient_Setup - * - * @brief Simplify the initialization of performance tests. - * - */ -class TAO_RTEC_Perf_Export RTClient_Setup -{ -public: - /// Constructor - RTClient_Setup (int use_rt_corba, - CORBA::ORB_ptr orb, - const RT_Class &rt_class, - int nthreads - ACE_ENV_ARG_DECL); - - /// Return non-zero if RTCORBA is enabled - int use_rt_corba (void) const; - - /// Return the underlying RTCORBA_Setup pointer - RTCORBA_Setup *rtcorba_setup (void); - -private: - int use_rt_corba_; - - auto_ptr<RTCORBA_Setup> rtcorba_setup_; - auto_ptr<PriorityBand_Setup> priorityband_setup_; - SyncScope_Setup syncscope_setup_; -}; - -#if defined(__ACE_INLINE__) -#include "RTClient_Setup.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* TAO_PERF_RTEC_RTCLIENT_SETUP_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTClient_Setup.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTClient_Setup.inl deleted file mode 100644 index 7e7eebf1254..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTClient_Setup.inl +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @file RTClient_Setup.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -ACE_INLINE int -RTClient_Setup::use_rt_corba (void) const -{ - return this->use_rt_corba_; -} - -ACE_INLINE RTCORBA_Setup * -RTClient_Setup::rtcorba_setup (void) -{ - return this->rtcorba_setup_.get (); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTEC_Initializer.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTEC_Initializer.cpp deleted file mode 100644 index 408b52b3557..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTEC_Initializer.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/** - * @file RTEC_Initializer.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "RTEC_Initializer.h" -#include "RTCORBA_Setup.h" - -#include "orbsvcs/Event/EC_Event_Channel.h" -#include "orbsvcs/Event/EC_Default_Factory.h" -#include "orbsvcs/Event/EC_RTCORBA_Factory.h" - -#include "ace/Dynamic_Service.h" - -ACE_RCSID (TAO_PERF_RTEC, - RTEC_Initializer, - "$Id$") - -TAO_EC_Event_Channel * -RTEC_Initializer::create (PortableServer::POA_ptr consumer_poa, - PortableServer::POA_ptr supplier_poa, - RTCORBA_Setup * rtcorba_setup - ACE_ENV_ARG_DECL_NOT_USED) -{ - TAO_EC_Event_Channel_Attributes attr (consumer_poa, - supplier_poa); - - if (rtcorba_setup == 0) - { - return new TAO_EC_Event_Channel (attr); - } - - TAO_EC_Factory *body = - ACE_Dynamic_Service<TAO_EC_Factory>::instance ("EC_Factory"); - auto_ptr<TAO_EC_Factory> factory ( - new TAO_EC_RTCORBA_Factory (body, - rtcorba_setup->lanes ())); - - TAO_EC_Event_Channel *ec = - new TAO_EC_Event_Channel (attr, factory.get (), 1); - factory.release (); - - return ec; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTEC_Initializer.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTEC_Initializer.h deleted file mode 100644 index 64645bcbf18..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTEC_Initializer.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * @file RTEC_Initializer.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_RTEC_INITIALIZER_H -#define TAO_PERF_RTEC_RTEC_INITIALIZER_H - -#include "rtec_perf_export.h" -#include "tao/ORB.h" -#include "tao/RTCORBA/RTCORBA.h" -#include "tao/PortableServer/PortableServer.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL -class TAO_EC_Event_Channel; -TAO_END_VERSIONED_NAMESPACE_DECL - -class RTCORBA_Setup; - -/** - * @class RTEC_Initializer - * - * @brief Implement a helper method to initialize and instance of - * TAO's Real-time Event Service - * - */ -class TAO_RTEC_Perf_Export RTEC_Initializer -{ -public: - /// Return a new event channel - static TAO_EC_Event_Channel *create (PortableServer::POA_ptr consumer_poa, - PortableServer::POA_ptr supplier_poa, - RTCORBA_Setup *rtcorba_setup - ACE_ENV_ARG_DECL); -}; - -#endif /* TAO_PERF_RTEC_RTEC_INITIALIZER_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTEC_Perf.mpc b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTEC_Perf.mpc deleted file mode 100644 index c73d8a6a356..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTEC_Perf.mpc +++ /dev/null @@ -1,16 +0,0 @@ -// $Id$ - -project(RTEC_Perf): strategies, rtcorbaevent, minimum_corba { - sharedname = TAO_RTEC_Perf - idlflags += -Wb,export_macro=TAO_RTEC_Perf_Export -Wb,export_include=rtec_perf_export.h - dynamicflags += TAO_RTEC_PERF_BUILD_DLL - - Template_Files { - Auto_Disconnect.cpp - Low_Priority_Setup.cpp - RIR_Narrow.cpp - Servant_var.cpp - Shutdown.cpp - Task_Activator.cpp - } -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTPOA_Setup.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTPOA_Setup.cpp deleted file mode 100644 index fdaaee06d30..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTPOA_Setup.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/** - * @file RTPOA_Setup.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "RTPOA_Setup.h" -#include "RIR_Narrow.h" -#include "RTCORBA_Setup.h" -#include "tao/RTCORBA/RTCORBA.h" - -#include "ace/Log_Msg.h" - -#if !defined(__ACE_INLINE__) -#include "RTPOA_Setup.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - RTPOA_Setup, - "$Id$") - -RTPOA_Setup::RTPOA_Setup (CORBA::ORB_ptr orb, - const RTCORBA_Setup &rtcorba_setup - ACE_ENV_ARG_DECL) -{ - RTPortableServer::POA_var root_poa = - RIR_Narrow<RTPortableServer::POA>::resolve (orb, - "RootPOA" - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - RTCORBA::RTORB_var rtorb = - RIR_Narrow<RTCORBA::RTORB>::resolve (orb, - "RTORB" - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - const CORBA::ULong stacksize = 1024 * 1024; // 1 Mb - const RTCORBA::ThreadpoolLanes &lanes = rtcorba_setup.lanes (); - const CORBA::Boolean allow_borrowing = 0; - const CORBA::Boolean allow_request_buffering = 0; - const CORBA::ULong max_buffered_requests = 0; // dummy value - const CORBA::ULong max_request_buffer_size = 0; // dummy value - - RTCORBA::ThreadpoolId pool_id = - rtorb->create_threadpool_with_lanes (stacksize, - lanes, - allow_borrowing, - allow_request_buffering, - max_buffered_requests, - max_request_buffer_size - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - // @@ We need an 'auto_ptr for thread pools' here! - CORBA::PolicyList policies (4); policies.length (4); - policies[0] = - rtorb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED, - rtcorba_setup.process_priority () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - policies[1] = - root_poa->create_id_assignment_policy (PortableServer::SYSTEM_ID - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - policies[2] = - root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - -#if 0 - policies.length (3); -#else - policies[3] = - rtorb->create_threadpool_policy (pool_id - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; -#endif /* 0 */ - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->poa_ = - root_poa->create_POA ("RTEC_Perf", - poa_manager.in (), - policies - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - for (CORBA::ULong i = 0; i != policies.length (); ++i) - { - policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTPOA_Setup.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTPOA_Setup.h deleted file mode 100644 index dc3d19f0054..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTPOA_Setup.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @file RTPOA_Setup.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_RTPOA_SETUP_H -#define TAO_PERF_RTEC_RTPOA_SETUP_H - -#include "rtec_perf_export.h" -#include "tao/RTPortableServer/RTPortableServer.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -class RTCORBA_Setup; - -/** - * @class RTPOA_Setup - * - * @brief Simplify the initialization of performance tests. - * - */ -class TAO_RTEC_Perf_Export RTPOA_Setup -{ -public: - /// Constructor - RTPOA_Setup (CORBA::ORB_ptr orb, - const RTCORBA_Setup &rtcorba_setup - ACE_ENV_ARG_DECL); - - PortableServer::POA_ptr poa (void); - -private: - PortableServer::POA_var poa_; -}; - -#if defined(__ACE_INLINE__) -#include "RTPOA_Setup.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_RTPOA_SETUP_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTPOA_Setup.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTPOA_Setup.inl deleted file mode 100644 index 1cbd13ca230..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTPOA_Setup.inl +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @file RTPOA_Setup.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -ACE_INLINE PortableServer::POA_ptr -RTPOA_Setup::poa (void) -{ - return PortableServer::POA::_duplicate (this->poa_.in ()); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTServer_Setup.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTServer_Setup.cpp deleted file mode 100644 index 609f8f7b314..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTServer_Setup.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/** - * @file RTServer_Setup.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "RTServer_Setup.h" -#include "RIR_Narrow.h" -#include "tao/RTCORBA/RTCORBA.h" - -#include "ace/Log_Msg.h" - -#if !defined(__ACE_INLINE__) -#include "RTServer_Setup.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - RTServer_Setup, - "$Id$") - -RTServer_Setup::RTServer_Setup (int use_rt_corba, - CORBA::ORB_ptr orb, - const RT_Class &rt_class, - int nthreads - ACE_ENV_ARG_DECL) - : RTClient_Setup (use_rt_corba, - orb, - rt_class, - nthreads - ACE_ENV_ARG_PARAMETER) -{ - ACE_CHECK; - - if (use_rt_corba) - { - ACE_AUTO_PTR_RESET (this->rtpoa_setup_, - new RTPOA_Setup (orb, - *this->rtcorba_setup () - ACE_ENV_ARG_PARAMETER), - RTPOA_Setup - ); - ACE_CHECK; - - this->poa_ = - this->rtpoa_setup_->poa (); - } - else - { - this->poa_ = - RIR_Narrow<RTPortableServer::POA>::resolve (orb, - "RootPOA" - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTServer_Setup.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTServer_Setup.h deleted file mode 100644 index eecc21ec6f8..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTServer_Setup.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - * @file RTServer_Setup.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_RTSERVER_SETUP_H -#define TAO_PERF_RTEC_RTSERVER_SETUP_H -#include /**/ "ace/pre.h" - -#include "RTClient_Setup.h" -#include "RTPOA_Setup.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class RTServer_Setup - * - * @brief Simplify the initialization of performance tests. - * - */ -class TAO_RTEC_Perf_Export RTServer_Setup : public RTClient_Setup -{ -public: - /// Constructor - RTServer_Setup (int use_rt_corba, - CORBA::ORB_ptr orb, - const RT_Class &rt_class, - int nthreads - ACE_ENV_ARG_DECL); - - /// Return the POA configured by the RTPOA_Setup - PortableServer::POA_ptr poa (void); - -private: - PortableServer::POA_var poa_; - - auto_ptr<RTPOA_Setup> rtpoa_setup_; -}; - -#if defined(__ACE_INLINE__) -#include "RTServer_Setup.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* TAO_PERF_RTEC_RTSERVER_SETUP_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTServer_Setup.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/RTServer_Setup.inl deleted file mode 100644 index 40816da97c0..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RTServer_Setup.inl +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @file RTServer_Setup.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -ACE_INLINE PortableServer::POA_ptr -RTServer_Setup::poa (void) -{ - return PortableServer::POA::_duplicate (this->poa_.in ()); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RT_Class.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/RT_Class.cpp deleted file mode 100644 index 65abada52e8..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RT_Class.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @file RT_Class.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "RT_Class.h" - -#include "ace/Log_Msg.h" -#include "ace/OS_NS_errno.h" - -#if !defined(__ACE_INLINE__) -#include "RT_Class.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - RT_Class, - "$Id$") - -RT_Class::RT_Class (void) - : prc_sched_class_ (ACE_SCHED_FIFO) - , thr_sched_class_ (THR_SCHED_FIFO) -{ - int priority = - (ACE_Sched_Params::priority_min (this->prc_sched_class_) - + ACE_Sched_Params::priority_max (this->prc_sched_class_)) / 2; - - if (ACE_OS::sched_params (ACE_Sched_Params (this->prc_sched_class_, - priority, - ACE_SCOPE_PROCESS)) != 0) - { - if (ACE_OS::last_error () == EPERM) - { - ACE_DEBUG ((LM_DEBUG, - "WARNING (%P|%t) user does not have " - "permissions to run real-time tests.\n" - "The test will run in the time-shared " - "class, it may fail or produce unpredictable " - "results\n")); - this->prc_sched_class_ = ACE_SCHED_OTHER; - this->thr_sched_class_ = THR_SCHED_DEFAULT; - } - } - this->priority_low_ = - ACE_Sched_Params::priority_min (this->prc_sched_class_); - this->priority_high_ = - ACE_Sched_Params::priority_max (this->prc_sched_class_); - this->priority_process_ = - (this->priority_low_ + this->priority_high_) / 2; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RT_Class.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/RT_Class.h deleted file mode 100644 index d4dd0888362..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RT_Class.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file RT_Class.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_RT_CLASS_H -#define TAO_PERF_RTEC_RT_CLASS_H - -#include "rtec_perf_export.h" -#include "ace/Sched_Params.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class RT_Class - * - * @brief Simplify the initialization of performance tests. - * - */ -class TAO_RTEC_Perf_Export RT_Class -{ -public: - /// Constructor - RT_Class (void); - - /** @name Return the test scheduling parameters - */ - //@{ - /// Return the process scheduling class selected for the test - int prc_sched_class (void) const; - - /// Return the thread scheduling class selected for the test - int thr_sched_class (void) const; - - /// Return the process priority selected for the test - int priority_process (void) const; - - /// Return the (thread, native) priority for the high priority - /// task(s) in the test - int priority_high (void) const; - - /// Return the (thread, native) priority for the low priority - /// task(s) in the test - int priority_low (void) const; - - //@} - -private: - /// The process scheduling class - int prc_sched_class_; - - /// The thread scheduling class - int thr_sched_class_; - - /// The process priority - int priority_process_; - - /// The high priority task(s) priority - int priority_high_; - - /// The low priority task(s) priority - int priority_low_; -}; - -#if defined(__ACE_INLINE__) -#include "RT_Class.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_RT_CLASS_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/RT_Class.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/RT_Class.inl deleted file mode 100644 index a6a60d8e7a0..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/RT_Class.inl +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file RT_Class.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -ACE_INLINE int -RT_Class::prc_sched_class (void) const -{ - return this->prc_sched_class_; -} - -ACE_INLINE int -RT_Class::thr_sched_class (void) const -{ - return this->thr_sched_class_; -} - -ACE_INLINE int -RT_Class::priority_process (void) const -{ - return this->priority_process_; -} - -ACE_INLINE int -RT_Class::priority_high (void) const -{ - return this->priority_high_; -} - -ACE_INLINE int -RT_Class::priority_low (void) const -{ - return this->priority_low_; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task.cpp deleted file mode 100644 index 125e75c85e7..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/** - * @file Send_Task.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "Send_Task.h" - -#include "orbsvcs/Time_Utilities.h" - -#include "ace/Barrier.h" -#include "ace/OS_NS_unistd.h" - -ACE_RCSID (TAO_PERF_RTEC, - Send_Task, - "$Id$") - -Send_Task::Send_Task (void) - : iterations_ (0) - , period_in_usecs_ (0) - , startup_sleep_ (0) - , event_type_ (0) - , event_source_ (0) - , barrier_ (0) - , stop_ (0) -{ -} - -void -Send_Task::init (int iterations, - int period_in_usecs, - int startup_sleep, - int event_type, - int event_source, - Supplier *supplier, - ACE_Barrier *barrier) -{ - this->iterations_ = iterations; - this->period_in_usecs_ = period_in_usecs; - this->startup_sleep_ = startup_sleep; - this->event_type_ = event_type; - this->event_source_ = event_source; - this->supplier_ = - TAO::Utils::Servant_Var<Supplier>::_duplicate (supplier); - this->barrier_ = barrier; -} - -void -Send_Task::stop (void) -{ - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - this->stop_ = 1; -} - -int -Send_Task::svc (void) -{ - if (this->barrier_ == 0) - return -1; - - this->barrier_->wait (); - - ACE_Time_Value startup (0, this->startup_sleep_); - ACE_OS::sleep (startup); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) - Thread started, " - "iterations = %d, period = %d, event_type = %d\n", - this->iterations_, this->period_in_usecs_, - this->event_type_)); - - - int start_i = 0; - if (this->iterations_ == 0) - { - // Starting from 1 results in an infinite loop (well, so long - // that I call it infinite), which is exactly what we want, kind - // of hackish, oh well. - start_i = 1; - } - - RtecEventComm::EventSet event (1); - event.length (1); - event[0].header.type = this->event_type_; - event[0].header.source = this->event_source_; - event[0].header.ttl = 1; - - ACE_DECLARE_NEW_CORBA_ENV; - for (int i = start_i; i != this->iterations_; ++i) - { - if ((i + 1) % 1000 == 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) - Thread has sent %d messages @ %T\n", - i + 1)); - } - - ACE_Time_Value period (0, this->period_in_usecs_); - ACE_OS::sleep (period); - { - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, -1); - if (this->stop_ != 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) - Thread has been stopped\n")); - return 0; - } - } - ACE_hrtime_t creation = ACE_OS::gethrtime (); - ORBSVCS_Time::hrtime_to_TimeT (event[0].header.creation_time, - creation); - ACE_TRY - { - // push one event... - this->supplier_->push (event ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Caught exception:"); - } - ACE_ENDTRY; - } - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) - Thread finished\n")); - return 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task.h deleted file mode 100644 index 318bb24e2aa..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * @file Send_Task.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_SEND_TASK_H -#define TAO_PERF_RTEC_SEND_TASK_H - -#include "tao/Utils/Servant_Var.h" -#include "Supplier.h" -#include "ace/Task.h" -#include "ace/Synch_Traits.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -class ACE_Barrier; -ACE_END_VERSIONED_NAMESPACE_DECL - -/** - * @class Send_Task - * - * @brief Implement a simple ACE_Task to send the events - * - */ -class TAO_RTEC_Perf_Export Send_Task : public ACE_Task_Base -{ -public: - /// Constructor - Send_Task (void); - - /// This is for compilers that are a PITA complaining that we are - /// hiding something. - virtual int init (int argc, ACE_TCHAR *argv[]) - { - return ACE_Task_Base::init (argc, argv); - } - - void init (int iterations, - int period_in_usecs, - int startup_sleep, - int event_type, - int event_source, - Supplier *supplier, - ACE_Barrier *barrier); - - /// Run the experiment - int svc (void); - - /// Stop the experiment - void stop (void); - -private: - int iterations_; - - int period_in_usecs_; - - int startup_sleep_; - - int event_type_; - - int event_source_; - - TAO::Utils::Servant_Var<Supplier> supplier_; - - ACE_Barrier *barrier_; - - TAO_SYNCH_MUTEX mutex_; - int stop_; -}; - - -#endif /* TAO_PERF_RTEC_SEND_TASK_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task_Stopper.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task_Stopper.cpp deleted file mode 100644 index 6b8779e632e..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task_Stopper.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @file Send_Task_Stopper.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "Send_Task_Stopper.h" - -#if !defined(__ACE_INLINE__) -#include "Send_Task_Stopper.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - Send_Task_Stopper, - "$Id$") - -Send_Task_Stopper::~Send_Task_Stopper (void) -{ - if (this->task_ == 0) - return; - this->task_->stop (); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task_Stopper.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task_Stopper.h deleted file mode 100644 index 3212409700c..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task_Stopper.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @file Send_Task_Stopper.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_SEND_TASK_STOPPER_H -#define TAO_PERF_RTEC_SEND_TASK_STOPPER_H - -#include "Send_Task.h" -#include "Task_Activator.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class Send_Task_Stopper - * - * @brief Implement a helper class to activate and stop Send_Tasks. - * - */ -class TAO_RTEC_Perf_Export Send_Task_Stopper : public Task_Activator<Send_Task> -{ -public: - /// Constructor - Send_Task_Stopper (int priority, - int scheduling_class, - Send_Task *task); - - /// Destructor, stop the task and wait for it - ~Send_Task_Stopper (void); -}; - -#if defined(__ACE_INLINE__) -#include "Send_Task_Stopper.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_SEND_TASK_STOPPER_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task_Stopper.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task_Stopper.inl deleted file mode 100644 index b620c992a2d..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Send_Task_Stopper.inl +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @file Send_Task_Stopper.inl - * -` * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -ACE_INLINE -Send_Task_Stopper::Send_Task_Stopper (int priority, - int scheduling_class, - Send_Task *task) - : Task_Activator<Send_Task> (priority, scheduling_class, 1, - task) -{ -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Servant_var.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Servant_var.cpp deleted file mode 100644 index 7e154ad088b..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Servant_var.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/** - * @file Servant_var.cpp - * - * $Id$ - * - * @author Jody Hagins <jody@atdesk.com> - * @author Carlos O'Ryan <coryan@uci.edu> - */ -#ifndef TAO_PERF_RTEC_SERVANT_VAR_CPP -#define TAO_PERF_RTEC_SERVANT_VAR_CPP - -#include "Servant_var.h" -#include "tao/Environment.h" - -#if !defined(__ACE_INLINE__) -#include "Servant_var.inl" -#endif /* __ACE_INLINE__ */ - -template<class SERVANT> -Servant_var<SERVANT>::~Servant_var () -{ - if (this->ptr_ == 0) - return; - - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY { - this->ptr_->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } ACE_CATCHANY { - // @@ TODO This event should be logged. Cannot throw because that - // would make it impossible to use this class effectively. - // - // Suggested implementation: - // - // class Servant_Logger { - // public: - // static void log_error (void *servant_pointer) - // { - // if (Servant_Logger::instance_ == 0) - // return; - // Servant_Logger::instance_->logger_implementation (servant_pointer); - // } - // static Servant_Logger *set_instance (Servant_Logger*); - // - // virtual void logger_implementation (void *servant_pointer) = 0; - // - // private: - // static Servant_Logger *instance_; - // }; - // - // Using an abstract class for logging decouples the code from any - // particular implementation, and provides a light-weight, - // high-performance solution for applications that want to avoid - // logging. - } ACE_ENDTRY; -} - -#endif /* TAO_PERF_RTEC_SERVANT_VAR_CPP */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Servant_var.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Servant_var.h deleted file mode 100644 index 4d035f8b43c..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Servant_var.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @file Servant_var.h - * - * $Id$ - * - * @author Jody Hagins <jody@atdesk.com> - * @author Carlos O'Ryan <coryan@uci.edu> - */ -#ifndef TAO_PERF_RTEC_SERVANT_VAR_H -#define TAO_PERF_RTEC_SERVANT_VAR_H - -#include "ace/Swap.h" -#include "tao/corba.h" - -/** - * @class Servant_var - * - * @brief Implement a smart pointer class for Servants - * - * All servants, are reference counted objects. - * Unfortunately the specification lacks such an useful smart pointer - * class to manage their life-cycle. - */ -template<class SERVANT> -class Servant_var -{ -public: - /// Constructor - /** - * @param s The contained servant. The constructor assumes - * ownership. - */ - explicit Servant_var (SERVANT *s = 0); - - /// Copy constructor - Servant_var (const Servant_var<SERVANT> &rhs); - - /// Assignment - Servant_var<SERVANT>& operator= (const Servant_var<SERVANT> &rhs); - - /// Assignment - Servant_var<SERVANT>& operator= (SERVANT *s); - - /// Destructor - ~Servant_var (); - - /// Helper method to increase the reference count on a servant. - static SERVANT *duplicate (SERVANT *servart); - - //@{ - /** @name Smart pointer operations - */ - const SERVANT * operator->() const; - SERVANT * operator->(); - - operator SERVANT *(); - operator const SERVANT * () const; - //@} - - //@{ - /** @name Canonical CORBA T_var methods - */ - SERVANT *in () const; - SERVANT *&out (); - SERVANT *&inout (); - //@} - -private: - /// The owned object - SERVANT *ptr_; -}; - -#if defined(__ACE_INLINE__) -#include "Servant_var.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Servant_var.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#endif /* TAO_PERF_RTEC_SERVANT_VAR_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Servant_var.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/Servant_var.inl deleted file mode 100644 index bc65b994d0d..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Servant_var.inl +++ /dev/null @@ -1,89 +0,0 @@ -/** - * @file Servant_var.inl - * - * $Id$ - * - * @author Jody Hagins <jody@atdesk.com> - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -template<class SERVANT> ACE_INLINE SERVANT * -Servant_var<SERVANT>::duplicate (SERVANT *servant) -{ - if (servant != 0) - servant->_add_ref (); - return servant; -} - -template<class SERVANT> ACE_INLINE -Servant_var<SERVANT>::Servant_var (SERVANT *s) - : ptr_ (s) -{ -} - -template<class SERVANT> ACE_INLINE -Servant_var<SERVANT>::Servant_var (const Servant_var<SERVANT> &rhs) - : ptr_ (Servant_var<SERVANT>::duplicate (rhs.ptr_)) -{ -} - -template<class SERVANT> ACE_INLINE Servant_var<SERVANT>& -Servant_var<SERVANT>::operator= (const Servant_var<SERVANT> &rhs) -{ - Servant_var<SERVANT> tmp (rhs); - ACE_Swap<SERVANT*>::swap (this->ptr_, tmp.ptr_); - return *this; -} - -template<class SERVANT> ACE_INLINE Servant_var<SERVANT>& -Servant_var<SERVANT>::operator= (SERVANT *rhs) -{ - Servant_var<SERVANT> tmp (rhs); - ACE_Swap<SERVANT*>::swap (this->ptr_, tmp.ptr_); - return *this; -} - -template<class SERVANT> ACE_INLINE SERVANT* -Servant_var<SERVANT>::operator-> () -{ - return this->ptr_; -} - -template<class SERVANT> ACE_INLINE const SERVANT* -Servant_var<SERVANT>::operator-> () const -{ - return this->ptr_; -} - -template<class SERVANT> ACE_INLINE -Servant_var<SERVANT>::operator SERVANT *() -{ - return this->ptr_; -} - -template<class SERVANT> ACE_INLINE -Servant_var<SERVANT>::operator const SERVANT * () const -{ - return this->ptr_; -} - -template<class SERVANT> ACE_INLINE SERVANT * -Servant_var<SERVANT>::in () const -{ - return this->ptr_; -} - -template<class SERVANT> ACE_INLINE SERVANT *& -Servant_var<SERVANT>::out () -{ - Servant_var<SERVANT> tmp; - ACE_Swap<SERVANT*>::swap (tmp.ptr_, this->ptr_); - - return this->ptr_; -} - -template<class SERVANT> ACE_INLINE SERVANT *& -Servant_var<SERVANT>::inout () -{ - return this->ptr_; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Shutdown.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Shutdown.cpp deleted file mode 100644 index 84d42ba3bc6..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Shutdown.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @file Shutdown.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ -#ifndef TAO_PERF_RTEC_SHUTDOWN_CPP -#define TAO_PERF_RTEC_SHUTDOWN_CPP - -#include "Shutdown.h" - -#if !defined(__ACE_INLINE__) -#include "Shutdown.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_SHUTDOWN_CPP */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Shutdown.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Shutdown.h deleted file mode 100644 index d0737b7bf01..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Shutdown.h +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @file Shutdown.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ -#ifndef TAO_PERF_RTEC_SHUTDOWN_H -#define TAO_PERF_RTEC_SHUTDOWN_H - -#include "ace/config-all.h" -#include "ace/CORBA_macros.h" - -/** - * @class Shutdown - * - * @brief Helper functor to call the shutdown() method of a class. - */ -template<class Client> -class Shutdown -{ -public: - void operator() (Client *client); -}; - -#if defined(__ACE_INLINE__) -#include "Shutdown.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Shutdown.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#endif /* TAO_PERF_RTEC_SHUTDOWN_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Shutdown.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/Shutdown.inl deleted file mode 100644 index aa5af0895cb..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Shutdown.inl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @file Shutdown.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -template<class Client> ACE_INLINE void -Shutdown<Client>::operator () (Client *client) -{ - ACE_DECLARE_NEW_ENV; - ACE_TRY - { - client->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY { }; - ACE_ENDTRY; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Supplier.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Supplier.cpp deleted file mode 100644 index 11c14e80232..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Supplier.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/** - * @file Supplier.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "Supplier.h" -#include "Implicit_Deactivator.h" - -ACE_RCSID (TAO_PERF_RTEC, - Supplier, - "$Id$") - -Supplier::Supplier (CORBA::Long experiment_id, - CORBA::Long event_type, - CORBA::Long event_range, - PortableServer::POA_ptr poa) - : experiment_id_ (experiment_id) - , event_type_ (event_type) - , event_range_ (event_range) - , default_POA_ (PortableServer::POA::_duplicate (poa)) -{ -} - -void -Supplier::connect (RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) -{ - RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = - ec->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (!CORBA::is_nil (this->proxy_consumer_.in ())) - return; - - this->proxy_consumer_ = - supplier_admin->obtain_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - - RtecEventComm::PushSupplier_var supplier = - this->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - RtecEventChannelAdmin::SupplierQOS supplier_qos; - supplier_qos.is_gateway = 0; - supplier_qos.publications.length (this->event_range_); - for (CORBA::Long i = 0; i != this->event_range_; ++i) - { - RtecEventComm::EventHeader& sh = - supplier_qos.publications[i].event.header; - sh.type = this->event_type_ + 2 * i; - sh.source = this->experiment_id_; - } - - this->proxy_consumer_->connect_push_supplier (supplier.in (), - supplier_qos - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; -} - -void -Supplier::disconnect (ACE_ENV_SINGLE_ARG_DECL) -{ - RtecEventChannelAdmin::ProxyPushConsumer_var proxy; - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (CORBA::is_nil (this->proxy_consumer_.in ())) - return; - proxy = this->proxy_consumer_._retn (); - } - - Implicit_Deactivator deactivator (this - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_TRY - { - proxy->disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY {} ACE_ENDTRY; -} - -void -Supplier::push (const RtecEventComm::EventSet &events - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // ACE_DEBUG ((LM_DEBUG, "Supplier pushing (%d,%d)\n", - // events[0].header.type, events[0].header.source)); - RtecEventChannelAdmin::ProxyPushConsumer_var proxy; - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (CORBA::is_nil (this->proxy_consumer_.in ())) - return; - proxy = this->proxy_consumer_; - } - - proxy->push (events ACE_ENV_ARG_PARAMETER); -} - -void -Supplier::disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - this->proxy_consumer_ = - RtecEventChannelAdmin::ProxyPushConsumer::_nil (); -} - -PortableServer::POA_ptr -Supplier::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return PortableServer::POA::_duplicate (this->default_POA_.in ()); -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Supplier.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Supplier.h deleted file mode 100644 index 4ae8d76a414..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Supplier.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @file Supplier.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_SUPPLIER_H -#define TAO_PERF_RTEC_SUPPLIER_H - -#include "rtec_perf_export.h" -#include "orbsvcs/RtecEventCommS.h" -#include "orbsvcs/RtecEventChannelAdminC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class Supplier - * - * @brief Implement a simple supplier to keep track of the latency - * - */ -class TAO_RTEC_Perf_Export Supplier - : public virtual POA_RtecEventComm::PushSupplier -{ -public: - /// Constructor - /** - * The experiment ID is used to configure the supplier ID on the - * publication. - */ - Supplier (CORBA::Long experiment_id, - CORBA::Long event_type, - CORBA::Long event_range, - PortableServer::POA_ptr poa); - - /// Connect to the event channel - void connect (RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL); - - /// Disconnect from the event channel - void disconnect (ACE_ENV_SINGLE_ARG_DECL); - - void push (const RtecEventComm::EventSet &events - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - - //@{ - /** @name The RtecEventComm::PushSupplier methods - */ - virtual void disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - //@} - -private: - /// The experiment id - /// Synchronize access to the internal data - TAO_SYNCH_MUTEX mutex_; - - /// The experiment id - CORBA::Long experiment_id_; - - /// The event type - CORBA::Long event_type_; - - /// The event type - CORBA::Long event_range_; - - /// The proxy this object is connected to - RtecEventChannelAdmin::ProxyPushConsumer_var proxy_consumer_; - - /// The default poa - PortableServer::POA_var default_POA_; -}; - -#endif /* TAO_PERF_RTEC_SUPPLIER_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/SyncScope_Setup.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/SyncScope_Setup.cpp deleted file mode 100644 index b0f66d12d9e..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/SyncScope_Setup.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file SyncScope_Setup.cpp - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#include "SyncScope_Setup.h" -#include "RIR_Narrow.h" -#include "tao/AnyTypeCode/Any.h" - -#if !defined(__ACE_INLINE__) -#include "SyncScope_Setup.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (TAO_PERF_RTEC, - SyncScope_Setup, - "$Id$") - -SyncScope_Setup::SyncScope_Setup (CORBA::ORB_ptr orb, - Messaging::SyncScope value - ACE_ENV_ARG_DECL) -{ - this->init (orb, value - ACE_ENV_ARG_PARAMETER); -} - -SyncScope_Setup::SyncScope_Setup (CORBA::ORB_ptr orb - ACE_ENV_ARG_DECL) -{ - this->init (orb, Messaging::SYNC_WITH_TARGET - ACE_ENV_ARG_PARAMETER); -} - -void -SyncScope_Setup::init (CORBA::ORB_ptr orb, - Messaging::SyncScope value - ACE_ENV_ARG_DECL) -{ - CORBA::PolicyManager_var policy_manager = - RIR_Narrow<CORBA::PolicyManager>::resolve (orb, - "ORBPolicyManager" - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - CORBA::PolicyList policy_list (1); - policy_list.length (1); - - CORBA::Any sync_scope; - sync_scope <<= value; - - // @@ We need a helper class that automatically calls the - // destroy() method on each policy... - policy_list[0] = - orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE, - sync_scope - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - policy_manager->set_policy_overrides (policy_list, - CORBA::ADD_OVERRIDE - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - policy_list[0]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; -} - -SyncScope_Setup::~SyncScope_Setup (void) -{ -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/SyncScope_Setup.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/SyncScope_Setup.h deleted file mode 100644 index 9de943cc419..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/SyncScope_Setup.h +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @file SyncScope_Setup.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_SYNCSCOPE_SETUP_H -#define TAO_PERF_RTEC_SYNCSCOPE_SETUP_H - -#include "rtec_perf_export.h" -#include "tao/Messaging/Messaging.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class SyncScope_Setup - * - * @brief Simplify the initialization of performance tests. - * - */ -class TAO_RTEC_Perf_Export SyncScope_Setup -{ -public: - /// Constructor - SyncScope_Setup (CORBA::ORB_ptr orb - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - - SyncScope_Setup (CORBA::ORB_ptr orb, - Messaging::SyncScope value - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - - /// Destructor - /** - * It is a no-op, but it shuts up g++ - */ - ~SyncScope_Setup (void); - -private: - /// Implement the shared code between both constructors - void init (CORBA::ORB_ptr orb, - Messaging::SyncScope value - ACE_ENV_ARG_DECL); -}; - -#if defined(__ACE_INLINE__) -#include "SyncScope_Setup.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_PERF_RTEC_SYNCSCOPE_SETUP_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/SyncScope_Setup.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/SyncScope_Setup.inl deleted file mode 100644 index 1b47e4a8abf..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/SyncScope_Setup.inl +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @file SyncScope_Setup.inl - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Task_Activator.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Task_Activator.cpp deleted file mode 100644 index 3eb00cee362..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Task_Activator.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @file Task_Activator.cpp - * - * $Id$ - * - * @author Jody Hagins <jody@atdesk.com> - * @author Carlos O'Ryan <coryan@uci.edu> - */ -#ifndef TAO_PERF_RTEC_TASK_ACTIVATOR_CPP -#define TAO_PERF_RTEC_TASK_ACTIVATOR_CPP - -#include "Task_Activator.h" -#include "tao/Environment.h" -#include "ace/Log_Msg.h" - -#if !defined(__ACE_INLINE__) -#include "Task_Activator.inl" -#endif /* __ACE_INLINE__ */ - -template<class Task> -Task_Activator<Task>::Task_Activator (int priority, - int scheduling_class, - int nthreads, - Task *task) - : task_ (task) -{ - if (this->task_ == 0) - return; - - // We explicitly ignore errors, this is exactly what we do in the - // test anyway. In a generic class we would need to throw an - // exception. - if (this->task_->activate (scheduling_class | THR_NEW_LWP | THR_JOINABLE, - nthreads, - 1, // force_activation - priority) == -1) - { - // Release, we cannot wait for it or anything like that... - this->task_ = 0; - ACE_DEBUG ((LM_DEBUG, - "Task_Activator failed %p\n", "")); - } -} - -template<class Task> -Task_Activator<Task>::~Task_Activator (void) -{ - if (this->task_ == 0) - return; - - // Wait until the task terminates - this->task_->wait (); -} - -#endif /* TAO_PERF_RTEC_TASK_ACTIVATOR_CPP */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Task_Activator.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/Task_Activator.h deleted file mode 100644 index f2f78836c29..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Task_Activator.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @file Task_Activator.h - * - * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -#ifndef TAO_PERF_RTEC_TASK_ACTIVATOR_H -#define TAO_PERF_RTEC_TASK_ACTIVATOR_H - -#include "ace/Task.h" -#include "ace/Copy_Disabled.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class Task_Activator - * - * @brief Simplify the activation and destruction of tasks - * - */ -template<class Task> -class Task_Activator : private ACE_Copy_Disabled -{ -public: - /// Constructor - /** - * @todo If we were to define a generic ACE class for this then we - * should certainly change the constructor. For example, we - * should pass an structure with all the thread activation - * arguments, like:<BR> - * Activation_Properties properties;<BR> - * Task_Activator<Foo> activator (properties, foo);<BR> - * <BR> - * The advantage of using an structure instead of a long list - * of arguments is that the user can change some of the - * defaults without having to know all the other values, plus - * it evolves better: over time if arguments are added the - * client code does not change.<BR> - * <BR> - * With a little trickery we can even change the arguments in - * a single line:<BR> - * Activation_Properties props ().priority (x).stack_size (y);<BR> - * <BR> - * all you need to do is return <CODE>*this</CODE> from each - * modifier. - * - */ - Task_Activator (int priority, - int scheduling_class, - int nthreads, - Task *task); - - /// Destructor - /** - * Wait until the task terminates before returning, this is useful - * in programs that need to guarantee that the task object is not - * destroyed before the underlying threads finished. - * However, the use of this class implicitly requires that the task - * will eventually terminate! - * - * Sometimes it is better to derive from this class and implement a - * cooperative termination protocol in the destructor of the derived - * class. - */ - ~Task_Activator (void); - - /// Release the task, do not terminate it - void release (void); - -protected: - Task *task_; -}; - -#if defined(__ACE_INLINE__) -#include "Task_Activator.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Task_Activator.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#endif /* TAO_PERF_RTEC_TASK_ACTIVATOR_H */ diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Task_Activator.inl b/TAO/orbsvcs/performance-tests/RTEvent/lib/Task_Activator.inl deleted file mode 100644 index 147a3e53769..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Task_Activator.inl +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @file Task_Activator.inl - * -` * $Id$ - * - * @author Carlos O'Ryan <coryan@uci.edu> - */ - -template<class Task> ACE_INLINE void -Task_Activator<Task>::release () -{ - this->task_ = 0; -} diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/rtec_perf_export.h b/TAO/orbsvcs/performance-tests/RTEvent/lib/rtec_perf_export.h deleted file mode 100644 index 7a32929cf47..00000000000 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/rtec_perf_export.h +++ /dev/null @@ -1,40 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl -// ------------------------------ -#ifndef TAO_RTEC_PERF_EXPORT_H -#define TAO_RTEC_PERF_EXPORT_H - -#include "ace/config-all.h" - -#if defined (TAO_AS_STATIC_LIBS) -# if !defined (TAO_RTEC_PERF_HAS_DLL) -# define TAO_RTEC_PERF_HAS_DLL 0 -# endif /* ! TAO_RTEC_PERF_HAS_DLL */ -#else -# if !defined (TAO_RTEC_PERF_HAS_DLL) -# define TAO_RTEC_PERF_HAS_DLL 1 -# endif /* ! TAO_RTEC_PERF_HAS_DLL */ -#endif - -#if defined (TAO_RTEC_PERF_HAS_DLL) && (TAO_RTEC_PERF_HAS_DLL == 1) -# if defined (TAO_RTEC_PERF_BUILD_DLL) -# define TAO_RTEC_Perf_Export ACE_Proper_Export_Flag -# define TAO_RTEC_PERF_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define TAO_RTEC_PERF_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* TAO_RTEC_PERF_BUILD_DLL */ -# define TAO_RTEC_Perf_Export ACE_Proper_Import_Flag -# define TAO_RTEC_PERF_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define TAO_RTEC_PERF_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* TAO_RTEC_PERF_BUILD_DLL */ -#else /* TAO_RTEC_PERF_HAS_DLL == 1 */ -# define TAO_RTEC_Perf_Export -# define TAO_RTEC_PERF_SINGLETON_DECLARATION(T) -# define TAO_RTEC_PERF_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* TAO_RTEC_PERF_HAS_DLL == 1 */ - -#endif /* TAO_RTEC_PERF_EXPORT_H */ - -// End of auto generated file. |