diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2010-04-12 14:11:44 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2010-04-12 14:11:44 +0000 |
commit | e30c0be78e222e708fc5010c5b678a72fc8ca4be (patch) | |
tree | fe2dde0d9d3e5aba67984c94c561b7f70f5a2cde /modules/CIAO/performance-tests/Benchmark | |
parent | 7627760802fdf292403c971e81c2dd113ebf4912 (diff) | |
download | ATCD-e30c0be78e222e708fc5010c5b678a72fc8ca4be.tar.gz |
branching/tagging
Diffstat (limited to 'modules/CIAO/performance-tests/Benchmark')
49 files changed, 2717 insertions, 0 deletions
diff --git a/modules/CIAO/performance-tests/Benchmark/Benchmark.idl b/modules/CIAO/performance-tests/Benchmark/Benchmark.idl new file mode 100644 index 00000000000..9323d071455 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/Benchmark.idl @@ -0,0 +1,47 @@ +// $Id$ +//============================================================================= +/** + * @file Benchmark.idl + * + * Definition of test interfaces used in the Benchmark module. + * + * @author Diego, Arvind <arvindk@dre.vanderbilt.edu> + */ +//============================================================================= + +#ifndef CIAO_BENCHMARK_IDL +#define CIAO_BENCHMARK_IDL + +#pragma ciao lem "BenchmarkE.idl" + +module Benchmark +{ + /** + * @interface RoundTrip + * + * This Latency test provides operations to measure the round-trip + * latency of the ORB. The interface is the same as that of + * $TAO_ROOT/performance-tests/Latency/Single_Threaded + */ + + /// Measure roundtrip delay + interface LatencyTest + { + /// A simple method to measure roundtrip delays + long makeCall (in long send_time); + + }; + + /** + * @interface Controller + * + * This interface is used to start the tests. + */ + interface Controller + { + /// Start the test + void start (); + }; +}; + +#endif /*CIAO_BENCHMARK_IDL*/ diff --git a/modules/CIAO/performance-tests/Benchmark/Benchmark.mpc b/modules/CIAO/performance-tests/Benchmark/Benchmark.mpc new file mode 100644 index 00000000000..cdaa1adf905 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/Benchmark.mpc @@ -0,0 +1,98 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -n -c server Benchmark" + +project(Benchmark_idl_gen) : componentidldefaults { + custom_only = 1 + idlflags += -Wb,stub_export_macro=BENCHMARK_STUB_Export \ + -Wb,stub_export_include=Benchmark_stub_export.h \ + -Wb,skel_export_macro=BENCHMARK_SKEL_Export \ + -Wb,skel_export_include=Benchmark_skel_export.h + + IDL_Files { + Benchmark.idl + } +} + +project(Benchmark_lem_gen) : ciaoidldefaults, anytypecode { + after += Benchmark_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=BENCHMARK_STUB_Export \ + -Wb,stub_export_include=Benchmark_stub_export.h -SS + + IDL_Files { + BenchmarkE.idl + } +} + +project(Benchmark_stub) : ccm_stub { + after += Benchmark_lem_gen + libs += + + sharedname = Benchmark_stub + dynamicflags = BENCHMARK_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + BenchmarkEC.cpp + BenchmarkC.cpp + } + + Header_Files { + BenchmarkC.h + Benchmark_stub_export.h + } + + Inline_Files { + BenchmarkC.inl + } +} + + +project(Benchmark_skel) : ciao_executor { + after += Benchmark_stub + sharedname = Benchmark_skel + libs += Benchmark_stub + + + dynamicflags = BENCHMARK_SKEL_BUILD_DLL + + IDL_Files { + } + + Source_Files { + BenchmarkS.cpp + } + + Header_Files { + BenchmarkS.h + Benchmark_skel_export.h + } + + Inline_Files { + BenchmarkS.inl + } +} + +project (Benchmark_server) : taoserver, strategies, ciao_executor { + exename = server + after += Benchmark_skel + libs += Benchmark_skel Benchmark_stub Benchmark_stub + + IDL_Files { + } + + Source_Files { + server.cpp + LatencyTest.cpp + } + + Header_Files { + LatencyTest.h + } + + Inline_Files { + } +} + diff --git a/modules/CIAO/performance-tests/Benchmark/LatencyTest.cpp b/modules/CIAO/performance-tests/Benchmark/LatencyTest.cpp new file mode 100644 index 00000000000..2de09618b8f --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/LatencyTest.cpp @@ -0,0 +1,22 @@ +// +// $Id$ +// +#include "LatencyTest.h" + +LatencyTest::LatencyTest (CORBA::ORB_ptr orb) + : orb_ (CORBA::ORB::_duplicate (orb)) +{ +} + + +CORBA::Long +LatencyTest::makeCall (CORBA::Long send_time) +{ + return send_time; +} + +void +LatencyTest::shutdown () +{ + this->orb_->shutdown (0); +} diff --git a/modules/CIAO/performance-tests/Benchmark/LatencyTest.h b/modules/CIAO/performance-tests/Benchmark/LatencyTest.h new file mode 100644 index 00000000000..bafda6e76c0 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/LatencyTest.h @@ -0,0 +1,31 @@ +// +// $Id$ +// + +#ifndef LATENCYTEST_H +#define LATENCYTEST_H +#include /**/ "ace/pre.h" + +#include "BenchmarkS.h" + +/// Implement the Test::LatencyTest interface +class LatencyTest +: public virtual POA_Benchmark::LatencyTest +{ + public: + /// Constructor + LatencyTest (CORBA::ORB_ptr orb); + + // = The skeleton methods + virtual CORBA::Long makeCall (CORBA::Long send_time); + + virtual void shutdown (); + + private: + /// Use an ORB reference to conver strings to objects and shutdown + /// the application. + CORBA::ORB_var orb_; +}; + +#include /**/ "ace/post.h" +#endif /* LATENCYTEST_H */ diff --git a/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/Client_Task.cpp b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/Client_Task.cpp new file mode 100644 index 00000000000..de8238096f4 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/Client_Task.cpp @@ -0,0 +1,29 @@ +// $Id$ + +#include "Client_Task.h" + +Client_Task::Client_Task (Benchmark::RoundTripClient_ptr roundtrip) + : roundtrip_(Benchmark::RoundTripClient::_duplicate(roundtrip)) +{ +} + +int +Client_Task::svc (void) +{ + // Create the Controller + CORBA::Object_var obj = this->roundtrip_->provide_facet ("controller"); + Benchmark::Controller_var controller = Benchmark::Controller::_narrow (obj.in ()); + + // Check if controller is non nil + if (CORBA::is_nil (controller.in ())) + ACE_ERROR_RETURN ((LM_DEBUG, + "Nil Benchmark::Controller reference\n"), + 1); + + ACE_DEBUG ((LM_DEBUG, "Sending Trigger\n")); + + // Send out the trigger message + controller->start(); + + return 0; +} diff --git a/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/Client_Task.h b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/Client_Task.h new file mode 100644 index 00000000000..e3330a76307 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/Client_Task.h @@ -0,0 +1,29 @@ +// +// $Id$ +// + +#ifndef CLIENT_TASK_H +#define CLIENT_TASK_H +#include /**/ "ace/pre.h" + +#include "RoundTripClientC.h" +#include "ace/Task.h" + +/// Implement the Test::Client_Task interface +class Client_Task : public ACE_Task_Base +{ +public: + /// Constructor + Client_Task (Benchmark::RoundTripClient_ptr roundtrip); + + /// The service method + virtual int svc (void); + +private: + + /// The object reference used for this test + Benchmark::RoundTripClient_var roundtrip_; +}; + +#include /**/ "ace/post.h" +#endif /* CLIENT_TASK_H */ diff --git a/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/Multi_Threaded.mpc b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/Multi_Threaded.mpc new file mode 100644 index 00000000000..c5a5c09eb00 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/Multi_Threaded.mpc @@ -0,0 +1,25 @@ +// $Id$ + +project (Multi_Threaded_client) : ccm_stub, strategies { + exename = client + after += Benchmark_RoundTripClient_stub + libs += RoundTripClient_stub Benchmark_stub + libpaths += .. + includes += ../RoundTripClient + libpaths += ../RoundTripClient + + IDL_Files { + } + + Source_Files { + client.cpp + Client_Task.cpp + } + + Header_Files { + Client_Task.h + } + + Inline_Files { + } +} diff --git a/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/NOTE.txt b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/NOTE.txt new file mode 100644 index 00000000000..a0ae140a0ee --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/NOTE.txt @@ -0,0 +1,15 @@ +$Id$ + +PRE Condition: +============= +This test assumes that there is an appropriate svc.conf file present in +$CIAO_ROOOT/tools/ComponentServer. Moreover, the Component Server does not +curerntly expose interfaces to configure multi-threading. Hence, this +experiment, will produce the desired results *only* when this feature has been +added in CIAO. Till then, the server will run in single-threaded mode. + +Similarly, the client also requires the svc.conf file that enables +multi-threading. This file is present in this directory. + +The svc.conf file required for this experiment can be obtained from +$TAO_ROOT/performance-tests/Latency/Thread_Pool diff --git a/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/README b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/README new file mode 100644 index 00000000000..0cadcfc8e51 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/README @@ -0,0 +1,12 @@ +/** + +@page Multi_Threaded README File + + This black box experiment measures "multi-threading" support present in CIAO. +In this test, a client component spawns four threads that concurrently invoke operations +on the server. The latency, throughput and jitter for each thread is printed out. The +motivation of this test is to observe scalability when a ComponentServer receives +multiple requests from parallel clients. A sister test, ../Multi_Process documents +behavior as parallel clients (separate processes) invoke requests on the server. + +*/ diff --git a/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/client.cpp b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/client.cpp new file mode 100644 index 00000000000..9cfc951f332 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/client.cpp @@ -0,0 +1,90 @@ +// +// $Id$ +// + +//============================================================== +/** + * @file client.cpp + * + * This is a client program that also acts as an Event Trigger. Four client tasks simultaneously + * send out trigger to the ClientRoundTrip component to start the latency measurements in + * parallel. This test is used to test scalability as the number of client components increase + * + * @author Arvind S. Krishna <arvindk@dre.vanderbilt.edu> + */ +//=============================================================== + +#include "Client_Task.h" + +//IOR of the components +const char *ior1 = "file://comp1.ior"; +const char *ior2 = "file://comp2.ior"; +const char *ior3 = "file://comp3.ior"; +const char *ior4 = "file://comp4.ior"; + + +int +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) +{ + try + { + + // Initialize orb + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + + // Resolve HomeFinder interface + CORBA::Object_var obj1 + = orb->string_to_object (ior1); + + CORBA::Object_var obj2 + = orb->string_to_object (ior2); + + CORBA::Object_var obj3 + = orb->string_to_object (ior3); + + CORBA::Object_var obj4 + = orb->string_to_object (ior4); + + if (CORBA::is_nil (obj1.in ()) || + CORBA::is_nil (obj2.in ()) || + CORBA::is_nil (obj3.in ()) || + CORBA::is_nil (obj4.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + "Nil Benchmark::RoundtripClient reference\n"), + 1); + } + + //Narrow to appropriate interfaces + Benchmark::RoundTripClient_var client1= + Benchmark::RoundTripClient::_narrow (obj1.in()); + + Benchmark::RoundTripClient_var client2= + Benchmark::RoundTripClient::_narrow (obj1.in()); + + Benchmark::RoundTripClient_var client3= + Benchmark::RoundTripClient::_narrow (obj1.in()); + + Benchmark::RoundTripClient_var client4= + Benchmark::RoundTripClient::_narrow (obj1.in()); + + //Create Tasks + Client_Task task1(client1.in()); + Client_Task task2(client2.in()); + Client_Task task3(client3.in()); + Client_Task task4(client4.in()); + + task1.activate(THR_NEW_LWP | THR_JOINABLE); + task2.activate(THR_NEW_LWP | THR_JOINABLE); + task3.activate(THR_NEW_LWP | THR_JOINABLE); + task4.activate(THR_NEW_LWP | THR_JOINABLE); + + task1.thr_mgr()->wait(); + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("Exception Caught:"); + return 1; + } + return 0; +} diff --git a/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/run_test.pl b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/run_test.pl new file mode 100755 index 00000000000..5c31666c186 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/run_test.pl @@ -0,0 +1,95 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +# +# @@ Run this script from ../descriptors/ instead. +# + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::TestTarget; + +$status = 0; + +$daemon_base = "daemon.ior"; +$am_base = "am.ior"; + +$tg = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n"; + +$daemon_ior = $tg->LocalFile ($daemon_base); +$am_ior = $tg->LocalFile ($am_base); + +$CIAO_ROOT=$ENV{'CIAO_ROOT'}; + +$tg->DeleteFile ($daemon_base); +$tg->DeleteFile ($am_base); + +# CIAO Daemon command line arguments +$daemon_args = "-c $CIAO_ROOT/tools/ComponentServer/svc.conf -ORBEndpoint iiop://localhost:10000 -o $daemon_ior -i CIAO_Installation_Data.ini -n $CIAO_ROOT/tools/ComponentServer/ComponentServer"; + +# CIAO Daemon command line arguments +$daemon_args2 = "-c $CIAO_ROOT/tools/ComponentServer/svc.conf -ORBEndpoint iiop://localhost:12000 -o $daemon_ior -i CIAO_Installation_Data.ini -n $CIAO_ROOT/tools/ComponentServer/ComponentServer"; + +$assembly_manager_args = "-o $am_ior -c test.dat"; + +$ad_args = " -k file://$am_ior -a Multi_Threaded.cad"; + +# CIAO daemon process definition +$DS = $tg->CreateProcess ("$CIAO_ROOT/tools/Daemon/CIAO_Daemon", + "$daemon_args"); + +## Starting up the CIAO daemon +$DS->Spawn (); +if ($tg->WaitForFileTimed($daemon_base, + $tg->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: Could not find daemon ior file <$daemon_ior>\n"; + $DS->Kill (); + exit 1; +} + +# CIAO daemon process definition +$DS2 = $tg->CreateProcess ("$CIAO_ROOT/tools/Daemon/CIAO_Daemon", + "$daemon_args2"); + +## Starting up the CIAO daemon +$DS2->Spawn (); +if ($tg->WaitForFileTimed($daemon_base, + $tg->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: Could not find daemon ior file <$daemon_ior>\n"; + $DS->Kill (); + exit 1; +} + +$AM = $tg->CreateProcess ("$CIAO_ROOT/tools/Assembly_Deployer/Assembly_Manager", + $assembly_manager_args); +$AM->Spawn (); +if ($tg->WaitForFileTimed($am_base, + $tg->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: Could not find assembly ior file <$am_ior>\n"; + $AM->Kill (); + exit 1; +} + +$AD = $tg->CreateProcess ("$CIAO_ROOT/tools/Assembly_Deployer/Assembly_Deployer", + $ad_args); +$AD->Spawn (); + +sleep (5); + +#Start the client to send the trigger message +$CL = $tg->CreateProcess ("../Multi_Threaded/client", ""); +$CL->SpawnWaitKill($tg->ProcessStopWaitInterval ()); + +$AM->Kill (); +$AD->Kill (); +$DS->Kill (); +$CL->Kill (); +$DS2->Kill (); + +$tg->DeleteFile ($daemon_base); +$tg->DeleteFile ($am_base); + +exit $status; diff --git a/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/svc.conf b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/svc.conf new file mode 100644 index 00000000000..46ff5409fdf --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/Multi_Threaded/svc.conf @@ -0,0 +1,5 @@ +# +# $Id$ +# +static Advanced_Resource_Factory "-ORBReactorMaskSignals 0 -ORBFlushingStrategy blocking" +static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBClientConnectionHandler RW" diff --git a/modules/CIAO/performance-tests/Benchmark/README b/modules/CIAO/performance-tests/Benchmark/README new file mode 100644 index 00000000000..97390d0ec0b --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/README @@ -0,0 +1,22 @@ +/** + +@page BasicSP README File + + The most basic of the Boeing scenarios that form part of the +OEP. This is done to illustrate how the OEP can be implemented using +CIAO. + + Compilation of the CIDL compiler source code requires the +Boost library, which is not included in this distribution of +ACE+TAO+CIAO. The Boost library is available at + +http://www.boost.org + + Alternatively, a binary executable of the CIAO +CIDL compiler can be downloaded from + +http://www.dre.vanderbilt.edu/CIAO/CIDL.html + +Versions are available at the above site for Linux and Windows. + +*/ diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTrip/README b/modules/CIAO/performance-tests/Benchmark/RoundTrip/README new file mode 100644 index 00000000000..8bd003eaf72 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTrip/README @@ -0,0 +1,9 @@ +/** + +@page RoundTrip README File + + The RoundTrip component. This component measures the round-trip +latency for single-threaded case. This test adapted from +$TAO_ROOT/performance-tests/Latency/Single_Threaded + +*/ diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip.idl b/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip.idl new file mode 100644 index 00000000000..8b682c67cbe --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip.idl @@ -0,0 +1,31 @@ +// $Id$ +//============================================================================= +/** + * @file RoundTrip.idl + * + * Definition of the Component that provides the LatencyTest interface + * + */ +//============================================================================= + +#ifndef CIAO_ROUNDTRIP_IDL +#define CIAO_ROUNDTRIP_IDL + +#include "../Benchmark.idl" +#include <Components.idl> + +#pragma ciao lem "RoundTripE.idl" + +module Benchmark +{ + component RoundTrip + { + provides LatencyTest latency; + }; + + home RoundTripHome manages RoundTrip + { + }; +}; + +#endif /* CIAO_ROUNDTRIP_IDL*/ diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip.mpc b/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip.mpc new file mode 100644 index 00000000000..4beb5d5713a --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip.mpc @@ -0,0 +1,136 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p Benchmark -l .. -c client Roundtrip" + +project(Benchmark_RoundTrip_idl_gen) : componentidldefaults { + custom_only = 1 + after += Benchmark_idl_gen + idlflags += \ + -Wb,stub_export_macro=ROUNDTRIP_STUB_Export \ + -Wb,stub_export_include=RoundTrip_stub_export.h \ + -Wb,skel_export_macro=ROUNDTRIP_SVNT_Export \ + -Wb,skel_export_include=RoundTrip_svnt_export.h \ + -Wb,exec_export_macro=ROUNDTRIP_EXEC_Export \ + -Wb,exec_export_include=RoundTrip_exec_export.h -I.. + + IDL_Files { + RoundTrip.idl + } +} + +project(Benchmark_RoundTrip_lem_gen) : ciaoidldefaults { + custom_only = 1 + after += Benchmark_RoundTrip_idl_gen + idlflags += -Wb,export_macro=ROUNDTRIP_EXEC_Export \ + -Wb,export_include=RoundTrip_exec_export.h \ + -SS -I.. + + IDL_Files { + RoundTripE.idl + RoundTripEI.idl << RoundTripE.idl + } +} + +project(Benchmark_RoundTrip_stub) : ccm_stub { + after += Benchmark_RoundTrip_idl_gen Benchmark_stub + libs += Benchmark_stub + libpaths += .. + sharedname = RoundTrip_stub + dynamicflags = ROUNDTRIP_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + RoundTripC.cpp + } + + Header_Files { + RoundTripC.h + RoundTrip_stub_export.h + } + + Inline_Files { + RoundTripC.inl + } +} + +project(Benchmark_RoundTrip_exec) : ciao_executor { + after += Benchmark_RoundTrip_lem_gen Benchmark_RoundTrip_stub + sharedname = RoundTrip_exec + libs += RoundTrip_stub Benchmark_stub + libpaths += .. + dynamicflags = ROUNDTRIP_EXEC_BUILD_DLL + includes += .. + + IDL_Files { + } + + Source_Files { + RoundTripEC.cpp + RoundTripEIC.cpp + RoundTrip_exec.cpp + } + + Header_Files { + RoundTripEC.h + RoundTripEIC.h + RoundTrip_exec.h + RoundTrip_exec_export.h + } + + Inline_Files { + RoundTripEC.inl + RoundTripEIC.inl + } +} + + +project(Benchmark_RoundTrip_svnt) : ciao_servant { + after += Benchmark_skel Benchmark_RoundTrip_exec + sharedname = RoundTrip_svnt + libs += RoundTrip_exec \ + RoundTrip_stub \ + Benchmark_skel \ + Benchmark_stub + libpaths += .. + dynamicflags = ROUNDTRIP_SVNT_BUILD_DLL + includes += .. + + IDL_Files { + } + + Source_Files { + RoundTripS.cpp + RoundTrip_svnt.cpp + } + + Header_Files { + RoundTripS.h + RoundTrip_svnt.h + RoundTrip_svnt_export.h + } + + Inline_Files { + RoundTripS.inl + } +} + +project (RoundTrip_client) : ccm_stub, valuetype, strategies, avoids_ace_for_tao { + exename = client + after += Benchmark_RoundTrip_stub + libs += RoundTrip_stub Benchmark_stub + libpaths += .. + IDL_Files { + } + + Source_Files { + client.cpp + } + + Header_Files { + } + + Inline_Files { + } +} + diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTripEI.idl b/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTripEI.idl new file mode 100644 index 00000000000..b42a56eb907 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTripEI.idl @@ -0,0 +1,33 @@ +// $Id$ + +//============================================================================= +/** + * @file RoundTripEI.idl + * + * + * @author + */ +//============================================================================= + +#ifndef CIAO_ROUNDTRIPEI_IDL +#define CIAO_ROUNDTRIPEI_IDL + +#include "RoundTripE.idl" + +module Benchmark +{ + /** + * @interface RoundTrip_Exec + * + * The actually Test executor need to support + * Components::SessionComponent interface. Therefore, we need to + * define the component executor interface explicitly here. + */ + local interface RoundTrip_Exec : CCM_RoundTrip, CCM_LatencyTest, + Components::SessionComponent + { + }; + +}; + +#endif /* CIAO_TESTEI_IDL */ diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip_exec.cpp b/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip_exec.cpp new file mode 100644 index 00000000000..ce52d1f2068 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip_exec.cpp @@ -0,0 +1,124 @@ +// $Id$ + +#include "RoundTrip_exec.h" + +//-- ACE Scheduling Params +#include "ace/Sched_Params.h" +#include "ace/OS_NS_errno.h" + +#include "ciao/Logger/Log_Macros.h" +//================================================================= + +void +set_priority () +{ + int priority = + (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO) + + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2; + // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. + + if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, + priority, + ACE_SCOPE_PROCESS)) != 0) + { + if (ACE_OS::last_error () == EPERM) + { + ACE_DEBUG ((LM_WARNING, CLINFO + "client (%P|%t): user is not superuser, " + "test runs in time-shared class\n")); + } + else + ACE_ERROR ((LM_ERROR, + "client (%P|%t): sched_params failed\n")); + } +} + + + +MyImpl::RoundTrip_exec_i::RoundTrip_exec_i () +{ + +} + +MyImpl::RoundTrip_exec_i::~RoundTrip_exec_i () +{ +} + +::Benchmark::CCM_LatencyTest * +MyImpl::RoundTrip_exec_i::get_latency () +{ + return ::Benchmark::CCM_LatencyTest::_duplicate (this); +} + +/* Main method that invokes the octet_sequence */ +CORBA::Long +MyImpl::RoundTrip_exec_i::makeCall (CORBA::Long data) +{ + return data * data * data; +} + +// Operations from Components::SessionComponent +void +MyImpl::RoundTrip_exec_i::set_session_context ( + Components::SessionContext_ptr ctx) +{ + ACE_DEBUG ((LM_TRACE, CLINFO "MyImpl::RoundTrip_exec_i::set_session_context\n")); + //cout << "MyImpl::RoundTrip_exec_i::set_session_context\n" << endl; + + this->context_ = + Benchmark::CCM_RoundTrip_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + throw CORBA::INTERNAL (); + // Urm, we actually discard exceptions thown from this operation. +} + +void +MyImpl::RoundTrip_exec_i::configuration_complete () +{ +} + +void +MyImpl::RoundTrip_exec_i::ccm_activate () +{ + ACE_DEBUG ((LM_TRACE, CLINFO "MyImpl::RoundTrip_exec_i::ccm_activate\n")); + //cout << "MyImpl::RoundTrip_exec_i::ccm_activate\n"; + + // Starting method! + //set_priority(); +} + +void +MyImpl::RoundTrip_exec_i::ccm_passivate () +{ + ACE_DEBUG ((LM_TRACE, CLINFO "MyImpl::RoundTrip_exec_i::ccm_passivate\n")); +} + +void +MyImpl::RoundTrip_exec_i::ccm_remove () +{ + ACE_DEBUG ((LM_INFO, CLINFO "MyImpl::RoundTrip_exec_i::ccm_remove\n")); +} + + +MyImpl::RoundTripHome_exec_i::RoundTripHome_exec_i () +{ +} + +MyImpl::RoundTripHome_exec_i::~RoundTripHome_exec_i () +{ +} + +::Components::EnterpriseComponent_ptr +MyImpl::RoundTripHome_exec_i::create () +{ + return new MyImpl::RoundTrip_exec_i; +} + + +extern "C" ROUNDTRIP_EXEC_Export ::Components::HomeExecutorBase_ptr +createRoundTripHome_Impl (void) +{ + //cout << "Creating Round_trip impl" << endl; + return new MyImpl::RoundTripHome_exec_i (); +} diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip_exec.h b/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip_exec.h new file mode 100644 index 00000000000..99bac519c1e --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTrip/RoundTrip_exec.h @@ -0,0 +1,103 @@ +// -*- C++ -*- + +//============================================================ +/** + * @file RoundTrip_exec.h + * + * Header file for the Executor implementation. + * + * $Id$ + * + * @author Diego Sevilla <dsevilla@um.es> + * @author Arvind S. Krishna <arvindk@dre.vanderbilt.edu> + */ +//============================================================ + +#ifndef ROUNDTRIP_EXEC_H +#define ROUNDTRIP_EXEC_H + +#include "RoundTripEIC.h" +#include "tao/LocalObject.h" +#include "ace/Thread_Manager.h" +#include "ace/Task.h" + +namespace MyImpl +{ + + /** + * @class RoundTrip_exec_i + * + * RoundTrip executor implementation class. + */ + + class ROUNDTRIP_EXEC_Export RoundTrip_exec_i : + public virtual Benchmark::RoundTrip_Exec, + public virtual ::CORBA::LocalObject + { + + public: + /// Default constructor. + RoundTrip_exec_i (); + + /// Operation to test the data + virtual CORBA::Long makeCall (CORBA::Long data); + + virtual ::Benchmark::CCM_LatencyTest* + get_latency (); + + // Operations from Components::SessionComponent + virtual void set_session_context (Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + /// Helper function to be called back by timeout_Handler + void pulse (void); + + protected: + + /// Destructor. + ~RoundTrip_exec_i (); + + protected: + /// Copmponent specific context + Benchmark::CCM_RoundTrip_Context_var context_; + + }; + + /** + * @class RoundTripHome_exec_i + * + * RoundTrip home executor implementation class. + */ + class ROUNDTRIP_EXEC_Export RoundTripHome_exec_i : + public virtual Benchmark::CCM_RoundTripHome, + public virtual ::CORBA::LocalObject + { + public: + /// Default ctor. + RoundTripHome_exec_i (); + + // Implicit home operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + + protected: + + /// Destructor. + ~RoundTripHome_exec_i (); + + }; + +} + +extern "C" ROUNDTRIP_EXEC_Export ::Components::HomeExecutorBase_ptr +createRoundTripHome_Impl (void); + +#endif /* ROUNDTRIP_EXEC_H */ diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTrip/client.cpp b/modules/CIAO/performance-tests/Benchmark/RoundTrip/client.cpp new file mode 100644 index 00000000000..a365068b76f --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTrip/client.cpp @@ -0,0 +1,177 @@ +// $Id$ + +//============================================================== +/** + * @file client.cpp + * + * This is a simple client test program that interact with the RoundTrip + * component implementation. The single threaded client issues + * two-way operations, the total latency (response time) is measured + * NOTE: this client implementation has been adapted from the + * $TAO_ROOT/performance-results/Latency/Single_Threaded/ + * + * @author Arvind S. Krishna <arvindk@dre.vanderbilt.edu> + */ +//============================================================== +#include "RoundTripC.h" +#include "ace/Get_Opt.h" +#include "ace/High_Res_Timer.h" +#include "ace/Sched_Params.h" +#include "ace/Stats.h" +#include "ace/Sample_History.h" +#include "ace/OS_NS_errno.h" +#include "ace/Throughput_Stats.h" + +const ACE_TCHAR *ior = ACE_TEXT("file://test.ior"); +int niterations = 100; +int do_dump_history = 0; + +int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + // Parse arguments. + ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("hxk:i:")); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'h': + do_dump_history = 1; + break; + + case 'k': + ior = get_opts.opt_arg (); + break; + + case 'i': + niterations = ACE_OS::atoi (get_opts.opt_arg ()); + break; + + case '?': + default: + /* Could be any other parameter like -ORBSvcConf file so ignore */ + break; + } + + // Indicates sucessful parsing of the command line + return 0; +} + +void +set_priority () +{ + int priority = + (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO) + + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2; + // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. + + if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, + priority, + ACE_SCOPE_PROCESS)) != 0) + { + if (ACE_OS::last_error () == EPERM) + { + ACE_DEBUG ((LM_DEBUG, + "client (%P|%t): user is not superuser, " + "test runs in time-shared class\n")); + } + else + ACE_ERROR ((LM_ERROR, + "client (%P|%t): sched_params failed\n")); + } + +} + + +int +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) +{ + try + { + // Set priority on the platform + set_priority(); + + // Initialize orb + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + + if (parse_args(argc, argv) == -1) + { + ACE_DEBUG ((LM_DEBUG, "Error parsing Arguments\n")); + return -1; + } + + // Resolve HomeFinder interface + CORBA::Object_var obj + = orb->string_to_object (ior); + + Benchmark::RoundTripHome_var home + = Benchmark::RoundTripHome::_narrow (obj.in ()); + + if (CORBA::is_nil (home.in ())) + ACE_ERROR_RETURN ((LM_ERROR, "Unable to acquire TestHome objref\n"), -1); + + Benchmark::RoundTrip_var test = home->create (); + + // Get the RoundTrip reference + obj = test->provide_facet ("latency"); + Benchmark::LatencyTest_var round_trip = + Benchmark::LatencyTest::_narrow (obj.in ()); + + if (CORBA::is_nil (round_trip.in ())) + ACE_ERROR_RETURN ((LM_ERROR, "Unable to acquire LatencyTest objref\n"), -1); + + // Warmup the System by making some empty calls + for (int j = 0; j < 100; ++j) + { + round_trip->makeCall (0L); + } + + ///// Start Test //////////////////////////////////////////// + ACE_Sample_History history (niterations); + + ACE_hrtime_t test_start = ACE_OS::gethrtime (); + for (int i = 0; i < niterations; ++i) + { + ACE_hrtime_t const start = ACE_OS::gethrtime (); + + // Test value to be sent to the server + long test = 0; + + (void) round_trip->makeCall (test); + + ACE_hrtime_t const now = ACE_OS::gethrtime (); + history.sample (now - start); + } + + ACE_hrtime_t const test_end = ACE_OS::gethrtime (); + + ACE_DEBUG ((LM_DEBUG, "test finished\n")); + + ACE_DEBUG ((LM_DEBUG, "High resolution timer calibration....")); + ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); + ACE_DEBUG ((LM_DEBUG, "done\n")); + + if (do_dump_history) + { + history.dump_samples (ACE_TEXT("HISTORY"), gsf); + } + + ACE_Basic_Stats stats; + history.collect_basic_stats (stats); + stats.dump_results (ACE_TEXT("Total"), gsf); + + ACE_Throughput_Stats::dump_throughput (ACE_TEXT("Total"), gsf, + test_end - test_start, + stats.samples_count ()); + + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("Exception Handled:"); + return 1; + } + + + return 0; +} diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTrip/run_test.pl b/modules/CIAO/performance-tests/Benchmark/RoundTrip/run_test.pl new file mode 100755 index 00000000000..0364d8b16a4 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTrip/run_test.pl @@ -0,0 +1,123 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +# +# @@ Run this script from ../descriptors/ instead. +# + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::TestTarget; + +$status = 0; + +$daemon_base = "daemon.ior"; +$svr_base = "server.ior"; +$home_base = "test.ior"; + +$tg = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n"; + +$daemon_ior = $tg->LocalFile ($daemon_base); +$svr_ior = $tg->LocalFile ($svr_base); +$home_ior = $tg->LocalFile ($home_base); + +$CIAO_ROOT=$ENV{'CIAO_ROOT'}; + +$tg->DeleteFile ($daemon_base); +$tg->DeleteFile ($svr_base); +$tg->DeleteFile ($home_base); + +# CIAO Daemon command line arguments +$daemon_args = "-c ../RoundTrip/svc.conf -o $daemon_ior -i CIAO_Installation_Data.ini -n $CIAO_ROOT/tools/ComponentServer/ComponentServer"; + +# CIAO Daemon Controller location: +$controller = "$CIAO_ROOT/tools/Daemon/DaemonController"; + +# Daemon controller common command line arguments +$common_args = "-ORBInitRef CIAODaemon=file://$daemon_ior"; + +# Daemon controller start_home command +$start_args = "start_home -s RoundTrip.csd -m $home_ior -c $svr_ior"; + +# Daemon controller end_home command +$end_args = "end_home -c file://$svr_ior"; + +# Daemon controller shutdown command +$shutdown_args = "shutdown"; + +# Client program command line arguments +$cl_args = "-ORBSvcConf ../RoundTrip/svc.conf -i 300000"; + +# CIAO daemon process definition +$DS = $tg->CreateProcess ("$CIAO_ROOT/tools/Daemon/CIAO_Daemon", + "$daemon_args"); + +# Client process definition +$CL = $tg->CreateProcess ("../RoundTrip/client", + $cl_args); + +## Starting up the CIAO daemon +$DS->Spawn (); +if ($tg->WaitForFileTimed($daemon_base, + $tg->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: Could not find daemon ior file <$daemon_ior>\n"; + $DS->Kill (); + exit 1; +} + +## Starting up a ComponentServer running the Roundtrip home. +$DC = $tg->CreateProcess ("$controller", + "$common_args $start_args"); + +$DC->SpawnWaitKill ($tg->ProcessStopWaitInterval ()); +if ($tg->WaitForFileTimed($home_base, + $tg->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: Could not find home ior file <$home_ior>\n"; + $DS->Kill (); + exit 1; +} + +$client = $CL->SpawnWaitKill ($tg->ProcessStopWaitInterval ()); + +if ($client != 0) { + print STDERR "ERROR: client returned $client\n"; + $status = 1; +} + +## Terminating the ComponentServer running. +$DC = $tg->CreateProcess ("$controller", + "$common_args $end_args"); + +$ctrl = $DC->SpawnWaitKill ($tg->ProcessStopWaitInterval ()); +if ($ctrl != 0) { + print STDERR "ERROR: Fail to end component server\n"; + $DC->Kill (); + exit 1; +} + +## Terminating the ComponentServer running the RateGen home. +$DC = $tg->CreateProcess ("$controller", + "$common_args $shutdown_args"); + +$ctrl = $DC->SpawnWaitKill ($tg->ProcessStopWaitInterval ()); +if ($ctrl != 0) { + print STDERR "ERROR: Fail to shutdown CIAODaemon\n"; + $DS->Kill (); + exit 1; +} + +$ctrl = $DS->WaitKill ($tg->ProcessStopWaitInterval ()); +if ($ctrl != 0) { + print STDERR "ERROR: CIAODaemon didn't shutdown gracefully $ctrl\n"; + $DS->Kill (); + exit 1; +} + +$tg->DeleteFile ($daemon_base); +$tg->DeleteFile ($svr_base); +$tg->DeleteFile ($home_base); + +exit $status; diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTrip/svc.conf b/modules/CIAO/performance-tests/Benchmark/RoundTrip/svc.conf new file mode 100644 index 00000000000..e1706aae4e5 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTrip/svc.conf @@ -0,0 +1,6 @@ +# +# $Id$ +# +dynamic Advanced_Resource_Factory Service_Object * TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null" +static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBClientConnectionHandler RW" diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient.idl b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient.idl new file mode 100644 index 00000000000..3f891ce00d3 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient.idl @@ -0,0 +1,30 @@ +// $Id$ +//============================================================================= +/** + * @file RoundTripClient.idl + * + * Definition of the Component that uses the LatencyTest interface + * provided by RoundTrip component + */ +//============================================================================= + +#ifndef CIAO_ROUNDTRIPCLIENT_IDL +#define CIAO_ROUNDTRIPCLIENT_IDL + +#include <Components.idl> +#include "../Benchmark.idl" + +module Benchmark +{ + component RoundTripClient + { + uses LatencyTest latency; + provides Controller controller; + }; + + home RoundTripClientHome manages RoundTripClient + { + }; +}; + +#endif /* CIAO_ROUNDTRIPCLIENT_IDL*/ diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient.mpc b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient.mpc new file mode 100644 index 00000000000..66a2c448a0b --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient.mpc @@ -0,0 +1,136 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p Benchmark -l .. -c client RoundTripClient" + +project(Benchmark_RoundTripClient_idl_gen) : componentidldefaults { + after += Benchmark_idl_gen + custom_only = 1 + idlflags += \ + -Wb,stub_export_macro=ROUNDTRIPCLIENT_STUB_Export \ + -Wb,stub_export_include=RoundTripClient_stub_export.h \ + -Wb,skel_export_macro=ROUNDTRIPCLIENT_SVNT_Export \ + -Wb,skel_export_include=RoundTripClient_svnt_export.h \ + -Wb,exec_export_macro=ROUNDTRIPCLIENT_EXEC_Export \ + -Wb,exec_export_include=RoundTripClient_exec_export.h \ + + IDL_Files { + RoundTripClient.idl + } +} + +project(Benchmark_RoundTripClient_lem_gen) : ciaoidldefaults { + custom_only = 1 + after += Benchmark_RoundTripClient_idl_gen + idlflags += -Wb,export_macro=ROUNDTRIPCLIENT_EXEC_Export \ + -Wb,export_include=RoundTripClient_exec_export.h \ + -SS -I.. + + IDL_Files { + RoundTripClientE.idl + RoundTripClientEI.idl << RoundTripClientE.idl + } +} + +project(Benchmark_RoundTripClient_stub) : ccm_stub { + after += Benchmark_RoundTripClient_idl_gen Benchmark_stub + libs += Benchmark_stub + libpaths += .. + sharedname = RoundTripClient_stub + dynamicflags = ROUNDTRIPCLIENT_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + RoundTripClientC.cpp + } + + Header_Files { + RoundTripClientC.h + RoundTripClient_stub_export.h + } + + Inline_Files { + RoundTripClientC.inl + } +} + +project(Benchmark_RoundTripClient_exec) : ciao_executor, avoids_ace_for_tao { + after += Benchmark_RoundTripClient_lem_gen Benchmark_RoundTripClient_stub + sharedname = RoundTripClient_exec + libs += RoundTripClient_stub Benchmark_stub + libpaths += .. + dynamicflags = ROUNDTRIPCLIENT_EXEC_BUILD_DLL + includes += .. + + IDL_Files { + } + + Source_Files { + RoundTripClientEC.cpp + RoundTripClientEIC.cpp + RoundTripClient_exec.cpp + } + + Header_Files { + RoundTripClientEC.h + RoundTripClientEIC.h + RoundTripClient_exec.h + RoundTripClient_exec_export.h + } + + Inline_Files { + RoundTripClientEC.inl + RoundTripClientEIC.inl + } +} + + +project(Benchmark_RoundTripClient_svnt) : ciao_servant, avoids_ace_for_tao { + after += Benchmark_skel Benchmark_RoundTripClient_exec + sharedname = RoundTripClient_svnt + libs += RoundTripClient_exec \ + RoundTripClient_stub \ + Benchmark_skel \ + Benchmark_stub + libpaths += .. + dynamicflags = ROUNDTRIPCLIENT_SVNT_BUILD_DLL + includes += .. + + IDL_Files { + } + + Source_Files { + RoundTripClientS.cpp + RoundTripClient_svnt.cpp + } + + Header_Files { + RoundTripClientS.h + RoundTripClient_svnt.h + RoundTripClient_svnt_export.h + } + + Inline_Files { + RoundTripClientS.inl + } +} + +project (RoundTripClient_client) : ccm_stub, valuetype, avoids_ace_for_tao { + exename = client + after += Benchmark_RoundTripClient_stub + libs += RoundTripClient_stub Benchmark_stub + libpaths += .. + IDL_Files { + } + + Source_Files { + client.cpp + } + + Header_Files { + } + + Inline_Files { + } +} + diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClientEI.idl b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClientEI.idl new file mode 100644 index 00000000000..a5a2dd90c67 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClientEI.idl @@ -0,0 +1,31 @@ +// $Id$ + +//============================================================================= +/** + * @file RoundTripClientEI.idl + */ +//============================================================================= + +#ifndef CIAO_ROUNDTRIPCLIENTEI_IDL +#define CIAO_ROUNDTRIPCLIENTEI_IDL + +#include "RoundTripClientE.idl" + +module Benchmark +{ + /** + * @interface RoundTripClient_Exec + * + * The actually Test executor need to support + * Components::SessionComponent interface. Therefore, we need to + * define the component executor interface explicitly here. + */ + local interface RoundTripClient_Exec : CCM_RoundTripClient, + Components::SessionComponent, + CCM_Controller //Monolithic + { + }; + +}; + +#endif /* CIAO_ROUNDTRIPCLIENTEI_IDL */ diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient_exec.cpp b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient_exec.cpp new file mode 100644 index 00000000000..f805cfc43dd --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient_exec.cpp @@ -0,0 +1,158 @@ +// $Id$ + +#include "ace/Stats.h" +#include "ace/Throughput_Stats.h" +#include "ace/Sample_History.h" +#include "ace/High_Res_Timer.h" +#include "ace/Env_Value_T.h" +#include "ciao/Logger/Log_Macros.h" + +#include "RoundTripClient_exec.h" + +const int niterations = 100000; //Default no of iterations +//================================================================= + +MyImpl::RoundTripClient_exec_i::RoundTripClient_exec_i () +{ + +} + +MyImpl::RoundTripClient_exec_i::~RoundTripClient_exec_i () +{ +} + +// Operations from Components::SessionComponent +void +MyImpl::RoundTripClient_exec_i::set_session_context ( + Components::SessionContext_ptr ctx) +{ + ACE_DEBUG ((LM_TRACE, CLINFO + "MyImpl::RoundTripClient_exec_i::set_session_context\n")); + + //Since this is in collocated mode; The server-component will change the + //scheduling strategy to real-time scheduling + + this->context_ = + Benchmark::CCM_RoundTripClient_Context::_narrow (ctx); + + if (CORBA::is_nil (this->context_.in ())) + throw CORBA::INTERNAL (); + + // Urm, we actually discard exceptions thrown from this operation. +} + +//Start the collocated test here +void +MyImpl::RoundTripClient_exec_i::configuration_complete () +{ +} + +void +MyImpl::RoundTripClient_exec_i::ccm_activate () +{ + ACE_DEBUG ((LM_TRACE, CLINFO "MyImpl::RoundTripClient_exec_i::ccm_activate\n")); +} + +void +MyImpl::RoundTripClient_exec_i::start () +{ + ///////////// Start test ///////////////////////////////////////// + + // Let's try to start tests from here... + Benchmark::LatencyTest_var lt = + context_->get_connection_latency (); + + ACE_DEBUG ((LM_INFO, CLINFO + "MyImpl::RoundTripClient_exec::start obtain obj ref\n")); + + CORBA::Long test_data = 0L; + + //Warm up the system + int i = 0; + for (i=0; i < 100; i++) + lt->makeCall (test_data); + + ACE_DEBUG ((LM_DEBUG, "MyImpl::start: warmed up the system\n")); + + ACE_Sample_History history (niterations); + + ACE_hrtime_t test_start = ACE_OS::gethrtime (); + for (i = 0; i < niterations; ++i) + { + ACE_hrtime_t start = ACE_OS::gethrtime (); + + //Test value to be sent to the server + long test = 0; + + (void) lt->makeCall (test); + + ACE_hrtime_t now = ACE_OS::gethrtime (); + history.sample (now - start); + } + + ACE_hrtime_t test_end = ACE_OS::gethrtime (); + + ACE_DEBUG ((LM_DEBUG, CLINFO"test finished\n")); + + ACE_DEBUG ((LM_DEBUG, CLINFO"High resolution timer calibration....")); + ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); + ACE_DEBUG ((LM_DEBUG, CLINFO"done\n")); + + ACE_Env_Value<int> envar (ACE_TEXT("CIAO_DUMP_SAMPLE_HISTORY"), 0); + if (envar != 0) + { + history.dump_samples (ACE_TEXT("HISTORY"), gsf); + } + + ACE_Basic_Stats stats; + history.collect_basic_stats (stats); + stats.dump_results (ACE_TEXT("Total"), gsf); + + ACE_Throughput_Stats::dump_throughput (ACE_TEXT("Total"), + gsf, + test_end - test_start, + stats.samples_count ()); + +} + +::Benchmark::CCM_Controller_ptr +MyImpl::RoundTripClient_exec_i::get_controller () +{ + return ::Benchmark::CCM_Controller::_duplicate (this); +} + + +void +MyImpl::RoundTripClient_exec_i::ccm_passivate () +{ + ACE_DEBUG ((LM_TRACE, CLINFO "MyImpl::RoundTripClient_exec_i::ccm_passivate\n")); +} + +void +MyImpl::RoundTripClient_exec_i::ccm_remove () +{ + ACE_DEBUG ((LM_TRACE, CLINFO "MyImpl::RoundTripClient_exec_i::ccm_remove\n")); +} + + +MyImpl::RoundTripClientHome_exec_i::RoundTripClientHome_exec_i () +{ +} + +MyImpl::RoundTripClientHome_exec_i::~RoundTripClientHome_exec_i () +{ +} + +::Components::EnterpriseComponent_ptr +MyImpl::RoundTripClientHome_exec_i::create () +{ + return new MyImpl::RoundTripClient_exec_i; +} + + +extern "C" ROUNDTRIPCLIENT_EXEC_Export ::Components::HomeExecutorBase_ptr +createRoundTripClientHome_Impl (void) +{ + ACE_DEBUG ((LM_INFO, CLINFO "Creating RoundTrip_client impl\n")); + return new MyImpl::RoundTripClientHome_exec_i (); +} diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient_exec.h b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient_exec.h new file mode 100644 index 00000000000..117ad723c01 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/RoundTripClient_exec.h @@ -0,0 +1,92 @@ +// $Id$ + +//============================================================ +/** + * @file RoundTripClient_exec.h + * + * Header file for the Executor implementation. + * + * @author Diego <dsevilla@um.es> + * @author Arvind S. Krishna <arvindk@dre.vanderbilt.edu> + */ +//============================================================ + +#ifndef BENCHMARK_ROUNDTRIPCLIENT_EXEC_H +#define BENCHMARK_ROUNDTRIPCLIENT_EXEC_H + +#include "RoundTripClientEIC.h" +#include "tao/LocalObject.h" + + +namespace MyImpl +{ + + /** + * @class RoundTripClient_exec_i + * + * RoundTripClient executor implementation class. + */ + + class ROUNDTRIPCLIENT_EXEC_Export RoundTripClient_exec_i : + public virtual Benchmark::RoundTripClient_Exec, + public virtual ::CORBA::LocalObject + { + + public: + /// Default constructor. + RoundTripClient_exec_i (); + + /// Default destructor. + ~RoundTripClient_exec_i (); + + // Operations from Components::SessionComponent + virtual void set_session_context (Components::SessionContext_ptr ctx); + + virtual void configuration_complete (); + + virtual void ccm_activate (); + + virtual void ccm_passivate (); + + virtual void ccm_remove (); + + virtual ::Benchmark::CCM_Controller_ptr + get_controller (); + + virtual void start (); + + + protected: + /// Copmponent specific context + Benchmark::CCM_RoundTripClient_Context_var context_; + + }; + + /** + * @class RoundTripClientHome_exec_i + * + * RoundTripClient home executor implementation class. + */ + class ROUNDTRIPCLIENT_EXEC_Export RoundTripClientHome_exec_i : + public virtual Benchmark::CCM_RoundTripClientHome, + public virtual ::CORBA::LocalObject + { + public: + /// Default ctor. + RoundTripClientHome_exec_i (); + + /// Default dtor. + ~RoundTripClientHome_exec_i (); + + // Implicit home operations. + + virtual ::Components::EnterpriseComponent_ptr + create (); + }; + +} + +extern "C" ROUNDTRIPCLIENT_EXEC_Export ::Components::HomeExecutorBase_ptr +createRoundTripClientHome_Impl (void); + +#endif /* CIAO_ROUNDTRIPCLIENTGEN_EXEC_H */ diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTripClient/client.cpp b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/client.cpp new file mode 100644 index 00000000000..0d8e0b2b4d7 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/client.cpp @@ -0,0 +1,56 @@ +// $Id$ + +//============================================================== +/** + * @file client.cpp + * + * This is a simple client test program that interact with the RoundTrip + * component implementation. The single threaded client issues + * two-way operations, the total latency (response time) is measured + * NOTE: this client implementation has been adapted from the + * $TAO_ROOT/performance-results/Latency/Single_Threaded/ + * + * @author Arvind S. Krishna <arvindk@dre.vanderbilt.edu> + */ +//============================================================== +#include "RoundTripClientC.h" + +const char *ior = "file://test.ior"; + +int +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) +{ + try + { + // Initialize orb + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + + // Resolve HomeFinder interface + CORBA::Object_var obj + = orb->string_to_object (ior); + Benchmark::RoundTripClient_var test = + Benchmark::RoundTripClient::_narrow(obj.in()); + + if (CORBA::is_nil (test.in ())) + ACE_ERROR_RETURN ((LM_ERROR, "Unable to acquire RoundTripClient objref\n"), -1); + + // Get the RoundTrip reference + obj = test->provide_facet ("controller"); + Benchmark::Controller_var trigger = + Benchmark::Controller::_narrow (obj.in ()); + + if (CORBA::is_nil (trigger.in ())) + ACE_ERROR_RETURN ((LM_ERROR, "Unable to acquire Controller objref\n"), -1); + + // Send a trigger to start the test + trigger->start(); + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("Exception Handled:"); + return 1; + } + + + return 0; +} diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTripClient/run_test.pl b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/run_test.pl new file mode 100755 index 00000000000..f36ef2e64c7 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/run_test.pl @@ -0,0 +1,94 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +# +# @@ Run this script from ../descriptors/ instead. +# + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::TestTarget; + +$tg = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n"; + +$status = 0; +$daemon_base = "daemon.ior"; +$am_base = "am.ior"; +$daemon_ior = $tg->LocalFile ("daemon.ior"); +$am_ior = $tg->LocalFile ("am.ior"); + +$CIAO_ROOT=$ENV{'CIAO_ROOT'}; + +$tg->DeleteFile ($daemon_base); +$tg->DeleteFile ($am_base); + + +# CIAO Daemon command line arguments +$daemon_args1 = "-ORBEndpoint iiop://localhost:10000 -o $daemon_ior -i CIAO_Installation_Data.ini -n $CIAO_ROOT/tools/ComponentServer/ComponentServer"; + +#CIAO Daemond Remote command line arguments +$daemon_args2 = "-ORBEndpoint iiop://localhost:12000 -o $daemon_ior -i CIAO_Installation_Data.ini -n $CIAO_ROOT/tools/ComponentServer/ComponentServer"; + +$assembly_manager_args = "-o $am_ior -c test.dat"; + +$ad_args = " -k file://$am_ior -a RoundTripClient.cad"; + +# CIAO daemon process definition +$DS = $tg->CreateProcess ("$CIAO_ROOT/tools/Daemon/CIAO_Daemon", + "$daemon_args1"); + +## Starting up the CIAO daemon +$DS->Spawn (); +if ($tg->WaitForFileTimed($daemon_base, + $tg->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: Could not find daemon ior file <$daemon_ior>\n"; + $DS->Kill (); + exit 1; +} + +# CIAO daemon process definition +$DS2 = $tg->CreateProcess ("$CIAO_ROOT/tools/Daemon/CIAO_Daemon", + "$daemon_args2"); + +## Starting up the CIAO daemon +$DS2->Spawn (); +if ($tg->WaitForFileTimed($daemon_base, + $tg->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: Could not find daemon ior file <$daemon_ior>\n"; + $DS->Kill (); + exit 1; +} + +$AM = $tg->CreateProcess ("$CIAO_ROOT/tools/Assembly_Deployer/Assembly_Manager", + $assembly_manager_args); +$AM->Spawn (); +if ($tg->WaitForFileTimed($am_base, + $tg->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: Could not find assembly ior file <$am_ior>\n"; + $AM->Kill (); + exit 1; +} + +$AD = $tg->CreateProcess ("$CIAO_ROOT/tools/Assembly_Deployer/Assembly_Deployer", + $ad_args); +$AD->Spawn (); + +sleep (5); + +#Start the client to send the trigger message +$CL = $tg->CreateProcess ("../RoundTripClient/client", ""); +$CL->SpawnWaitKill($tg->ProcessStopWaitInterval ()); + +$AM->Kill (); +$AD->Kill (); +$DS->Kill (); +$CL->Kill (); +$DS2->Kill (); + +$tg->DeleteFile ($daemon_base); +$tg->DeleteFile ($am_base); + +exit $status; diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTripClient/run_test_ior_cad.pl b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/run_test_ior_cad.pl new file mode 100755 index 00000000000..896905c1659 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTripClient/run_test_ior_cad.pl @@ -0,0 +1,76 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +# +# @@ Run this script from ../descriptors/ instead. +# + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::TestTarget; + +$tg = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n"; + +$status = 0; +$daemon_base = "daemon.ior"; +$am_base = "am.ior"; +$daemon_ior = $tg->LocalFile ("daemon.ior"); +$am_ior = $tg->LocalFile ("am.ior"); + +$CIAO_ROOT=$ENV{'CIAO_ROOT'}; + +$tg->DeleteFile ($daemon_base); +$tg->DeleteFile ($am_base); + +# CIAO Daemon command line arguments +$daemon_args = "-c $CIAO_ROOT/performance-tests/Benchmark/RoundTrip/svc.conf -ORBEndpoint iiop://localhost:10000 -o $daemon_ior -i CIAO_Installation_Data.ini -n $CIAO_ROOT/tools/ComponentServer/ComponentServer"; + +$assembly_manager_args = "-o $am_ior -c test.dat"; + +$ad_args = " -k file://$am_ior -a Test-IOR.cad"; + +# CIAO daemon process definition +$DS = $tg->CreateProcess ("$CIAO_ROOT/tools/Daemon/CIAO_Daemon", + "$daemon_args"); + +## Starting up the CIAO daemon +$DS->Spawn (); +if ($tg->WaitForFileTimed($daemon_base, + $tg->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: Could not find daemon ior file <$daemon_ior>\n"; + $DS->Kill (); + exit 1; +} + + +$AM = $tg->CreateProcess("$CIAO_ROOT/tools/Assembly_Deployer/Assembly_Manager", + $assembly_manager_args); +$AM->Spawn (); +if ($tg->WaitForFileTimed($am_base, + $tg->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: Could not find assembly ior file <$am_ior>\n"; + $AM->Kill (); + exit 1; +} + +$AD = $tg->CreateProcess("$CIAO_ROOT/tools/Assembly_Deployer/Assembly_Deployer", + $ad_args); +$AD->Spawn (); + +sleep (5); + +#Start the client to send the trigger message +$CL = $tg->CreateProcess ("../RoundTripClient/client", ""); +$CL->SpawnWaitKill($tg->ProcessStopWaitInterval ()); + +$AM->Kill (); +$AD->Kill (); +$DS->Kill (); + +$tg->DeleteFile ($daemon_base); +$tg->DeleteFile ($am_base); + +exit $status; diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTripServer/LatencyTest.cpp b/modules/CIAO/performance-tests/Benchmark/RoundTripServer/LatencyTest.cpp new file mode 100644 index 00000000000..494491cbf38 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTripServer/LatencyTest.cpp @@ -0,0 +1,25 @@ +// +// $Id$ +// +#include "LatencyTest.h" +#include "ciao/Logger/Log_Macros.h" + +LatencyTest_Impl::LatencyTest_Impl (CORBA::ORB_ptr orb) + : orb_ (CORBA::ORB::_duplicate (orb)) +{ +} + + +CORBA::Long +LatencyTest_Impl::makeCall (CORBA::Long send_time) +{ + ACE_DEBUG ((LM_DEBUG, CLINFO"Sending Time back\n")); + + return send_time; +} + +void +LatencyTest_Impl::shutdown () +{ + this->orb_->shutdown (0); +} diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTripServer/LatencyTest.h b/modules/CIAO/performance-tests/Benchmark/RoundTripServer/LatencyTest.h new file mode 100644 index 00000000000..e2dbaf7cc0e --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTripServer/LatencyTest.h @@ -0,0 +1,40 @@ +// +// $Id$ +// + +#ifndef LATENCYTEST_H +#define LATENCYTEST_H +#include /**/ "ace/pre.h" + +#include "../BenchmarkS.h" + +#if defined (_MSC_VER) +# pragma warning(push) +# pragma warning (disable:4250) +#endif /* _MSC_VER */ + +/// Implement the Test::LatencyTest interface +class LatencyTest_Impl : + public virtual POA_Benchmark::LatencyTest +{ +public: + /// Constructor + LatencyTest_Impl (CORBA::ORB_ptr orb); + + // = The skeleton methods + virtual CORBA::Long makeCall (CORBA::Long send_time); + + virtual void shutdown (); + +private: + /// Use an ORB reference to conver strings to objects and shutdown + /// the application. + CORBA::ORB_var orb_; +}; + +#if defined(_MSC_VER) +# pragma warning(pop) +#endif /* _MSC_VER */ + +#include /**/ "ace/post.h" +#endif /* LATENCYTEST_H */ diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTripServer/RoundTripServer.mpc b/modules/CIAO/performance-tests/Benchmark/RoundTripServer/RoundTripServer.mpc new file mode 100644 index 00000000000..5c824ef9072 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTripServer/RoundTripServer.mpc @@ -0,0 +1,22 @@ +// $Id$ +project (RoundTrip_server) : strategies, ciao_executor { + exename = server + after += Benchmark_skel + libs += Benchmark_stub Benchmark_skel + libpaths += .. + + IDL_Files { + } + + Source_Files { + server.cpp + LatencyTest.cpp + } + + Header_Files { + LatencyTest.h + } + + Inline_Files { + } +} diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTripServer/Test.idl b/modules/CIAO/performance-tests/Benchmark/RoundTripServer/Test.idl new file mode 100644 index 00000000000..b7f83dbedd8 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTripServer/Test.idl @@ -0,0 +1,16 @@ +// +// $Id$ +// + +/// Measure roundtrip delay +interface LatencyTest +{ + /// 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. + */ + long makeCall (in long send_time); +}; diff --git a/modules/CIAO/performance-tests/Benchmark/RoundTripServer/server.cpp b/modules/CIAO/performance-tests/Benchmark/RoundTripServer/server.cpp new file mode 100644 index 00000000000..a41e38aa6f9 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/RoundTripServer/server.cpp @@ -0,0 +1,94 @@ +// $Id$ + +#include "LatencyTest.h" +#include "ace/Sched_Params.h" +#include "ace/OS_NS_errno.h" + +const char *ior_output_file = "rtserver.ior"; + +int +ACE_TMAIN(int argc, ACE_TCHAR *argv[]) +{ + int priority = + (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO) + + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2; + priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO, + priority); + // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. + + if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, + priority, + ACE_SCOPE_PROCESS)) != 0) + { + if (ACE_OS::last_error () == EPERM) + { + ACE_DEBUG ((LM_DEBUG, + "server (%P|%t): user is not superuser, " + "test runs in time-shared class\n")); + } + else + ACE_ERROR ((LM_ERROR, + "server (%P|%t): sched_params failed\n")); + } + + try + { + CORBA::ORB_var orb = + CORBA::ORB_init (argc, argv); + + CORBA::Object_var poa_object = + orb->resolve_initial_references("RootPOA"); + + if (CORBA::is_nil (poa_object.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); + + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object.in ()); + + PortableServer::POAManager_var poa_manager = + root_poa->the_POAManager (); + + LatencyTest_Impl *roundtrip_impl; + ACE_NEW_RETURN (roundtrip_impl, + LatencyTest_Impl (orb.in ()), + 1); + PortableServer::ServantBase_var owner_transfer(roundtrip_impl); + + Benchmark::LatencyTest_var roundtrip = + roundtrip_impl->_this (); + + CORBA::String_var ior = + orb->object_to_string (roundtrip.in ()); + + // If the ior_output_file exists, output the ior to it + 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); + + ACE_DEBUG ((LM_DEBUG, "%s", ior.in ())); + + poa_manager->activate (); + + orb->run (); + + ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n")); + + root_poa->destroy (1, 1); + + orb->destroy (); + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("Exception caught:"); + return 1; + } + + return 0; +} diff --git a/modules/CIAO/performance-tests/Benchmark/descriptors/Benchmark.cad b/modules/CIAO/performance-tests/Benchmark/descriptors/Benchmark.cad new file mode 100644 index 00000000000..6ab0dd70aa0 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/descriptors/Benchmark.cad @@ -0,0 +1,34 @@ +<?xml version="1.0"?> <!-- -*- SGML -*- --> + +<!-- If this file is moved to a different directory, make sure to change the + path to the DTD below. Otherwise the examples won't work. --> +<!DOCTYPE componentassembly SYSTEM "http://www.dre.vanderbilt.edu/CIAO/DTD/componentassembly.dtd"> + +<componentassembly id="Single-process Basic assembly"> + <componentfiles> + <componentfile id="com-RoundTrip"> + <fileinarchive name="RoundTrip.csd"/> + </componentfile> + </componentfiles> + + <partitioning> + + <!-- A plain vanilla partition. We don't even need the processcollocation tag here. --> + <homeplacement id="a_RoundTripHome"> + <componentfileref idref="com-RoundTrip"/> + <componentinstantiation id="a_RoundTrip"> + <registercomponent> + <!-- writeiortofile is a non-standard CIAO extension. --> + <writeiortofile name="test.ior"/> + </registercomponent> + </componentinstantiation> + </homeplacement> + + </partitioning> + + <!-- + <connections> + </connections> + --> + +</componentassembly> diff --git a/modules/CIAO/performance-tests/Benchmark/descriptors/CIAO_Installation_Data.ini b/modules/CIAO/performance-tests/Benchmark/descriptors/CIAO_Installation_Data.ini new file mode 100644 index 00000000000..ffe36ca3422 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/descriptors/CIAO_Installation_Data.ini @@ -0,0 +1,5 @@ +[ComponentInstallation] +DCE:cf88cb97-b5a8-4522-9fa3-e626c75c5470=RoundTripClient_svnt +DCE:568a3872-f7bb-4b3f-baba-44c6824d966d=RoundTripClient_exec +DCE:2498aa68-09aa-478c-8ae1-30ed67924f82=RoundTrip_exec +DCE:88c14bff-5158-4f48-9b22-8a1120e87f76=RoundTrip_svnt diff --git a/modules/CIAO/performance-tests/Benchmark/descriptors/Multi_Threaded.cad b/modules/CIAO/performance-tests/Benchmark/descriptors/Multi_Threaded.cad new file mode 100644 index 00000000000..0c0be0cb71c --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/descriptors/Multi_Threaded.cad @@ -0,0 +1,112 @@ +<?xml version="1.0"?> <!-- -*- SGML -*- --> + +<!-- If this file is moved to a different directory, make sure to change the + path to the DTD below. Otherwise the examples won't work. --> +<!DOCTYPE componentassembly SYSTEM "http://www.dre.vanderbilt.edu/CIAO/DTD/componentassembly.dtd"> +<componentassembly id="Multi-client Component Scalability test"> + <componentfiles> + <componentfile id="com-RoundTrip"> + <fileinarchive name="RoundTrip.csd"/> + </componentfile> + <componentfile id="com-RoundTripClient"> + <fileinarchive name="RoundTripClient.csd"/> + </componentfile> + </componentfiles> + + <partitioning> + + <homeplacement id="a_RoundTripHome"> + <componentfileref idref="com-RoundTrip"/> + <componentinstantiation id="a_RoundTrip"/> + </homeplacement> + + <processcollocation> + <homeplacement id="a_RoundTripClientHome"> + <componentfileref idref="com-RoundTripClient"/> + <componentinstantiation id="a_RoundTripClient"> + <registercomponent> + <writeiortofile name="comp1.ior"/> + </registercomponent> + </componentinstantiation> + </homeplacement> + + + <homeplacement id="b_RoundTripClientHome"> + <componentfileref idref="com-RoundTripClient"/> + <componentinstantiation id="b_RoundTripClient"> + <registercomponent> + <writeiortofile name="comp2.ior"/> + </registercomponent> + </componentinstantiation> + </homeplacement> + + <homeplacement id="c_RoundTripClientHome"> + <componentfileref idref="com-RoundTripClient"/> + <componentinstantiation id="c_RoundTripClient"> + <registercomponent> + <writeiortofile name="comp3.ior"/> + </registercomponent> + </componentinstantiation> + </homeplacement> + + + <homeplacement id="d_RoundTripClientHome"> + <componentfileref idref="com-RoundTripClient"/> + <componentinstantiation id="d_RoundTripClient"> + <registercomponent> + <writeiortofile name="comp4.ior"/> + </registercomponent> + </componentinstantiation> + </homeplacement> + <destination>Remote</destination> + </processcollocation> + + </partitioning> + + + <connections> + <connectinterface> + <usesport> + <usesidentifier>latency</usesidentifier> + <componentinstantiationref idref="a_RoundTripClient"/> + </usesport> + <providesport> + <providesidentifier>latency</providesidentifier> + <componentinstantiationref idref="a_RoundTrip"/> + </providesport> + </connectinterface> + + <connectinterface> + <usesport> + <usesidentifier>latency</usesidentifier> + <componentinstantiationref idref="b_RoundTripClient"/> + </usesport> + <providesport> + <providesidentifier>latency</providesidentifier> + <componentinstantiationref idref="a_RoundTrip"/> + </providesport> + </connectinterface> + + <connectinterface> + <usesport> + <usesidentifier>latency</usesidentifier> + <componentinstantiationref idref="c_RoundTripClient"/> + </usesport> + <providesport> + <providesidentifier>latency</providesidentifier> + <componentinstantiationref idref="a_RoundTrip"/> + </providesport> + </connectinterface> + + <connectinterface> + <usesport> + <usesidentifier>latency</usesidentifier> + <componentinstantiationref idref="d_RoundTripClient"/> + </usesport> + <providesport> + <providesidentifier>latency</providesidentifier> + <componentinstantiationref idref="a_RoundTrip"/> + </providesport> + </connectinterface> + </connections> +</componentassembly> diff --git a/modules/CIAO/performance-tests/Benchmark/descriptors/NOTE.txt b/modules/CIAO/performance-tests/Benchmark/descriptors/NOTE.txt new file mode 100644 index 00000000000..7bcd2fbfade --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/descriptors/NOTE.txt @@ -0,0 +1,65 @@ +This directory contains various XML descriptors and configuration +files required to run benchmarking experiments using CIAO in +different ways. Let's go over a few important files first: + +test.dat: +--------- + + This file describes the deployment daemons CIAO's Assembly_Manager + will contact to instantiate ComponentServer's, home's, and component + instances. Each line specify the name of a installation + "destination" (I used this to specify <processcollocation> + destination in various *.cad files) and the corresponding IOR for + the CIAO_Daemon. The first entry is the "default" destination the + deployment framework will use. + + For example, test.dat now contains: + + Default corbaloc:iiop:localhost:10000/ServerActivator + Remote corbaloc:iiop:localhost:12000/ServerActivator + + You can copy and modify the copy to deploy the components in various + different locations to let the application truely "distributed". + For example, changing the remote ServerActivator to: + corbaloc:iiop:deuce.doc.wustl.edu:13000/ServerActivator + + Remember to start up the Assembly_Manager in Step 2 using the + revised "test.dat" you created, and start up the CIAO_Daemon's in + Step 1 according to the specification. + +*.cad: +------ + + These files specify how an application should be composed. The + specification includes, where to install a component, what + implementation to use, and how to connect components together. + Currently, we have: + + Benchmark.cad: Plain vanilla assembly descriptor. This file installs + the RoundTrip component on the location given in test.dat. + RoundTripClient.cad : A descriptor file for the client component + RoundTripClient that uses the interface provided by + RoundTrip. + Test-IOR.cad: This cad file should be used to for testing a CORBA server + with a CIAO client. The IOR of the server should added in + this file. + +There are automated perl scripts that can run the tests to generate the +required results. These are located in the individual component directories +Round Trip and RoundTripClient. The descriptors directory has the required +.cad files that specify the component configuration used in the various +experiments. + +To run a simple CORBA component with a normal client: + cd descriptors; + ../Roundtrip/run_test.pl + + cd descritors; + ../RoundTripClient/run_test.pl + Script that runs two components one acts as a client and the other as the + server. Statistics are printed for RoundTrip latency jitter etc + + cd descritors; + ../RoundTripClient/run_test_ior_cad.pl + Script runs a CORBA server and a CIAO component that acts as a client. + Similar statistics are printed. diff --git a/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTrip.csd b/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTrip.csd new file mode 100644 index 00000000000..ebf8c4e1e15 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTrip.csd @@ -0,0 +1,46 @@ +<?xml version="1.0"?> <!-- -*- SGML -*- --> + +<!-- If this file is moved to a different directory, make sure to change the + path to the DTD below. Otherwise the examples won't work. --> + +<!DOCTYPE softpkg SYSTEM "http://www.dre.vanderbilt.edu/CIAO/DTD/softpkg.dtd"> + +<!-- RoundTrip's Software Package Descriptor --> +<!-- This file describes various RoundTrip executor --> +<!-- implementations. --> + +<softpkg name="CIAO-TEST" version="1.0"> + <pkgtype>CORBA Component</pkgtype> + <title>RoundTrip</title> + <author> + <company>ISIS at Vanderbilt University</company> + <webpage href="http://www.dre.vanderbilt.edu/"/> + </author> + <description>A RoundTrip component.</description> + <license href="http://www.cs.wustl.edu/~schmidt/ACE-copying.html"/> + <idl id="IDL:Benchmark/RoundTrip:1.0" homeid="IDL:Benchmark/RoundTripHome:1.0"> + <fileinarchive name="RoundTrip.idl"/> + </idl> + <descriptor type="CORBA Component"> + <fileinarchive name="RoundTrip.ccd"/> + </descriptor> + <implementation id="DCE:2498aa68-09aa-478c-8ae1-30ed67924f82"> + + <!-- CIAO extension --> + <dependency type="CIAODLL"> + <softpkgref> + <!-- .ssd stands for Servant Software Descriptors which is a CIAO extension --> + <fileinarchive name="RoundTrip.ssd"/> + <implref idref="DCE:88c14bff-5158-4f48-9b22-8a1120e87f76"/> + </softpkgref> + </dependency> + + <code type="DLL"> + <!-- No need to specify extension below since ACE takes care of that, --> + <fileinarchive name="RoundTrip_exec"/> + <entrypoint>createRoundTripHome_Impl</entrypoint> + </code> + + </implementation> + +</softpkg> diff --git a/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTrip.ssd b/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTrip.ssd new file mode 100644 index 00000000000..b9720b9f2f1 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTrip.ssd @@ -0,0 +1,43 @@ +<?xml version="1.0"?> <!-- -*- SGML -*- --> + +<!-- If this file is moved to a different directory, make sure to change the + path to the DTD below. Otherwise the examples won't work. --> + +<!DOCTYPE softpkg SYSTEM "http://www.dre.vanderbilt.edu/CIAO/DTD/softpkg.dtd"> + +<!-- RoundTrip's Servant Software Descriptor --> +<!-- This file describes various RoundTrip servant --> +<!-- implementations. --> + +<softpkg name="CIAO-RoundTrip-Servant" version="1.0"> + <pkgtype>CIAO Servant</pkgtype> + <title>Benchmark::RoundTrip Servants</title> + <author> + <company>ISIS at Vanderbilt University</company> + <webpage href="http://www.dre.vanderbilt.edu/"/> + </author> + <description>Single-Threaded Latency test component for benchmarking.</description> + <license href="http://www.cs.wustl.edu/~schmidt/ACE-copying.html"/> + <idl id="IDL:Benchmark/RoundTrip:1.0" homeid="IDL:Benchmark/RoundTripHome:1.0"> + <fileinarchive name="RoundTrip.idl"/> + </idl> + + <descriptor type="CORBA Component"> + <fileinarchive name="RoundTrip.ccd"/> + </descriptor> + + <implementation id="DCE:88c14bff-5158-4f48-9b22-8a1120e87f76"> + + <dependency type="ORB"> + <name>TAO</name> + </dependency> + + <code> + <!-- No need to specify extension below since ACE takes care of that, --> + <fileinarchive name="RoundTrip_svnt"/> + <entrypoint>createRoundTripHome_Servant</entrypoint> + </code> + + </implementation> + +</softpkg> diff --git a/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTripClient.cad b/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTripClient.cad new file mode 100644 index 00000000000..d53416195a2 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTripClient.cad @@ -0,0 +1,49 @@ +<?xml version="1.0"?> <!-- -*- SGML -*- --> + +<!-- If this file is moved to a different directory, make sure to change the + path to the DTD below. Otherwise the examples won't work. --> +<!DOCTYPE componentassembly SYSTEM "http://www.dre.vanderbilt.edu/CIAO/DTD/componentassembly.dtd"> +<componentassembly id="Collocated Round-Trip test"> + <componentfiles> + <componentfile id="com-RoundTrip"> + <fileinarchive name="RoundTrip.csd"/> + </componentfile> + <componentfile id="com-RoundTripClient"> + <fileinarchive name="RoundTripClient.csd"/> + </componentfile> + </componentfiles> + + <partitioning> + +<homeplacement id="a_RoundTripHome"> + <componentfileref idref="com-RoundTrip"/> + <componentinstantiation id="a_RoundTrip"/> + </homeplacement> + +<homeplacement id="a_RoundTripClientHome"> + <componentfileref idref="com-RoundTripClient"/> + <componentinstantiation id="a_RoundTripClient"> + <registercomponent> + <!-- writeiortofile is a non-standard CIAO extension. --> + <writeiortofile name="test.ior"/> + </registercomponent> + </componentinstantiation> + </homeplacement> + <!-- A plain vanilla partition. We don't even need the processcollocation tag here. --> + + </partitioning> + + <connections> + <connectinterface> + <usesport> + <usesidentifier>latency</usesidentifier> + <componentinstantiationref idref="a_RoundTripClient"/> + </usesport> + <providesport> + <providesidentifier>latency</providesidentifier> + <componentinstantiationref idref="a_RoundTrip"/> + </providesport> + </connectinterface> + </connections> + +</componentassembly> diff --git a/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTripClient.csd b/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTripClient.csd new file mode 100644 index 00000000000..c52288e3207 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTripClient.csd @@ -0,0 +1,44 @@ +<?xml version="1.0"?> <!-- -*- SGML -*- --> + +<!-- If this file is moved to a different directory, make sure to change the + path to the DTD below. Otherwise the examples won't work. --> +<!DOCTYPE softpkg SYSTEM "http://www.dre.vanderbilt.edu/CIAO/DTD/softpkg.dtd"> +<!-- RoundTripClient's Software Package Descriptor --> +<!-- This file describes various RoundTripClient executor --> +<!-- implementations. --> + + +<softpkg name="CIAO-TEST" version="1.0"> + <pkgtype>CORBA Component</pkgtype> + <title>RoundTripClient</title> + <author> + <company>ISIS at Vanderbilt University</company> + <webpage href="http://www.dre.vanderbilt.edu/"/> + </author> + <description>A RoundTripClient component.</description> + <license href="http://www.cs.wustl.edu/~schmidt/ACE-copying.html"/> + <idl id="IDL:Benchmark/RoundTripClient:1.0" homeid="IDL:Benchmark/RoundTripClientHome:1.0"> + <fileinarchive name="RoundTripClient.idl"/> + </idl> + <descriptor type="CORBA Component"> + <fileinarchive name="RoundTripClient.ccd"/> + </descriptor> + <implementation id="DCE:568a3872-f7bb-4b3f-baba-44c6824d966d"> + + <!-- CIAO extension --> + <dependency type="CIAODLL"> + <softpkgref> + <!-- .ssd stands for Servant Software Descriptors which is a CIAO extension --> + <fileinarchive name="RoundTripClient.ssd"/> + <implref idref="DCE:cf88cb97-b5a8-4522-9fa3-e626c75c5470"/> + </softpkgref> + </dependency> + + <code type="DLL"> + <!-- No need to specify extension below since ACE takes care of that, --> + <fileinarchive name="RoundTripClient_exec"/> + <entrypoint>createRoundTripClientHome_Impl</entrypoint> + </code> + </implementation> + +</softpkg> diff --git a/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTripClient.ssd b/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTripClient.ssd new file mode 100644 index 00000000000..86397731ed2 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/descriptors/RoundTripClient.ssd @@ -0,0 +1,39 @@ +<?xml version="1.0"?> <!-- -*- SGML -*- --> + +<!-- If this file is moved to a different directory, make sure to change the + path to the DTD below. Otherwise the examples won't work. --> +<!DOCTYPE softpkg SYSTEM "http://www.dre.vanderbilt.edu/CIAO/DTD/softpkg.dtd"> +<!-- RoundTripClient's Servant Software Descriptor --> +<!-- This file describes various RoundTripClient servant --> +<!-- implementations. --> + +<softpkg name="CIAO-RoundTripClient-Servant" version="1.0"> + <pkgtype>CIAO Servant</pkgtype> + <title>Benchmark::RoundTripClient Servants</title> + <author> + <company>ISIS at Vanderbilt University</company> + <webpage href="http://www.dre.vanderbilt.edu/"/> + </author> + <description>Single-Threaded Latency test component for benchmarking.</description> + <license href="http://www.cs.wustl.edu/~schmidt/ACE-copying.html"/> + <idl id="IDL:Benchmark/RoundTripClient:1.0" homeid="IDL:Benchmark/RoundTripClientHome:1.0"> + <fileinarchive name="RoundTripClient.idl"/> + </idl> + + <descriptor type="CORBA Component"> + <fileinarchive name="RoundTripClient.ccd"/> + </descriptor> + + <implementation id="DCE:cf88cb97-b5a8-4522-9fa3-e626c75c5470"> + + <dependency type="ORB"> + <name>TAO</name> + </dependency> + + <code> + <!-- No need to specify extension below since ACE takes care of that, --> + <fileinarchive name="RoundTripClient_svnt"/> + <entrypoint>createRoundTripClientHome_Servant</entrypoint> + </code> + </implementation> +</softpkg> diff --git a/modules/CIAO/performance-tests/Benchmark/descriptors/Test-IOR.cad b/modules/CIAO/performance-tests/Benchmark/descriptors/Test-IOR.cad new file mode 100644 index 00000000000..a917affec85 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/descriptors/Test-IOR.cad @@ -0,0 +1,41 @@ +<?xml version="1.0"?> <!-- -*- SGML -*- --> + +<!-- If this file is moved to a different directory, make sure to change the + path to the DTD below. Otherwise the examples won't work. --> +<!DOCTYPE componentassembly SYSTEM "http://www.dre.vanderbilt.edu/CIAO/DTD/componentassembly.dtd"> + +<componentassembly id="Single-process Basic assembly"> + <componentfiles> + <componentfile id="com-RoundTripClient"> + <fileinarchive name="RoundTripClient.csd"/> + </componentfile> + </componentfiles> + + <partitioning> + <homeplacement id="a_RoundTripClientHome"> + <componentfileref idref="com-RoundTripClient"/> + <componentinstantiation id="a_RoundTripClient"> + <registercomponent> + <!-- writeiortofile is a non-standard CIAO extension. --> + <writeiortofile name="test.ior"/> + </registercomponent> + </componentinstantiation> + </homeplacement> + </partitioning> + +<connections> + <connectinterface> + <usesport> + <usesidentifier>latency</usesidentifier> + <componentinstantiationref idref="a_RoundTripClient"/> + </usesport> + <existinginterface> + <findby> + <!-- One needs to add the correct IOR of the server here --> + <stringifiedobjectref>file://rtserver.ior</stringifiedobjectref> + </findby> + </existinginterface> + </connectinterface> +</connections> + +</componentassembly> diff --git a/modules/CIAO/performance-tests/Benchmark/descriptors/test-multi-process.dat b/modules/CIAO/performance-tests/Benchmark/descriptors/test-multi-process.dat new file mode 100644 index 00000000000..1570574903b --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/descriptors/test-multi-process.dat @@ -0,0 +1,5 @@ +Default corbaloc:iiop:localhost:10000/ServerActivator +Remote1 corbaloc:iiop:localhost:12000/ServerActivator +Remote2 corbaloc:iiop:localhost:13000/ServerActivator +Remote3 corbaloc:iiop:localhost:14000/ServerActivator +Remote4 corbaloc:iiop:localhost:15000/ServerActivator
\ No newline at end of file diff --git a/modules/CIAO/performance-tests/Benchmark/descriptors/test.dat b/modules/CIAO/performance-tests/Benchmark/descriptors/test.dat new file mode 100644 index 00000000000..d26b3d4e070 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/descriptors/test.dat @@ -0,0 +1,2 @@ +Default corbaloc:iiop:localhost:10000/ServerActivator +Remote corbaloc:iiop:localhost:12000/ServerActivator
\ No newline at end of file diff --git a/modules/CIAO/performance-tests/Benchmark/server.cpp b/modules/CIAO/performance-tests/Benchmark/server.cpp new file mode 100644 index 00000000000..3091692da17 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/server.cpp @@ -0,0 +1,94 @@ +// $Id$ + +#include "LatencyTest.h" + +#include "ace/Sched_Params.h" +#include "ace/OS_NS_errno.h" + +//#include "tao/Strategies/advanced_resource.h" + +const char *ior_output_file = "test.ior"; + +int +ACE_TMAIN(int argc, ACE_TCHAR *argv[]) +{ + int priority = + (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO) + + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2; + + priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO, + priority); + // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. + + if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, + priority, + ACE_SCOPE_PROCESS)) != 0) + { + if (ACE_OS::last_error () == EPERM) + { + ACE_DEBUG ((LM_DEBUG, + "server (%P|%t): user is not superuser, " + "test runs in time-shared class\n")); + } + else + { + ACE_ERROR ((LM_ERROR, + "server (%P|%t): sched_params failed\n")); + } + } + + try + { + CORBA::ORB_var orb = + CORBA::ORB_init (argc, argv); + + CORBA::Object_var poa_object = + orb->resolve_initial_references("RootPOA"); + + if (CORBA::is_nil (poa_object.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); + } + + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object.in ()); + + PortableServer::POAManager_var poa_manager = + root_poa->the_POAManager (); + + LatencyTest *roundtrip_impl; + ACE_NEW_RETURN (roundtrip_impl, + LatencyTest (orb.in ()), + 1); + PortableServer::ServantBase_var owner_transfer(roundtrip_impl); + + //Get the RoundTrip reference + Benchmark::LatencyTest_var roundtrip = + roundtrip_impl->_this (); + + CORBA::String_var ior = + orb->object_to_string (roundtrip.in ()); + + // If the ior_output_file exists, output the ior to it + ACE_DEBUG ((LM_DEBUG, "%s", ior.in ())); + + poa_manager->activate (); + + orb->run (); + + ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n")); + + root_poa->destroy (1, 1); + + orb->destroy (); + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("Exception caught:"); + return 1; + } + + return 0; +} diff --git a/modules/CIAO/performance-tests/Benchmark/svc.conf b/modules/CIAO/performance-tests/Benchmark/svc.conf new file mode 100644 index 00000000000..7b8129f5667 --- /dev/null +++ b/modules/CIAO/performance-tests/Benchmark/svc.conf @@ -0,0 +1,6 @@ +# +# $Id$ +# +static Advanced_Resource_Factory "-ORBReactorMaskSignals 0 -ORBInputCDRAllocator null -ORBReactorType select_st -ORBConnectionCacheLock null" +static Server_Strategy_Factory "-ORBPOALock null -ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBProfileLock null -ORBClientConnectionHandler RW" |