summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/Protocols
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/performance-tests/Protocols')
-rw-r--r--TAO/performance-tests/Protocols/distributor.cpp63
-rw-r--r--TAO/performance-tests/Protocols/receiver.cpp51
-rw-r--r--TAO/performance-tests/Protocols/sender.cpp40
3 files changed, 50 insertions, 104 deletions
diff --git a/TAO/performance-tests/Protocols/distributor.cpp b/TAO/performance-tests/Protocols/distributor.cpp
index 5a7ad1c1735..b25ab2d4148 100644
--- a/TAO/performance-tests/Protocols/distributor.cpp
+++ b/TAO/performance-tests/Protocols/distributor.cpp
@@ -65,13 +65,13 @@ public:
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
- void end_test (ACE_ENV_SINGLE_ARG_DECL)
+ void end_test (void)
ACE_THROW_SPEC ((CORBA::SystemException));
- void oneway_sync (ACE_ENV_SINGLE_ARG_DECL)
+ void oneway_sync (void)
ACE_THROW_SPEC ((CORBA::SystemException));
- void twoway_sync (ACE_ENV_SINGLE_ARG_DECL)
+ void twoway_sync (void)
ACE_THROW_SPEC ((CORBA::SystemException));
void oneway_method (CORBA::Long session_id,
@@ -86,10 +86,10 @@ public:
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
+ void shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException));
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
+ PortableServer::POA_ptr _default_POA (void);
private:
CORBA::ORB_var orb_;
@@ -178,7 +178,6 @@ test_i::start_test (CORBA::Long session_id,
this->policy_manager_->set_policy_overrides (this->test_protocol_policy_,
CORBA::SET_OVERRIDE
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Since the network maybe unavailable temporarily, make sure to try
// for a few times before giving up.
@@ -190,7 +189,7 @@ test_i::start_test (CORBA::Long session_id,
ACE_TRY_EX (B1)
{
// Send a message to ensure that the connection is setup.
- this->receiver_->oneway_sync (ACE_ENV_SINGLE_ARG_PARAMETER);
+ this->receiver_->oneway_sync ();
ACE_TRY_CHECK_EX (B1);
goto test_protocol_success;
@@ -221,7 +220,6 @@ test_i::start_test (CORBA::Long session_id,
this->policy_manager_->set_policy_overrides (this->base_protocol_policy_,
CORBA::SET_OVERRIDE
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Since the network maybe unavailable temporarily, make sure to try
// for a few times before giving up.
@@ -268,37 +266,32 @@ test_i::start_test (CORBA::Long session_id,
this->policy_manager_->set_policy_overrides (this->test_protocol_policy_,
CORBA::SET_OVERRIDE
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
void
-test_i::end_test (ACE_ENV_SINGLE_ARG_DECL)
+test_i::end_test (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
// Use IIOP to indicate end of test to server.
this->policy_manager_->set_policy_overrides (this->base_protocol_policy_,
CORBA::SET_OVERRIDE
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->receiver_->end_test (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->receiver_->end_test ();
}
void
-test_i::oneway_sync (ACE_ENV_SINGLE_ARG_DECL)
+test_i::oneway_sync (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- this->receiver_->oneway_sync (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->receiver_->oneway_sync ();
}
void
-test_i::twoway_sync (ACE_ENV_SINGLE_ARG_DECL)
+test_i::twoway_sync (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- this->receiver_->twoway_sync (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->receiver_->twoway_sync ();
}
void
@@ -312,7 +305,6 @@ test_i::oneway_method (CORBA::Long session_id,
iteration,
payload
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
void
@@ -326,25 +318,22 @@ test_i::twoway_method (CORBA::Long &session_id,
iteration,
payload
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+test_i::_default_POA (void)
{
return PortableServer::POA::_duplicate (this->poa_.in ());
}
void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+test_i::shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- this->receiver_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->receiver_->shutdown ();
this->orb_->shutdown (0
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
int
@@ -357,27 +346,22 @@ main (int argc, char **argv)
argv,
0
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
CORBA::Object_var object =
orb->resolve_initial_references ("RTORB"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
RTCORBA::RTORB_var rtorb =
RTCORBA::RTORB::_narrow (object.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
object =
orb->resolve_initial_references ("ORBPolicyManager"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
CORBA::PolicyManager_var policy_manager =
CORBA::PolicyManager::_narrow (object.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
int parse_args_result =
parse_args (argc, argv);
@@ -387,26 +371,21 @@ main (int argc, char **argv)
object =
orb->resolve_initial_references ("RootPOA"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
PortableServer::POA_var root_poa =
PortableServer::POA::_narrow (object.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ root_poa->the_POAManager ();
object =
orb->string_to_object (ior
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
test_var receiver =
test::_narrow (object.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
test_i *servant =
new test_i (orb.in (),
@@ -418,12 +397,10 @@ main (int argc, char **argv)
ACE_UNUSED_ARG (safe_servant);
test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ servant->_this ();
CORBA::String_var ior =
orb->object_to_string (test.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
FILE *output_file =
ACE_OS::fopen (ior_file, "w");
@@ -438,11 +415,9 @@ main (int argc, char **argv)
ACE_OS::fclose (output_file);
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ poa_manager->activate ();
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->run ();
}
ACE_CATCHANY
{
diff --git a/TAO/performance-tests/Protocols/receiver.cpp b/TAO/performance-tests/Protocols/receiver.cpp
index 586fab9059b..72b40871ea0 100644
--- a/TAO/performance-tests/Protocols/receiver.cpp
+++ b/TAO/performance-tests/Protocols/receiver.cpp
@@ -69,13 +69,13 @@ public:
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
- void end_test (ACE_ENV_SINGLE_ARG_DECL)
+ void end_test (void)
ACE_THROW_SPEC ((CORBA::SystemException));
- void oneway_sync (ACE_ENV_SINGLE_ARG_DECL)
+ void oneway_sync (void)
ACE_THROW_SPEC ((CORBA::SystemException));
- void twoway_sync (ACE_ENV_SINGLE_ARG_DECL)
+ void twoway_sync (void)
ACE_THROW_SPEC ((CORBA::SystemException));
void oneway_method (CORBA::Long session_id,
@@ -90,10 +90,10 @@ public:
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
- void shutdown (ACE_ENV_SINGLE_ARG_DECL)
+ void shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException));
- PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
+ PortableServer::POA_ptr _default_POA (void);
private:
CORBA::ORB_var orb_;
@@ -173,7 +173,7 @@ test_i::start_test (CORBA::Long session_id,
}
void
-test_i::end_test (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+test_i::end_test (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
// Record end time.
@@ -198,7 +198,7 @@ test_i::end_test (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
this->number_of_invocations_received_,
this->iterations_ - this->number_of_invocations_received_,
(this->iterations_ - this->number_of_invocations_received_) / (double) this->iterations_ * 100));
-
+
if (print_missed_invocations)
{
ACE_DEBUG ((LM_DEBUG, "\nFollowing invocations were never received:\n"));
@@ -220,10 +220,10 @@ test_i::end_test (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
if (TAO_debug_level > 0)
{
- ACE_DEBUG ((LM_DEBUG,
+ ACE_DEBUG ((LM_DEBUG,
"Session id ends %d\n",
this->session_id_));
-
+
stats.dump_results ("Inter-arrival times", gsf);
ACE_Throughput_Stats::dump_throughput ("Inter-arrival times", gsf,
@@ -237,13 +237,13 @@ test_i::end_test (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
}
void
-test_i::oneway_sync (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+test_i::oneway_sync (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
void
-test_i::twoway_sync (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+test_i::twoway_sync (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
@@ -257,9 +257,9 @@ test_i::oneway_method (CORBA::Long session_id,
{
if (this->session_id_ != session_id)
{
- ACE_DEBUG ((LM_DEBUG,
+ ACE_DEBUG ((LM_DEBUG,
"Late message with iteration id = %d: will not count message\n",
- iteration));
+ iteration));
return;
}
@@ -295,9 +295,9 @@ test_i::twoway_method (CORBA::Long &session_id,
{
if (this->session_id_ != session_id)
{
- ACE_DEBUG ((LM_DEBUG,
+ ACE_DEBUG ((LM_DEBUG,
"Late message with iteration id = %d: will not count message\n",
- iteration));
+ iteration));
return;
}
@@ -325,13 +325,13 @@ test_i::twoway_method (CORBA::Long &session_id,
}
PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+test_i::_default_POA (void)
{
return PortableServer::POA::_duplicate (this->poa_.in ());
}
void
-test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+test_i::shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG,
@@ -339,7 +339,6 @@ test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
this->orb_->shutdown (0
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
int
@@ -354,7 +353,6 @@ main (int argc, char **argv)
argv,
0
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
int parse_args_result =
parse_args (argc, argv);
@@ -364,16 +362,13 @@ main (int argc, char **argv)
CORBA::Object_var object =
orb->resolve_initial_references ("RootPOA"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
PortableServer::POA_var root_poa =
PortableServer::POA::_narrow (object.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ root_poa->the_POAManager ();
test_i *servant =
new test_i (orb.in (),
@@ -383,12 +378,10 @@ main (int argc, char **argv)
ACE_UNUSED_ARG (safe_servant);
test_var test =
- servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ servant->_this ();
CORBA::String_var ior =
orb->object_to_string (test.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
FILE *output_file =
ACE_OS::fopen (ior_file, "w");
@@ -403,11 +396,9 @@ main (int argc, char **argv)
ACE_OS::fclose (output_file);
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ poa_manager->activate ();
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->run ();
}
ACE_CATCHANY
{
diff --git a/TAO/performance-tests/Protocols/sender.cpp b/TAO/performance-tests/Protocols/sender.cpp
index 5558f0abcee..68d9f7dd7e2 100644
--- a/TAO/performance-tests/Protocols/sender.cpp
+++ b/TAO/performance-tests/Protocols/sender.cpp
@@ -183,11 +183,11 @@ public:
CORBA::PolicyManager_ptr policy_manager,
test_ptr test);
- void run (ACE_ENV_SINGLE_ARG_DECL);
+ void run (void);
void print_stats (void);
- void setup (ACE_ENV_SINGLE_ARG_DECL);
+ void setup (void);
private:
@@ -454,14 +454,13 @@ Worker::missed_end_deadline (CORBA::ULong invocation)
}
void
-Worker::setup (ACE_ENV_SINGLE_ARG_DECL)
+Worker::setup (void)
{
// Make sure we have a connection to the server using the test
// protocol.
this->policy_manager_->set_policy_overrides (this->test_protocol_policy_,
CORBA::SET_OVERRIDE
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Since the network maybe unavailable temporarily, make sure to try
// for a few times before giving up.
@@ -473,7 +472,7 @@ Worker::setup (ACE_ENV_SINGLE_ARG_DECL)
ACE_TRY_EX (B1)
{
// Send a message to ensure that the connection is setup.
- this->test_->oneway_sync (ACE_ENV_SINGLE_ARG_PARAMETER);
+ this->test_->oneway_sync ();
ACE_TRY_CHECK_EX (B1);
goto test_protocol_success;
@@ -503,7 +502,6 @@ Worker::setup (ACE_ENV_SINGLE_ARG_DECL)
this->policy_manager_->set_policy_overrides (this->base_protocol_policy_,
CORBA::SET_OVERRIDE
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Since the network maybe unavailable temporarily, make sure to try
// for a few times before giving up.
@@ -549,13 +547,12 @@ Worker::setup (ACE_ENV_SINGLE_ARG_DECL)
}
void
-Worker::run (ACE_ENV_SINGLE_ARG_DECL)
+Worker::run (void)
{
// Select the test protocol for these invocation.
this->policy_manager_->set_policy_overrides (this->test_protocol_policy_,
CORBA::SET_OVERRIDE
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Payload.
::test::octets_var payload (new ::test::octets);
@@ -611,7 +608,6 @@ Worker::run (ACE_ENV_SINGLE_ARG_DECL)
i,
payload.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
else
{
@@ -620,7 +616,6 @@ Worker::run (ACE_ENV_SINGLE_ARG_DECL)
i,
payload.inout ()
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
// For PACED and LATENCY, each sender call is individually
@@ -659,8 +654,7 @@ Worker::run (ACE_ENV_SINGLE_ARG_DECL)
if (test_type == THROUGHPUT &&
ACE_OS::strcmp (test_protocol, "DIOP") != 0)
{
- this->test_->twoway_sync (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->test_->twoway_sync ();
}
// Record end time for the test.
@@ -670,11 +664,9 @@ Worker::run (ACE_ENV_SINGLE_ARG_DECL)
this->policy_manager_->set_policy_overrides (this->base_protocol_policy_,
CORBA::SET_OVERRIDE
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Tell server that the test is over.
- this->test_->end_test (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->test_->end_test ();
}
int
@@ -689,27 +681,22 @@ main (int argc, char **argv)
argv,
0
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
CORBA::Object_var object =
orb->resolve_initial_references ("RTORB"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
RTCORBA::RTORB_var rtorb =
RTCORBA::RTORB::_narrow (object.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
object =
orb->resolve_initial_references ("ORBPolicyManager"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
CORBA::PolicyManager_var policy_manager =
CORBA::PolicyManager::_narrow (object.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
int parse_args_result =
parse_args (argc, argv);
@@ -720,12 +707,10 @@ main (int argc, char **argv)
object =
orb->resolve_initial_references ("NetworkPriorityMappingManager"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
RTCORBA::NetworkPriorityMappingManager_var mapping_manager =
RTCORBA::NetworkPriorityMappingManager::_narrow (object.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Initialize the custom priority mapping
Custom_Network_Priority_Mapping *cnpm = 0;
@@ -744,31 +729,26 @@ main (int argc, char **argv)
object =
orb->string_to_object (ior
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
test_var test =
test::_narrow (object.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
Worker worker (orb.in (),
rtorb.in (),
policy_manager.in (),
test.in ());
- worker.setup (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ worker.setup ();
- worker.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ worker.run ();
if (print_statistics)
worker.print_stats ();
if (shutdown_server)
{
- test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ test->shutdown ();
}
}
ACE_CATCHANY