diff options
author | Abdullah Sowayan <sowayan@users.noreply.github.com> | 2008-06-16 11:26:55 +0000 |
---|---|---|
committer | Abdullah Sowayan <sowayan@users.noreply.github.com> | 2008-06-16 11:26:55 +0000 |
commit | 01cd5447c1634c7658e3bef4614ab7b4a2d45904 (patch) | |
tree | adbcb1492e03ce40b2b9851756ffe3cf00381b82 /TAO/performance-tests | |
parent | fb1e271d2179ad846f82896008e3f82424853eb9 (diff) | |
download | ATCD-01cd5447c1634c7658e3bef4614ab7b4a2d45904.tar.gz |
Mon Jun 16 11:25:06 UTC 2008 Abdullah Sowayan <abdullah.sowayan@lmco.com>
Diffstat (limited to 'TAO/performance-tests')
8 files changed, 149 insertions, 157 deletions
diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp index 98564ca9266..1dc063802cc 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp @@ -45,8 +45,8 @@ Util_Thread::svc (void) this->ts_->timer_.stop (); ACE_DEBUG ((LM_DEBUG, - "(%t) (((((((( " - "utilization test ENDED at %D\n")); + "(%t) (((((((( " + "utilization test ENDED at %D\n")); return 0; } @@ -84,12 +84,12 @@ Util_Thread::run_computations (void) { // Bound the number of computations, since we can potentially // block the machine if this thread never leaves the loop. - if (this->number_of_computations_ > (ts_->loop_count_ * UTIL_BOUND_CONSTANT)) - { - ACE_DEBUG ((LM_DEBUG, - "\t(%t) utilization test breaking loop so machine won't block.\n")); - break; - } + if (this->number_of_computations_ > (ts_->loop_count_ * UTIL_BOUND_CONSTANT)) + { + ACE_DEBUG ((LM_DEBUG, + "\t(%t) utilization test breaking loop so machine won't block.\n")); + break; + } this->computation (); this->number_of_computations_++; diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp index 52c17f15c31..a293d6257fc 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp @@ -385,7 +385,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) // run the server. result = server.run (); ACE_DEBUG ((LM_DEBUG, - "%s:%d\n", __FILE__, __LINE__)); + "%s:%d\n", __FILE__, __LINE__)); if (result != 0) ACE_ERROR_RETURN ((LM_ERROR, "Error while running the servants\n"), diff --git a/TAO/performance-tests/Protocols/receiver.cpp b/TAO/performance-tests/Protocols/receiver.cpp index bb59104867d..a66ebb978c7 100644 --- a/TAO/performance-tests/Protocols/receiver.cpp +++ b/TAO/performance-tests/Protocols/receiver.cpp @@ -64,10 +64,10 @@ public: ~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); void end_test (void); @@ -76,12 +76,12 @@ public: void twoway_sync (void); void oneway_method (CORBA::Long session_id, - CORBA::ULong iteration, - const ::test::octets &payload); + CORBA::ULong iteration, + const ::test::octets &payload); void twoway_method (CORBA::Long &session_id, - CORBA::ULong &iteration, - ::test::octets &payload); + CORBA::ULong &iteration, + ::test::octets &payload); //FUZZ: disable check_for_lack_ACE_OS void shutdown (void); @@ -120,25 +120,24 @@ 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) { if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - "Session id starts %d\n", - session_id)); - + "Session id starts %d\n", + session_id)); } ACE_DEBUG ((LM_DEBUG, - "Protocol = %5s Invocation Rate = %3d Message Size = %5d Expected Latency = %4d ", - protocol, - invocation_rate, - message_size, - 1000 / invocation_rate)); + "Protocol = %5s Invocation Rate = %3d Message Size = %5d Expected Latency = %4d ", + protocol, + invocation_rate, + message_size, + 1000 / invocation_rate)); // Remember test parameters. this->session_id_ = session_id; @@ -180,15 +179,15 @@ test_i::end_test (void) this->inter_arrival_times_->collect_basic_stats (stats); ACE_DEBUG ((LM_DEBUG, - "Max Latency = %6d ", - stats.max_ / gsf / 1000)); + "Max Latency = %6d ", + stats.max_ / gsf / 1000)); ACE_DEBUG ((LM_DEBUG, - "Invocations expected / received / missed / missed %% = %6d / %6d / %6d / %5.2f\n", - this->iterations_, - this->number_of_invocations_received_, - this->iterations_ - this->number_of_invocations_received_, - (this->iterations_ - this->number_of_invocations_received_) / (double) this->iterations_ * 100)); + "Invocations expected / received / missed / missed %% = %6d / %6d / %6d / %5.2f\n", + this->iterations_, + 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) { @@ -212,14 +211,15 @@ test_i::end_test (void) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - "Session id ends %d\n", - this->session_id_)); + "Session id ends %d\n", + this->session_id_)); stats.dump_results ("Inter-arrival times", gsf); - ACE_Throughput_Stats::dump_throughput ("Inter-arrival times", gsf, - this->test_end_ - this->test_start_, - stats.samples_count ()); + ACE_Throughput_Stats::dump_throughput ("Inter-arrival times", + gsf, + this->test_end_ - this->test_start_, + stats.samples_count ()); } this->session_id_ = -1; @@ -239,14 +239,14 @@ test_i::twoway_sync (void) void test_i::oneway_method (CORBA::Long session_id, - CORBA::ULong iteration, - const ::test::octets &payload) + CORBA::ULong iteration, + const ::test::octets &payload) { if (this->session_id_ != session_id) { ACE_DEBUG ((LM_DEBUG, - "Late message with iteration id = %d: will not count message\n", - iteration)); + "Late message with iteration id = %d: will not count message\n", + iteration)); return; } @@ -254,7 +254,7 @@ test_i::oneway_method (CORBA::Long session_id, { ACE_DEBUG ((LM_DEBUG, "test_i::oneway_method -> session id = %d iteration = %d payload size = %d\n", - session_id, + session_id, iteration, payload.length ())); } @@ -275,14 +275,14 @@ test_i::oneway_method (CORBA::Long session_id, void test_i::twoway_method (CORBA::Long &session_id, - CORBA::ULong &iteration, - ::test::octets &payload) + CORBA::ULong &iteration, + ::test::octets &payload) { if (this->session_id_ != session_id) { ACE_DEBUG ((LM_DEBUG, - "Late message with iteration id = %d: will not count message\n", - iteration)); + "Late message with iteration id = %d: will not count message\n", + iteration)); return; } @@ -290,7 +290,7 @@ test_i::twoway_method (CORBA::Long &session_id, { ACE_DEBUG ((LM_DEBUG, "test_i::twoway_method -> session id = %d iteration = %d payload size = %d\n", - session_id, + session_id, iteration, payload.length ())); } @@ -352,7 +352,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) test_i *servant = new test_i (orb.in (), - root_poa.in ()); + root_poa.in ()); PortableServer::ServantBase_var safe_servant (servant); ACE_UNUSED_ARG (safe_servant); diff --git a/TAO/performance-tests/Sequence_Latency/AMH_Single_Threaded/Roundtrip.h b/TAO/performance-tests/Sequence_Latency/AMH_Single_Threaded/Roundtrip.h index 4010187dc77..f9b5826745d 100644 --- a/TAO/performance-tests/Sequence_Latency/AMH_Single_Threaded/Roundtrip.h +++ b/TAO/performance-tests/Sequence_Latency/AMH_Single_Threaded/Roundtrip.h @@ -17,46 +17,46 @@ class Roundtrip : public virtual POA_Test::AMH_Roundtrip { - public: - /// Constructor - Roundtrip (CORBA::ORB_ptr orb); +public: + /// Constructor + Roundtrip (CORBA::ORB_ptr orb); - // = The skeleton methods - void test_octet_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, - const Test::octet_load& ol, - Test::Timestamp send_time); + // = The skeleton methods + void test_octet_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, + const Test::octet_load& ol, + Test::Timestamp send_time); - void test_long_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, - const Test::long_load& ol, - Test::Timestamp send_time); + void test_long_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, + const Test::long_load& ol, + Test::Timestamp send_time); - void test_short_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, - const Test::short_load& ol, - Test::Timestamp send_time); + void test_short_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, + const Test::short_load& ol, + Test::Timestamp send_time); - void test_char_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, - const Test::char_load& ol, - Test::Timestamp send_time); + void test_char_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, + const Test::char_load& ol, + Test::Timestamp send_time); - void test_longlong_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, - const Test::longlong_load& ol, - Test::Timestamp send_time); + void test_longlong_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, + const Test::longlong_load& ol, + Test::Timestamp send_time); - void test_double_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, - const Test::double_load& ol, - Test::Timestamp send_time); + void test_double_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, + const Test::double_load& ol, + Test::Timestamp send_time); - void shutdown (Test::AMH_RoundtripResponseHandler_ptr _tao_rh); + void shutdown (Test::AMH_RoundtripResponseHandler_ptr _tao_rh); - private: - /// Use an ORB reference to conver strings to objects and shutdown - /// the application. - CORBA::ORB_var orb_; +private: + /// Use an ORB reference to conver strings to objects and shutdown + /// the application. + CORBA::ORB_var orb_; }; #if defined(_MSC_VER) diff --git a/TAO/performance-tests/Sequence_Latency/AMH_Single_Threaded/client.cpp b/TAO/performance-tests/Sequence_Latency/AMH_Single_Threaded/client.cpp index f8172b5106c..adaadd5c793 100644 --- a/TAO/performance-tests/Sequence_Latency/AMH_Single_Threaded/client.cpp +++ b/TAO/performance-tests/Sequence_Latency/AMH_Single_Threaded/client.cpp @@ -42,7 +42,7 @@ parse_args (int argc, char *argv[]) return -1; break; - case 's': + case 's': sz = ACE_OS::atoi (get_opts.opt_arg ()); break; @@ -66,8 +66,8 @@ parse_args (int argc, char *argv[]) default: ACE_ERROR_RETURN ((LM_ERROR, "usage: %s " - "-t <datatype> " - "-s <size> " + "-t <datatype> " + "-s <size> " "-k <ior> " "-i <niterations> " "-x (disable shutdown) " @@ -379,7 +379,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) 1); } - Test::octet_load oc; + Test::octet_load oc; for (int j = 0; j < 100; ++j) { diff --git a/TAO/performance-tests/Sequence_Latency/DII/client.cpp b/TAO/performance-tests/Sequence_Latency/DII/client.cpp index f58c7584d9b..533dc3c4876 100644 --- a/TAO/performance-tests/Sequence_Latency/DII/client.cpp +++ b/TAO/performance-tests/Sequence_Latency/DII/client.cpp @@ -49,7 +49,7 @@ parse_args (int argc, char *argv[]) return -1; break; - case 's': + case 's': sz = ACE_OS::atoi (get_opts.opt_arg ()); break; @@ -74,8 +74,8 @@ parse_args (int argc, char *argv[]) ACE_ERROR_RETURN ((LM_ERROR, "usage: %s " "-t <datatype> " - "-s <size> " - "-k <ior> " + "-s <size> " + "-k <ior> " "-i <niterations> " "-x (disable shutdown) " "\n", @@ -421,7 +421,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) 1); } - Test::octet_load oc; + Test::octet_load oc; for (int j = 0; j < 100; ++j) { @@ -436,9 +436,9 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) request->invoke (); } - // Test various sequence types + // Test various sequence types - if (ACE_OS::strcmp (data_type, "octet") == 0 ) + if (ACE_OS::strcmp (data_type, "octet") == 0 ) { test_octet_seq (object); } @@ -463,14 +463,12 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) test_longlong_seq (object); } - if (do_shutdown) { CORBA::Request_var request = object->_request ("shutdown"); request->invoke (); - } } catch (const CORBA::Exception& ex) diff --git a/TAO/performance-tests/Sequence_Latency/DSI/Roundtrip.cpp b/TAO/performance-tests/Sequence_Latency/DSI/Roundtrip.cpp index 0d9ecbb5787..8404810a854 100644 --- a/TAO/performance-tests/Sequence_Latency/DSI/Roundtrip.cpp +++ b/TAO/performance-tests/Sequence_Latency/DSI/Roundtrip.cpp @@ -25,7 +25,6 @@ Roundtrip::invoke (CORBA::ServerRequest_ptr request) return; } - else if (ACE_OS::strcmp ("_is_a", request->operation ()) == 0) { CORBA::NVList_ptr list; @@ -55,25 +54,24 @@ Roundtrip::invoke (CORBA::ServerRequest_ptr request) return; } - else if (ACE_OS::strcmp ("test_octet_method", request->operation ()) == 0) { CORBA::NVList_ptr list; this->orb_->create_list (0, list); - // Set up the argument list + // Set up the argument list - CORBA::Any octet_load; + CORBA::Any octet_load; octet_load._tao_set_typecode (Test::_tc_octet_load); - list->add_value ("octet_load", octet_load, CORBA::ARG_IN); + list->add_value ("octet_load", octet_load, CORBA::ARG_IN); - CORBA::Any send_time; + CORBA::Any send_time; send_time._tao_set_typecode (CORBA::_tc_ulonglong); list->add_value ("send_time", send_time, CORBA::ARG_IN); request->arguments (list); - // Set up the return value + // Set up the return value CORBA::NamedValue_ptr nv = list->item (1); @@ -81,25 +79,24 @@ Roundtrip::invoke (CORBA::ServerRequest_ptr request) return; } - else if (ACE_OS::strcmp ("test_long_method", request->operation ()) == 0) { CORBA::NVList_ptr list; this->orb_->create_list (0, list); - // Set up the argument list + // Set up the argument list - CORBA::Any long_load; + CORBA::Any long_load; long_load._tao_set_typecode (Test::_tc_long_load); - list->add_value ("long_load", long_load, CORBA::ARG_IN); + list->add_value ("long_load", long_load, CORBA::ARG_IN); - CORBA::Any send_time; + CORBA::Any send_time; send_time._tao_set_typecode (CORBA::_tc_ulonglong); list->add_value ("send_time", send_time, CORBA::ARG_IN); request->arguments (list); - // Set up the return value + // Set up the return value CORBA::NamedValue_ptr nv = list->item (1); @@ -107,25 +104,24 @@ Roundtrip::invoke (CORBA::ServerRequest_ptr request) return; } - else if (ACE_OS::strcmp ("test_short_method", request->operation ()) == 0) { CORBA::NVList_ptr list; this->orb_->create_list (0, list); - // Set up the argument list + // Set up the argument list - CORBA::Any short_load; + CORBA::Any short_load; short_load._tao_set_typecode (Test::_tc_short_load); - list->add_value ("short_load", short_load, CORBA::ARG_IN); + list->add_value ("short_load", short_load, CORBA::ARG_IN); - CORBA::Any send_time; + CORBA::Any send_time; send_time._tao_set_typecode (CORBA::_tc_ulonglong); list->add_value ("send_time", send_time, CORBA::ARG_IN); request->arguments (list); - // Set up the return value + // Set up the return value CORBA::NamedValue_ptr nv = list->item (1); @@ -133,25 +129,24 @@ Roundtrip::invoke (CORBA::ServerRequest_ptr request) return; } - else if (ACE_OS::strcmp ("test_char_method", request->operation ()) == 0) { CORBA::NVList_ptr list; this->orb_->create_list (0, list); - // Set up the argument list + // Set up the argument list - CORBA::Any char_load; + CORBA::Any char_load; char_load._tao_set_typecode (Test::_tc_char_load); - list->add_value ("char_load", char_load, CORBA::ARG_IN); + list->add_value ("char_load", char_load, CORBA::ARG_IN); - CORBA::Any send_time; + CORBA::Any send_time; send_time._tao_set_typecode (CORBA::_tc_ulonglong); list->add_value ("send_time", send_time, CORBA::ARG_IN); request->arguments (list); - // Set up the return value + // Set up the return value CORBA::NamedValue_ptr nv = list->item (1); @@ -159,25 +154,24 @@ Roundtrip::invoke (CORBA::ServerRequest_ptr request) return; } - else if (ACE_OS::strcmp ("test_longlong_method", request->operation ()) == 0) { CORBA::NVList_ptr list; this->orb_->create_list (0, list); - // Set up the argument list + // Set up the argument list - CORBA::Any longlong_load; + CORBA::Any longlong_load; longlong_load._tao_set_typecode (Test::_tc_longlong_load); - list->add_value ("longlong_load", longlong_load, CORBA::ARG_IN); + list->add_value ("longlong_load", longlong_load, CORBA::ARG_IN); - CORBA::Any send_time; + CORBA::Any send_time; send_time._tao_set_typecode (CORBA::_tc_ulonglong); list->add_value ("send_time", send_time, CORBA::ARG_IN); request->arguments (list); - // Set up the return value + // Set up the return value CORBA::NamedValue_ptr nv = list->item (1); @@ -185,25 +179,24 @@ Roundtrip::invoke (CORBA::ServerRequest_ptr request) return; } - else if (ACE_OS::strcmp ("test_double_method", request->operation ()) == 0) { CORBA::NVList_ptr list; this->orb_->create_list (0, list); - // Set up the argument list + // Set up the argument list - CORBA::Any double_load; + CORBA::Any double_load; double_load._tao_set_typecode (Test::_tc_double_load); - list->add_value ("double_load", double_load, CORBA::ARG_IN); + list->add_value ("double_load", double_load, CORBA::ARG_IN); - CORBA::Any send_time; + CORBA::Any send_time; send_time._tao_set_typecode (CORBA::_tc_ulonglong); list->add_value ("send_time", send_time, CORBA::ARG_IN); request->arguments (list); - // Set up the return value + // Set up the return value CORBA::NamedValue_ptr nv = list->item (1); diff --git a/TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/client.cpp b/TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/client.cpp index a9fa808fe60..5387cdca495 100644 --- a/TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/client.cpp +++ b/TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/client.cpp @@ -40,7 +40,7 @@ parse_args (int argc, char *argv[]) return -1; break; - case 's': + case 's': sz = ACE_OS::atoi (get_opts.opt_arg ()); break; @@ -61,8 +61,8 @@ parse_args (int argc, char *argv[]) ACE_ERROR_RETURN ((LM_ERROR, "usage: %s " "-t <datatype> " - "-s <size> " - "-k <ior> " + "-s <size> " + "-k <ior> " "-i <niterations> " "-x (disable shutdown) " "\n", @@ -119,41 +119,42 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) 1); } - /// Begin the test + /// Begin the test - ACE_DEBUG ((LM_DEBUG, "Starting threads\n")); + ACE_DEBUG ((LM_DEBUG, "Starting threads\n")); - Client_Task task0(data_type, sz, roundtrip.in (), niterations); - Client_Task task1(data_type, sz, roundtrip.in (), niterations); - Client_Task task2(data_type, sz, roundtrip.in (), niterations); - Client_Task task3(data_type, sz, roundtrip.in (), niterations); + Client_Task task0(data_type, sz, roundtrip.in (), niterations); + Client_Task task1(data_type, sz, roundtrip.in (), niterations); + Client_Task task2(data_type, sz, roundtrip.in (), niterations); + Client_Task task3(data_type, sz, roundtrip.in (), niterations); - ACE_hrtime_t test_start = ACE_OS::gethrtime (); - task0.activate(THR_NEW_LWP | THR_JOINABLE); - task1.activate(THR_NEW_LWP | THR_JOINABLE); - task2.activate(THR_NEW_LWP | THR_JOINABLE); - task3.activate(THR_NEW_LWP | THR_JOINABLE); + ACE_hrtime_t test_start = ACE_OS::gethrtime (); + task0.activate(THR_NEW_LWP | THR_JOINABLE); + task1.activate(THR_NEW_LWP | THR_JOINABLE); + task2.activate(THR_NEW_LWP | THR_JOINABLE); + task3.activate(THR_NEW_LWP | THR_JOINABLE); - task0.thr_mgr()->wait (); - ACE_hrtime_t test_end = ACE_OS::gethrtime (); + task0.thr_mgr()->wait (); + ACE_hrtime_t test_end = ACE_OS::gethrtime (); - ACE_DEBUG ((LM_DEBUG, "Threads finished\n")); + ACE_DEBUG ((LM_DEBUG, "Threads 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")); + ACE_DEBUG ((LM_DEBUG, "High resolution timer calibration....")); + ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); + ACE_DEBUG ((LM_DEBUG, "done\n")); - ACE_Basic_Stats totals; - task0.accumulate_and_dump (totals, "Task[0]", gsf); - task1.accumulate_and_dump (totals, "Task[1]", gsf); - task2.accumulate_and_dump (totals, "Task[2]", gsf); - task3.accumulate_and_dump (totals, "Task[3]", gsf); + ACE_Basic_Stats totals; + task0.accumulate_and_dump (totals, "Task[0]", gsf); + task1.accumulate_and_dump (totals, "Task[1]", gsf); + task2.accumulate_and_dump (totals, "Task[2]", gsf); + task3.accumulate_and_dump (totals, "Task[3]", gsf); - totals.dump_results ("Total", gsf); + totals.dump_results ("Total", gsf); - ACE_Throughput_Stats::dump_throughput ("Total", gsf, - test_end - test_start, - totals.samples_count ()); + ACE_Throughput_Stats::dump_throughput ("Total", + gsf, + test_end - test_start, + totals.samples_count ()); if (do_shutdown) { |