diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-10-11 22:01:04 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-10-11 22:01:04 +0000 |
commit | 913dc8765bf229fc041a3a5850cdbb8cf0f2dc11 (patch) | |
tree | 13b8c306b3feda14c9baa621eccff53705413b72 /TAO/performance-tests | |
parent | 4e0bbe188f4d63e92a0aa1a24be4e6e0e820ea18 (diff) | |
download | ATCD-913dc8765bf229fc041a3a5850cdbb8cf0f2dc11.tar.gz |
ChangeLogTag: Mon Oct 11 17:46:48 2004 Irfan Pyarali <irfan@oomworks.com>
Diffstat (limited to 'TAO/performance-tests')
-rw-r--r-- | TAO/performance-tests/Protocols/distributor.cpp | 172 | ||||
-rw-r--r-- | TAO/performance-tests/Protocols/sender.cpp | 10 |
2 files changed, 91 insertions, 91 deletions
diff --git a/TAO/performance-tests/Protocols/distributor.cpp b/TAO/performance-tests/Protocols/distributor.cpp index b212e9bc150..c0b36a65a56 100644 --- a/TAO/performance-tests/Protocols/distributor.cpp +++ b/TAO/performance-tests/Protocols/distributor.cpp @@ -34,11 +34,11 @@ parse_args (int argc, char **argv) ACE_ERROR_RETURN ((LM_ERROR, "usage: %s\n" "\t-f <ior_file> (defaults to %s)\n" - "\t-k <ior> (defaults to %s)\n" + "\t-k <ior> (defaults to %s)\n" "\n", argv[0], ior_file, - ior), + ior), -1); } @@ -52,17 +52,17 @@ class test_i : public: test_i (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, - RTCORBA::RTORB_ptr rtorb, - CORBA::PolicyManager_ptr policy_manager, - test_ptr receiver); + RTCORBA::RTORB_ptr rtorb, + CORBA::PolicyManager_ptr policy_manager, + test_ptr receiver); ~test_i (void); void start_test (CORBA::Long session_id, - const char *protocol, - CORBA::ULong invocation_rate, - CORBA::ULong message_size, - CORBA::ULong iterations + const char *protocol, + CORBA::ULong invocation_rate, + CORBA::ULong message_size, + CORBA::ULong iterations ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); @@ -76,15 +76,15 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); void oneway_method (CORBA::Long session_id, - CORBA::ULong iteration, - const ::test::octets &payload - ACE_ENV_ARG_DECL) + CORBA::ULong iteration, + const ::test::octets &payload + ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); void twoway_method (CORBA::Long &session_id, - CORBA::ULong &iteration, - ::test::octets &payload - ACE_ENV_ARG_DECL) + CORBA::ULong &iteration, + ::test::octets &payload + ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); void shutdown (ACE_ENV_SINGLE_ARG_DECL) @@ -98,16 +98,16 @@ private: RTCORBA::RTORB_var rtorb_; CORBA::PolicyManager_var policy_manager_; test_var receiver_; - + CORBA::PolicyList base_protocol_policy_; CORBA::PolicyList test_protocol_policy_; }; test_i::test_i (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, - RTCORBA::RTORB_ptr rtorb, - CORBA::PolicyManager_ptr policy_manager, - test_ptr receiver) + RTCORBA::RTORB_ptr rtorb, + CORBA::PolicyManager_ptr policy_manager, + test_ptr receiver) : orb_ (CORBA::ORB::_duplicate (orb)), poa_ (PortableServer::POA::_duplicate (poa)), rtorb_ (RTCORBA::RTORB::_duplicate (rtorb)), @@ -116,7 +116,7 @@ test_i::test_i (CORBA::ORB_ptr orb, { // Base protocol is used for setting up and tearing down the test. this->base_protocol_policy_.length (1); - + // Test protocol is the one being tested. this->test_protocol_policy_.length (1); @@ -141,10 +141,10 @@ test_i::~test_i (void) void test_i::start_test (CORBA::Long session_id, - const char *protocol, - CORBA::ULong invocation_rate, - CORBA::ULong message_size, - CORBA::ULong iterations + const char *protocol, + CORBA::ULong invocation_rate, + CORBA::ULong message_size, + CORBA::ULong iterations ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { @@ -158,7 +158,7 @@ test_i::start_test (CORBA::Long session_id, if (ACE_OS::strcmp (protocol, "DIOP") == 0) { if (TAO_debug_level) ACE_DEBUG ((LM_DEBUG, "test protocol is DIOP\n")); - protocols[0].protocol_type = TAO_TAG_UDP_PROFILE; + protocols[0].protocol_type = TAO_TAG_DIOP_PROFILE; } else if (ACE_OS::strcmp (protocol, "SCIOP") == 0) { @@ -189,31 +189,31 @@ test_i::start_test (CORBA::Long session_id, test_protocol_setup: ACE_TRY_EX (B1) - { - // Send a message to ensure that the connection is setup. - this->receiver_->oneway_sync (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK_EX (B1); + { + // Send a message to ensure that the connection is setup. + this->receiver_->oneway_sync (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK_EX (B1); - goto test_protocol_success; - } + goto test_protocol_success; + } ACE_CATCH (CORBA::TRANSIENT, exception) - { - ++j; - - if (j < number_of_connection_attempts) - { - ACE_OS::sleep (1); - goto test_protocol_setup; - } - } + { + ++j; + + if (j < number_of_connection_attempts) + { + ACE_OS::sleep (1); + goto test_protocol_setup; + } + } ACE_ENDTRY; - ACE_ERROR ((LM_ERROR, - "Cannot setup test protocol\n")); + ACE_ERROR ((LM_ERROR, + "Cannot setup test protocol\n")); ACE_THROW (CORBA::TRANSIENT (CORBA::OMGVMCID | 2, - CORBA::COMPLETED_NO)); - } + CORBA::COMPLETED_NO)); + } test_protocol_success: @@ -232,36 +232,36 @@ test_i::start_test (CORBA::Long session_id, base_protocol_setup: ACE_TRY_EX (B2) - { - // Let the server know what to expect.. - this->receiver_->start_test (session_id, - protocol, - invocation_rate, - message_size, - iterations - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK_EX (B2); - - goto base_protocol_success; - } + { + // Let the server know what to expect.. + this->receiver_->start_test (session_id, + protocol, + invocation_rate, + message_size, + iterations + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK_EX (B2); + + goto base_protocol_success; + } ACE_CATCH (CORBA::TRANSIENT, exception) - { - ACE_OS::sleep (1); - - if (k < number_of_connection_attempts) - { - ACE_OS::sleep (1); - goto base_protocol_setup; - } - } + { + ACE_OS::sleep (1); + + if (k < number_of_connection_attempts) + { + ACE_OS::sleep (1); + goto base_protocol_setup; + } + } ACE_ENDTRY; - ACE_ERROR ((LM_ERROR, - "Cannot setup base protocol\n")); + ACE_ERROR ((LM_ERROR, + "Cannot setup base protocol\n")); ACE_THROW (CORBA::TRANSIENT (CORBA::OMGVMCID | 2, - CORBA::COMPLETED_NO)); - } + CORBA::COMPLETED_NO)); + } base_protocol_success: @@ -304,29 +304,29 @@ test_i::twoway_sync (ACE_ENV_SINGLE_ARG_DECL) void test_i::oneway_method (CORBA::Long session_id, - CORBA::ULong iteration, - const ::test::octets &payload - ACE_ENV_ARG_DECL) + CORBA::ULong iteration, + const ::test::octets &payload + ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { this->receiver_->oneway_method (session_id, - iteration, - payload - ACE_ENV_ARG_PARAMETER); + iteration, + payload + ACE_ENV_ARG_PARAMETER); ACE_CHECK; } void test_i::twoway_method (CORBA::Long &session_id, - CORBA::ULong &iteration, - ::test::octets &payload - ACE_ENV_ARG_DECL) + CORBA::ULong &iteration, + ::test::octets &payload + ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { this->receiver_->twoway_method (session_id, - iteration, - payload - ACE_ENV_ARG_PARAMETER); + iteration, + payload + ACE_ENV_ARG_PARAMETER); ACE_CHECK; } @@ -410,11 +410,11 @@ main (int argc, char **argv) ACE_TRY_CHECK; test_i *servant = - new test_i (orb.in (), - root_poa.in (), - rtorb.in (), - policy_manager.in (), - receiver.in ()); + new test_i (orb.in (), + root_poa.in (), + rtorb.in (), + policy_manager.in (), + receiver.in ()); PortableServer::ServantBase_var safe_servant (servant); ACE_UNUSED_ARG (safe_servant); diff --git a/TAO/performance-tests/Protocols/sender.cpp b/TAO/performance-tests/Protocols/sender.cpp index f302f18d6cc..a733f5d64c0 100644 --- a/TAO/performance-tests/Protocols/sender.cpp +++ b/TAO/performance-tests/Protocols/sender.cpp @@ -252,7 +252,7 @@ Worker::Worker (CORBA::ORB_ptr orb, RTCORBA::ProtocolProperties_var base_transport_protocol_properties = TAO_Protocol_Properties_Factory::create_transport_protocol_property (IOP::TAG_INTERNET_IOP, orb->orb_core ()); - + RTCORBA::TCPProtocolProperties_var tcp_base_transport_protocol_properties = RTCORBA::TCPProtocolProperties::_narrow (base_transport_protocol_properties.in ()); @@ -275,7 +275,7 @@ Worker::Worker (CORBA::ORB_ptr orb, if (ACE_OS::strcmp (test_protocol, "DIOP") == 0) { if (TAO_debug_level) ACE_DEBUG ((LM_DEBUG, "test protocol is DIOP\n")); - protocols[0].protocol_type = TAO_TAG_UDP_PROFILE; + protocols[0].protocol_type = TAO_TAG_DIOP_PROFILE; } else if (ACE_OS::strcmp (test_protocol, "SCIOP") == 0) { @@ -291,8 +291,8 @@ Worker::Worker (CORBA::ORB_ptr orb, RTCORBA::ProtocolProperties_var test_transport_protocol_properties = TAO_Protocol_Properties_Factory::create_transport_protocol_property (protocols[0].protocol_type, orb->orb_core ()); - - if (protocols[0].protocol_type == TAO_TAG_UDP_PROFILE) + + if (protocols[0].protocol_type == TAO_TAG_DIOP_PROFILE) { RTCORBA::UserDatagramProtocolProperties_var udp_test_transport_protocol_properties = RTCORBA::UserDatagramProtocolProperties::_narrow (test_transport_protocol_properties.in ()); @@ -661,7 +661,7 @@ Worker::run (ACE_ENV_SINGLE_ARG_DECL) // This call is used to ensure that all the THROUGHPUT related data // has reached the server. - if (test_type == THROUGHPUT && + if (test_type == THROUGHPUT && ACE_OS::strcmp (test_protocol, "DIOP") != 0) { this->test_->twoway_sync (ACE_ENV_SINGLE_ARG_PARAMETER); |