From 93417dc9399f9a16c31c4ec414d13d7ffc36169c Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 10 Oct 2008 12:45:33 +0000 Subject: Fri Oct 11 12:42:45 UTC 2008 Johnny Willemsen --- .../Sequence_Latency/AMI/client.cpp | 26 +++++++++++----------- .../Sequence_Latency/DII/client.cpp | 26 +++++++++++----------- .../Sequence_Latency/DSI/client.cpp | 26 +++++++++++----------- .../Sequence_Latency/Deferred/client.cpp | 26 +++++++++++----------- .../Sequence_Latency/Single_Threaded/client.cpp | 26 +++++++++++----------- .../Thread_Per_Connection/Client_Task.cpp | 18 +++++++-------- .../Thread_Per_Connection/Client_Task.h | 8 +++---- .../Thread_Per_Connection/client.cpp | 22 +++++++++--------- 8 files changed, 89 insertions(+), 89 deletions(-) (limited to 'TAO/performance-tests') diff --git a/TAO/performance-tests/Sequence_Latency/AMI/client.cpp b/TAO/performance-tests/Sequence_Latency/AMI/client.cpp index 7fc32054966..a9e23b6a036 100644 --- a/TAO/performance-tests/Sequence_Latency/AMI/client.cpp +++ b/TAO/performance-tests/Sequence_Latency/AMI/client.cpp @@ -23,7 +23,7 @@ ACE_hrtime_t throughput_base; int niterations = 1000; int sz = 512; -const char *data_type = "octet"; +const ACE_TCHAR *data_type = ACE_TEXT("octet"); int parse_args (int argc, ACE_TCHAR *argv[]) @@ -37,12 +37,12 @@ parse_args (int argc, ACE_TCHAR *argv[]) case 't': data_type = get_opts.opt_arg (); - if (ACE_OS::strcmp (data_type, "octet") != 0 && - ACE_OS::strcmp (data_type, "char") != 0 && - ACE_OS::strcmp (data_type, "long") != 0 && - ACE_OS::strcmp (data_type, "short") != 0 && - ACE_OS::strcmp (data_type, "double") != 0 && - ACE_OS::strcmp (data_type, "longlong") != 0) + if (ACE_OS::strcmp (data_type, ACE_TEXT("octet")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("char")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("long")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("short")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("double")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("longlong")) != 0) return -1; break; @@ -426,42 +426,42 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) poa_manager->activate (); - if (ACE_OS::strcmp (data_type, "octet") == 0 ) + if (ACE_OS::strcmp (data_type, ACE_TEXT("octet")) == 0 ) { test_octet_seq (roundtrip.in (), orb.in (), roundtrip_handler.in (), roundtrip_handler_impl); } - else if (ACE_OS::strcmp (data_type, "char") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("char")) == 0) { test_char_seq (roundtrip.in (), orb.in (), roundtrip_handler.in (), roundtrip_handler_impl); } - else if (ACE_OS::strcmp (data_type, "long") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("long")) == 0) { test_long_seq (roundtrip.in (), orb.in (), roundtrip_handler.in (), roundtrip_handler_impl); } - else if (ACE_OS::strcmp (data_type, "short") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("short")) == 0) { test_short_seq (roundtrip.in (), orb.in (), roundtrip_handler.in (), roundtrip_handler_impl); } - else if (ACE_OS::strcmp (data_type, "double") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("double")) == 0) { test_double_seq (roundtrip.in (), orb.in (), roundtrip_handler.in (), roundtrip_handler_impl); } - else if (ACE_OS::strcmp (data_type, "longlong") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("longlong")) == 0) { test_longlong_seq (roundtrip.in (), orb.in (), diff --git a/TAO/performance-tests/Sequence_Latency/DII/client.cpp b/TAO/performance-tests/Sequence_Latency/DII/client.cpp index 660651776d9..102c0aac8d4 100644 --- a/TAO/performance-tests/Sequence_Latency/DII/client.cpp +++ b/TAO/performance-tests/Sequence_Latency/DII/client.cpp @@ -26,7 +26,7 @@ int do_dump_history = 0; int do_shutdown = 1; int sz = 512; -const char *data_type = "octet"; +const ACE_TCHAR *data_type = ACE_TEXT("octet"); int parse_args (int argc, ACE_TCHAR *argv[]) @@ -40,12 +40,12 @@ parse_args (int argc, ACE_TCHAR *argv[]) case 't': data_type = get_opts.opt_arg (); - if (ACE_OS::strcmp (data_type, "octet") != 0 && - ACE_OS::strcmp (data_type, "char") != 0 && - ACE_OS::strcmp (data_type, "long") != 0 && - ACE_OS::strcmp (data_type, "short") != 0 && - ACE_OS::strcmp (data_type, "double") != 0 && - ACE_OS::strcmp (data_type, "longlong") != 0) + if (ACE_OS::strcmp (data_type, ACE_TEXT("octet")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("char")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("long")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("short")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("double")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("longlong")) != 0) return -1; break; @@ -438,27 +438,27 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) // Test various sequence types - if (ACE_OS::strcmp (data_type, "octet") == 0 ) + if (ACE_OS::strcmp (data_type, ACE_TEXT("octet")) == 0 ) { test_octet_seq (object); } - else if (ACE_OS::strcmp (data_type, "char") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("char")) == 0) { test_char_seq (object); } - else if (ACE_OS::strcmp (data_type, "long") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("long")) == 0) { test_long_seq (object); } - else if (ACE_OS::strcmp (data_type, "short") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("short")) == 0) { test_short_seq (object); } - else if (ACE_OS::strcmp (data_type, "double") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("double")) == 0) { test_double_seq (object); } - else if (ACE_OS::strcmp (data_type, "longlong") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("longlong")) == 0) { test_longlong_seq (object); } diff --git a/TAO/performance-tests/Sequence_Latency/DSI/client.cpp b/TAO/performance-tests/Sequence_Latency/DSI/client.cpp index 6f4cca6664a..d6831c19082 100644 --- a/TAO/performance-tests/Sequence_Latency/DSI/client.cpp +++ b/TAO/performance-tests/Sequence_Latency/DSI/client.cpp @@ -21,7 +21,7 @@ int do_dump_history = 0; int do_shutdown = 1; int sz = 512; -const char *data_type = "octet"; +const ACE_TCHAR *data_type = ACE_TEXT("octet"); int parse_args (int argc, ACE_TCHAR *argv[]) @@ -35,12 +35,12 @@ parse_args (int argc, ACE_TCHAR *argv[]) case 't': data_type = get_opts.opt_arg (); - if (ACE_OS::strcmp (data_type, "octet") != 0 && - ACE_OS::strcmp (data_type, "char") != 0 && - ACE_OS::strcmp (data_type, "long") != 0 && - ACE_OS::strcmp (data_type, "short") != 0 && - ACE_OS::strcmp (data_type, "double") != 0 && - ACE_OS::strcmp (data_type, "longlong") != 0) + if (ACE_OS::strcmp (data_type, ACE_TEXT("octet")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("char")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("long")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("short")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("double")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("longlong")) != 0) return -1; break; @@ -392,27 +392,27 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) start); } - if (ACE_OS::strcmp (data_type, "octet") == 0 ) + if (ACE_OS::strcmp (data_type, ACE_TEXT( "octet")) == 0) { test_octet_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "char") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("char")) == 0) { test_char_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "long") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("long")) == 0) { test_long_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "short") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("short")) == 0) { test_short_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "double") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("double")) == 0) { test_double_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "longlong") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("longlong")) == 0) { test_longlong_seq (roundtrip.in ()); } diff --git a/TAO/performance-tests/Sequence_Latency/Deferred/client.cpp b/TAO/performance-tests/Sequence_Latency/Deferred/client.cpp index 870b3ae95b0..a90c4f8a80b 100644 --- a/TAO/performance-tests/Sequence_Latency/Deferred/client.cpp +++ b/TAO/performance-tests/Sequence_Latency/Deferred/client.cpp @@ -28,7 +28,7 @@ int do_shutdown = 1; int do_dump_history = 0; int sz = 512; -const char *data_type = "octet"; +const ACE_TCHAR *data_type = ACE_TEXT("octet"); int parse_args (int argc, ACE_TCHAR *argv[]) @@ -42,12 +42,12 @@ parse_args (int argc, ACE_TCHAR *argv[]) case 't': data_type = get_opts.opt_arg (); - if (ACE_OS::strcmp (data_type, "octet") != 0 && - ACE_OS::strcmp (data_type, "char") != 0 && - ACE_OS::strcmp (data_type, "long") != 0 && - ACE_OS::strcmp (data_type, "short") != 0 && - ACE_OS::strcmp (data_type, "double") != 0 && - ACE_OS::strcmp (data_type, "longlong") != 0) + if (ACE_OS::strcmp (data_type, ACE_TEXT("octet")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("char")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("long")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("short")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("double")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("longlong")) != 0) return -1; break; @@ -570,27 +570,27 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) // Test various sequence types - if (ACE_OS::strcmp (data_type, "octet") == 0 ) + if (ACE_OS::strcmp (data_type, ACE_TEXT("octet")) == 0) { test_octet_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "char") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("char")) == 0) { test_char_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "long") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("long")) == 0) { test_long_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "short") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("short")) == 0) { test_short_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "double") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("double")) == 0) { test_double_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "longlong") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("longlong")) == 0) { test_longlong_seq (roundtrip.in ()); } diff --git a/TAO/performance-tests/Sequence_Latency/Single_Threaded/client.cpp b/TAO/performance-tests/Sequence_Latency/Single_Threaded/client.cpp index 414011acb3b..ff5525a176d 100644 --- a/TAO/performance-tests/Sequence_Latency/Single_Threaded/client.cpp +++ b/TAO/performance-tests/Sequence_Latency/Single_Threaded/client.cpp @@ -19,7 +19,7 @@ int sz = 512; int do_dump_history = 0; int do_shutdown = 1; -const char *data_type = "octet"; +const ACE_TCHAR *data_type = ACE_TEXT("octet"); int parse_args (int argc, ACE_TCHAR *argv[]) @@ -37,12 +37,12 @@ parse_args (int argc, ACE_TCHAR *argv[]) case 't': data_type = get_opts.opt_arg (); - if (ACE_OS::strcmp (data_type, "octet") != 0 && - ACE_OS::strcmp (data_type, "char") != 0 && - ACE_OS::strcmp (data_type, "long") != 0 && - ACE_OS::strcmp (data_type, "short") != 0 && - ACE_OS::strcmp (data_type, "double") != 0 && - ACE_OS::strcmp (data_type, "longlong") != 0) + if (ACE_OS::strcmp (data_type, ACE_TEXT("octet")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("char")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("long")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("short")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("double")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("longlong")) != 0) return -1; break; @@ -386,27 +386,27 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) start); } - if (ACE_OS::strcmp (data_type, "octet") == 0 ) + if (ACE_OS::strcmp (data_type, ACE_TEXT("octet")) == 0) { test_octet_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "char") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("char")) == 0) { test_char_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "long") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("long")) == 0) { test_long_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "short") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("short")) == 0) { test_short_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "double") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("double")) == 0) { test_double_seq (roundtrip.in ()); } - else if (ACE_OS::strcmp (data_type, "longlong") == 0) + else if (ACE_OS::strcmp (data_type, ACE_TEXT("longlong")) == 0) { test_longlong_seq (roundtrip.in ()); } diff --git a/TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/Client_Task.cpp b/TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/Client_Task.cpp index 8e892fb74ec..5d594020cfc 100644 --- a/TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/Client_Task.cpp +++ b/TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/Client_Task.cpp @@ -6,11 +6,11 @@ ACE_RCSID(Thread_Per_Connection_Latency, Client_Task, "$Id$") -Client_Task::Client_Task (const char *data_type, +Client_Task::Client_Task (const ACE_TCHAR *data_type, int size, Test::Roundtrip_ptr roundtrip, int niterations) - : data_type_ (CORBA::string_dup (data_type)) + : data_type_ (data_type) , size_ (size) , roundtrip_ (Test::Roundtrip::_duplicate (roundtrip)) , niterations_ (niterations) @@ -24,27 +24,27 @@ Client_Task::svc (void) { this->validate_connection (); - if (ACE_OS::strcmp (this->data_type_.in (), "octet") == 0 ) + if (ACE_OS::strcmp (this->data_type_, ACE_TEXT("octet")) == 0) { this->test_octet_seq (); } - if (ACE_OS::strcmp (this->data_type_.in (), "long") == 0 ) + if (ACE_OS::strcmp (this->data_type_, ACE_TEXT("long")) == 0) { this->test_long_seq (); } - if (ACE_OS::strcmp (this->data_type_.in (), "short") == 0 ) + if (ACE_OS::strcmp (this->data_type_, ACE_TEXT("short")) == 0) { this->test_short_seq (); } - if (ACE_OS::strcmp (this->data_type_.in (), "char") == 0 ) + if (ACE_OS::strcmp (this->data_type_, ACE_TEXT("char")) == 0) { this->test_char_seq (); } - if (ACE_OS::strcmp (this->data_type_.in (), "longlong") == 0 ) + if (ACE_OS::strcmp (this->data_type_, ACE_TEXT("longlong")) == 0) { this->test_longlong_seq (); } - if (ACE_OS::strcmp (this->data_type_.in (), "double") == 0 ) + if (ACE_OS::strcmp (this->data_type_, ACE_TEXT("double")) == 0) { this->test_double_seq (); } @@ -58,7 +58,7 @@ Client_Task::svc (void) void Client_Task::accumulate_and_dump (ACE_Basic_Stats &totals, - const char *msg, + const ACE_TCHAR *msg, ACE_UINT32 gsf) { totals.accumulate (this->latency_); diff --git a/TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/Client_Task.h b/TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/Client_Task.h index 59fd29d7eed..48d29bdef0d 100644 --- a/TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/Client_Task.h +++ b/TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/Client_Task.h @@ -15,15 +15,15 @@ class Client_Task : public ACE_Task_Base { public: /// Constructor - Client_Task (const char *data_type, - int size, + Client_Task (const ACE_TCHAR *data_type, + int size, Test::Roundtrip_ptr roundtrip, int niterations); /// Add this thread results to the global numbers and print the /// per-thread results. void accumulate_and_dump (ACE_Basic_Stats &totals, - const char *msg, + const ACE_TCHAR *msg, ACE_UINT32 gsf); /// The service method @@ -43,7 +43,7 @@ private: private: /// The data type of the sequence load to be tested - CORBA::String_var data_type_; + const ACE_TCHAR* data_type_; /// The size of the sequence data int size_; 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 0b01cd2877b..fb0d8681beb 100644 --- a/TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/client.cpp +++ b/TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/client.cpp @@ -17,7 +17,7 @@ int niterations = 1000; int do_shutdown = 1; int sz = 512; -const char *data_type = "octet"; +const ACE_TCHAR *data_type = ACE_TEXT("octet"); int parse_args (int argc, ACE_TCHAR *argv[]) @@ -31,12 +31,12 @@ parse_args (int argc, ACE_TCHAR *argv[]) case 't': data_type = get_opts.opt_arg (); - if (ACE_OS::strcmp (data_type, "octet") != 0 && - ACE_OS::strcmp (data_type, "char") != 0 && - ACE_OS::strcmp (data_type, "long") != 0 && - ACE_OS::strcmp (data_type, "short") != 0 && - ACE_OS::strcmp (data_type, "double") != 0 && - ACE_OS::strcmp (data_type, "longlong") != 0) + if (ACE_OS::strcmp (data_type, ACE_TEXT("octet")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("char")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("long")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("short")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("double")) != 0 && + ACE_OS::strcmp (data_type, ACE_TEXT("longlong")) != 0) return -1; break; @@ -144,10 +144,10 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) 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); + task0.accumulate_and_dump (totals, ACE_TEXT("Task[0]"), gsf); + task1.accumulate_and_dump (totals, ACE_TEXT("Task[1]"), gsf); + task2.accumulate_and_dump (totals, ACE_TEXT("Task[2]"), gsf); + task3.accumulate_and_dump (totals, ACE_TEXT("Task[3]"), gsf); totals.dump_results (ACE_TEXT("Total"), gsf); -- cgit v1.2.1