summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-11-25 07:11:37 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-11-25 07:11:37 +0000
commit1497cae058f1a6595c0abe5b465f64a5b599e58c (patch)
tree71d2a2e97569053ef1d612ff17e6a4cbfb323713
parentd7af9170bb8be7d35f2bcc996561b028f441fdd3 (diff)
downloadATCD-1497cae058f1a6595c0abe5b465f64a5b599e58c.tar.gz
ChangeLogTag:Mon Nov 24 23:56:49 2003 Nanbor Wang <nanbor@cse.wustl.edu>
-rw-r--r--TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.cpp26
-rw-r--r--TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.h7
-rw-r--r--TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/client.cpp11
-rw-r--r--TAO/CIAO/tests/RTCCM/Priority_Test/Priority_Test.idl5
-rwxr-xr-xTAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic_test.pl12
5 files changed, 49 insertions, 12 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 4cb0929155e..b9a943dee25 100644
--- a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.cpp
+++ b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.cpp
@@ -18,18 +18,21 @@ MyImpl::Controller_exec_i::~Controller_exec_i ()
// Operations from Priority_Test::Controller
void
-MyImpl::Controller_exec_i::perform_test (ACE_ENV_SINGLE_ARG_DECL)
+MyImpl::Controller_exec_i::start (CORBA::Long arg
+ ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
// This simply performs some measurements and print out the result.
ACE_DEBUG ((LM_DEBUG, "PERFORM TEST\n"));
+ ACE_UNUSED_ARG (arg);
+
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;
+ const int niterations = 1000;
+ const CORBA::Long work = arg;
ACE_Sample_History history (niterations);
ACE_hrtime_t test_start = ACE_OS::gethrtime ();
@@ -47,6 +50,11 @@ MyImpl::Controller_exec_i::perform_test (ACE_ENV_SINGLE_ARG_DECL)
ACE_DEBUG ((LM_DEBUG, "test finished\n"));
+ const int len = 1024;
+ char title [len];
+
+ ACE_OS::snprintf (title, len, "Total (work=%4d)", work);
+
ACE_DEBUG ((LM_DEBUG, "High resolution timer calibration...."));
ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
ACE_DEBUG ((LM_DEBUG, "done\n"));
@@ -56,15 +64,23 @@ MyImpl::Controller_exec_i::perform_test (ACE_ENV_SINGLE_ARG_DECL)
// history.dump_samples ("HISTORY", gsf);
// }
+
+
ACE_Basic_Stats stats;
history.collect_basic_stats (stats);
- stats.dump_results ("Total", gsf);
+ stats.dump_results (title, gsf);
- ACE_Throughput_Stats::dump_throughput ("Total", gsf,
+ ACE_Throughput_Stats::dump_throughput (title, gsf,
test_end - test_start,
stats.samples_count ());
}
+void
+MyImpl::Controller_exec_i::stop (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+}
+
// Operations from Components::SessionComponent
void
MyImpl::Controller_exec_i::set_session_context (Components::SessionContext_ptr ctx
diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.h b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.h
index 1aa46053052..cb650ac6b57 100644
--- a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.h
+++ b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.h
@@ -43,7 +43,12 @@ namespace MyImpl
// Operations from Priority_Test::Controller
virtual void
- perform_test (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ start (CORBA::Long arg
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void
+ stop (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
// Operations from Components::SessionComponent
diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/client.cpp b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/client.cpp
index 20d2f62bbe7..9469f5fa6d8 100644
--- a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/client.cpp
+++ b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/client.cpp
@@ -10,11 +10,12 @@
#include "ace/streams.h"
char *controller_ior_ = 0;
+long work = 80;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:r:of");
+ ACE_Get_Opt get_opts (argc, argv, "k:w:");
int c;
while ((c = get_opts ()) != -1)
@@ -25,11 +26,16 @@ parse_args (int argc, char *argv[])
controller_ior_ = get_opts.opt_arg ();
break;
+ case 'w':
+ work = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
case '?': // display help for use of the server.
default:
ACE_ERROR_RETURN ((LM_ERROR,
"usage: %s\n"
"-k <Controller IOR>\n"
+ "-w <work amount>\n"
"\n",
argv [0]),
-1);
@@ -67,7 +73,8 @@ main (int argc, char *argv[])
if (CORBA::is_nil (ctrlr.in ()))
ACE_ERROR_RETURN ((LM_ERROR, "Unable to acquire 'Controller' objref\n"), -1);
- ctrlr->perform_test (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ctrlr->start (work
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/Priority_Test.idl b/TAO/CIAO/tests/RTCCM/Priority_Test/Priority_Test.idl
index bf073c04414..f0268ad3a42 100644
--- a/TAO/CIAO/tests/RTCCM/Priority_Test/Priority_Test.idl
+++ b/TAO/CIAO/tests/RTCCM/Priority_Test/Priority_Test.idl
@@ -20,7 +20,10 @@ module Priority_Test
*/
interface Op_Mode
{
- void perform_test ();
+ /// Start with arg.
+ void start (in long arg);
+
+ void stop ();
};
/**
diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic_test.pl b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic_test.pl
index 1e5b437d1ba..bcdaeebce9f 100755
--- a/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic_test.pl
+++ b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic_test.pl
@@ -81,13 +81,19 @@ if (PerlACE::waitforfile_timed ($controller_ior, 15) == -1) {
exit 1;
}
+for ($work = 20; $work < 400; $work += 20)
+{
+ printf "Test work: $work\n";
+
#Start the client to send the trigger message
-$CL = new PerlACE::Process ("../Controllers/client", "-k file://$controller_ior");
-$CL->SpawnWaitKill(60);
+ $CL = new PerlACE::Process ("../Controllers/client",
+ "-k file://$controller_ior -w $work");
+ $CL->SpawnWaitKill(60);
## Now wait for the test to complete. Need to figure out a way to
## detect this.
-sleep (60);
+ sleep (3);
+}
## Now teardown the application
$AD = new PerlACE::Process("$CIAO_ROOT/tools/Assembly_Deployer/Assembly_Deployer",