diff options
Diffstat (limited to 'TAO/CIAO/tests/RTCCM')
4 files changed, 138 insertions, 4 deletions
diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.cpp b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.cpp index 7a4012c6797..4cb0929155e 100644 --- a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.cpp +++ b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.cpp @@ -2,6 +2,9 @@ #include "Controller_exec.h" #include "CIAO_common.h" +#include "ace/High_Res_Timer.h" +#include "ace/Stats.h" +#include "ace/Sample_History.h" /// Default constructor. MyImpl::Controller_exec_i::Controller_exec_i () @@ -21,6 +24,45 @@ MyImpl::Controller_exec_i::perform_test (ACE_ENV_SINGLE_ARG_DECL) // This simply performs some measurements and print out the result. ACE_DEBUG ((LM_DEBUG, "PERFORM TEST\n")); + + Priority_Test::Common_Ops_var device = + this->context_->get_connection_worker (ACE_ENV_SINGLE_ARG_PARAMETER); + + const int niterations = 200; + const CORBA::Long work = 80; + ACE_Sample_History history (niterations); + + ACE_hrtime_t test_start = ACE_OS::gethrtime (); + for (int i = 0; i < niterations; ++i) + { + ACE_hrtime_t start = ACE_OS::gethrtime (); + + (void) device->do_work (work, 0 ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + ACE_hrtime_t now = ACE_OS::gethrtime (); + history.sample (now - start); + } + ACE_hrtime_t 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 ("HISTORY", gsf); +// } + + ACE_Basic_Stats stats; + history.collect_basic_stats (stats); + stats.dump_results ("Total", gsf); + + ACE_Throughput_Stats::dump_throughput ("Total", gsf, + test_end - test_start, + stats.samples_count ()); } // Operations from Components::SessionComponent diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/Workers/CB_Worker_exec.cpp b/TAO/CIAO/tests/RTCCM/Priority_Test/Workers/CB_Worker_exec.cpp index bff80b38051..c0180137298 100644 --- a/TAO/CIAO/tests/RTCCM/Priority_Test/Workers/CB_Worker_exec.cpp +++ b/TAO/CIAO/tests/RTCCM/Priority_Test/Workers/CB_Worker_exec.cpp @@ -3,6 +3,10 @@ #include "CB_Worker_exec.h" #include "CIAO_common.h" +// This should really be a configurable value. CIAO doesn't suppor +// this yet but the new D&C shall support this RSN. +static local_primer_ = 9619; + /// Default constructor. MyImpl::CB_Worker_exec::CB_Worker_exec () { @@ -30,11 +34,19 @@ MyImpl::CB_Worker_exec::do_work (CORBA::Long work, ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { + // aux is not use for now, so do something with it. CORBA::ULong retv = work + aux; - ACE_DEBUG ((LM_DEBUG, - "MyImpl::CB_Worker_exec::do_work (%d, %d) = %d\n", - work, aux, retv)); + if (CIAO::debug_level () > 0) + ACE_DEBUG ((LM_DEBUG, + "CB_Worker::do_work: %hd units of work\n", + work)); + + for (; work != 0; --work) + ACE::is_prime (local_primer_, + 2, + local_primer_ / 2); + return retv; } diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/NOTE-win.txt b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/NOTE-win.txt new file mode 100644 index 00000000000..b81a4099026 --- /dev/null +++ b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/NOTE-win.txt @@ -0,0 +1,80 @@ +Conventional test: +================== + +Remote Daemon: +-------------- + + w:\TAO\CIAO\tests\RTCCM\Priority_Test\descriptors\ + title Remote Daemon + .....\tools\Daemon\CIAO_Daemon -ORBEndpoint iiop://localhost:12000 -n ../../../../tools/ComponentServer/ComponentServer + +Local Daemon: +-------------- + + w:\TAO\CIAO\tests\RTCCM\Priority_Test\descriptors\ + title Local Daemon + .....\tools\Daemon\CIAO_Daemon -ORBEndpoint iiop://localhost:10000 -n ../../../../tools/ComponentServer/ComponentServer + + +Assembly Manager +----------------- + + w:\TAO\CIAO\tests\RTCCM\Priority_Test\descriptors\ + title Assembly Manager + .....\tools\Assembly_Deployer\Assembly_Manager -o ior -c test.dat + +Assembly Deployer +----------------- + + + w:\TAO\CIAO\tests\RTCCM\Priority_Test\descriptors\ + title Assembly Deployer + .....\tools\Assembly_Deployer\Assembly_Deployer -k file://ior -a demo.cad + +client +------ + + w:\TAO\CIAO\tests\RTCCM\Priority_Test\descriptors\ + title Client + ..\Controller\client + + +RT-server-test: +=============== + +Remote Daemon: +-------------- + + w:\TAO\CIAO\tests\RTCCM\Priority_Test\descriptors\ + title Remote Daemon + .....\tools\Daemon\CIAO_Daemon -ORBEndpoint iiop://localhost:12000 -n ../../../../tools/RTComponentServer/RTComponentServer -m svcmap.dat + +Local Daemon: +-------------- + + w:\TAO\CIAO\tests\RTCCM\Priority_Test\descriptors\ + title Local Daemon + .....\tools\Daemon\CIAO_Daemon -ORBEndpoint iiop://localhost:10000 -n ../../../../tools/RTComponentServer/RTComponentServer -m svcmap.dat + + +Assembly Manager +----------------- + + w:\TAO\CIAO\tests\RTCCM\Priority_Test\descriptors\ + title Assembly Manager + .....\tools\Assembly_Deployer\Assembly_Manager -o ior -c test.dat + +Assembly Deployer +----------------- + + + w:\TAO\CIAO\tests\RTCCM\Priority_Test\descriptors\ + title Assembly Deployer + .....\tools\Assembly_Deployer\Assembly_Deployer -k file://ior -a HUDisplay-rtcad.cad + +client +------ + + w:\TAO\CIAO\tests\RTCCM\Priority_Test\descriptors\ + title Controller + ..\Controller\client diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/demo.cad b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/demo.cad index 5ee3fd328ae..af6f79df6fb 100644 --- a/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/demo.cad +++ b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/demo.cad @@ -10,7 +10,7 @@ <fileinarchive name="Controller.csd"/> </componentfile> <componentfile id="com-Worker"> - <fileinarchive name="IOB_Worker.csd"/> + <fileinarchive name="CB_Worker.csd"/> </componentfile> </componentfiles> |