diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-06-16 17:57:54 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-06-16 17:57:54 +0000 |
commit | 84c57ebe26cf3135534d564885a0ecf6cbe409b6 (patch) | |
tree | 2c3721856ea5e2b5365d0b6158d770ec19c9d225 /TAO/performance-tests/Protocols | |
parent | 15fed2f2ed1408f6ce8e0479c800dce2173a776b (diff) | |
download | ATCD-84c57ebe26cf3135534d564885a0ecf6cbe409b6.tar.gz |
ChangeLogTag: Wed Jun 16 13:54:56 2004 Irfan Pyarali <irfan@oomworks.com>
Diffstat (limited to 'TAO/performance-tests/Protocols')
-rw-r--r-- | TAO/performance-tests/Protocols/client.cpp | 26 | ||||
-rw-r--r-- | TAO/performance-tests/Protocols/server.cpp | 6 | ||||
-rw-r--r-- | TAO/performance-tests/Protocols/test.idl | 4 |
3 files changed, 30 insertions, 6 deletions
diff --git a/TAO/performance-tests/Protocols/client.cpp b/TAO/performance-tests/Protocols/client.cpp index 818c7a38a7e..2d01e6621bb 100644 --- a/TAO/performance-tests/Protocols/client.cpp +++ b/TAO/performance-tests/Protocols/client.cpp @@ -5,6 +5,7 @@ #include "ace/Stats.h" #include "ace/Sample_History.h" #include "ace/OS_NS_unistd.h" +#include "ace/OS_NS_string.h" #include "testC.h" static const char *ior = "file://ior"; @@ -15,11 +16,12 @@ static int count_missed_end_deadlines = 0; static ACE_UINT32 gsf = 0; static int do_dump_history = 0; static int print_missed_invocations = 0; +static CORBA::ULong message_size = 0; static int parse_args (int argc, char **argv) { - ACE_Get_Opt get_opts (argc, argv, "d:e:i:k:m:r:x:"); + ACE_Get_Opt get_opts (argc, argv, "d:e:i:k:m:r:s:x:"); int c; while ((c = get_opts ()) != -1) @@ -49,6 +51,10 @@ parse_args (int argc, char **argv) invocation_rate = ACE_OS::atoi (get_opts.opt_arg ()); break; + case 's': + message_size = ACE_OS::atoi (get_opts.opt_arg ()); + break; + case 'x': shutdown_server = ACE_OS::atoi (get_opts.opt_arg ()); break; @@ -63,6 +69,7 @@ parse_args (int argc, char **argv) "\t-k <ior> (defaults to %s)\n" "\t-m <print missed invocations for paced workers> (defaults to %d)\n" "\t-r <invocation rate> (defaults to %d)\n" + "\t-s <message size> (defaults to %d)\n" "\t-x <shutdown server> (defaults to %d)\n" "\n", argv[0], @@ -72,6 +79,7 @@ parse_args (int argc, char **argv) ior, print_missed_invocations, invocation_rate, + message_size, shutdown_server), -1); } @@ -260,8 +268,19 @@ Paced_Worker::missed_end_deadline (CORBA::ULong invocation) void Paced_Worker::run (ACE_ENV_SINGLE_ARG_DECL) { + ::test::octets payload; + payload.length (message_size); + + CORBA::Octet *buffer = + payload.get_buffer (); + + ACE_OS::memset (buffer, + 1, + message_size * sizeof CORBA::Octet); + // To get things going... - this->test_->method (ACE_ENV_SINGLE_ARG_PARAMETER); + this->test_->method (payload + ACE_ENV_ARG_PARAMETER); ACE_CHECK; this->test_start_ = @@ -283,7 +302,8 @@ Paced_Worker::run (ACE_ENV_SINGLE_ARG_DECL) continue; } - this->test_->method (ACE_ENV_SINGLE_ARG_PARAMETER); + this->test_->method (payload + ACE_ENV_ARG_PARAMETER); ACE_CHECK; ACE_hrtime_t time_after_call = diff --git a/TAO/performance-tests/Protocols/server.cpp b/TAO/performance-tests/Protocols/server.cpp index dac5678a7b8..edc6ab5ae3f 100644 --- a/TAO/performance-tests/Protocols/server.cpp +++ b/TAO/performance-tests/Protocols/server.cpp @@ -15,7 +15,8 @@ public: test_i (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa); - void method (ACE_ENV_SINGLE_ARG_DECL) + void method (const ::test::octets &payload + ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); void shutdown (ACE_ENV_SINGLE_ARG_DECL) @@ -36,7 +37,8 @@ test_i::test_i (CORBA::ORB_ptr orb, } void -test_i::method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +test_i::method (const ::test::octets & + ACE_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_DEBUG ((LM_DEBUG, diff --git a/TAO/performance-tests/Protocols/test.idl b/TAO/performance-tests/Protocols/test.idl index 6b5e1c7cea4..e580ffc2c3a 100644 --- a/TAO/performance-tests/Protocols/test.idl +++ b/TAO/performance-tests/Protocols/test.idl @@ -2,6 +2,8 @@ interface test { - oneway void method (); + typedef sequence<octet> octets; + + oneway void method (in octets payload); oneway void shutdown (); }; |