diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2008-10-08 19:16:22 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2008-10-08 19:16:22 +0000 |
commit | 8561216c1ef7af9e2887df2cb858968fef0c0606 (patch) | |
tree | 53d3adef10c2ccae0b5a27c8f7d8e8505a8af742 /TAO/performance-tests | |
parent | ac4c9e968f44bcd313ee2f07d950f6090ab1b008 (diff) | |
download | ATCD-8561216c1ef7af9e2887df2cb858968fef0c0606.tar.gz |
Wed Oct 8 19:14:45 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/performance-tests')
15 files changed, 37 insertions, 40 deletions
diff --git a/TAO/performance-tests/CSD_Strategy/TestApps/ClientApp.cpp b/TAO/performance-tests/CSD_Strategy/TestApps/ClientApp.cpp index d1691414dda..a6d283a04fd 100644 --- a/TAO/performance-tests/CSD_Strategy/TestApps/ClientApp.cpp +++ b/TAO/performance-tests/CSD_Strategy/TestApps/ClientApp.cpp @@ -8,7 +8,7 @@ ClientApp::ClientApp() : TestAppBase("CSD_PT_ClientApp"), - ior_("Not Set"), + ior_(ACE_TEXT("Not Set")), client_id_(0), num_loops_(1) { @@ -39,7 +39,7 @@ ClientApp::run_i(int argc, ACE_TCHAR* argv[]) int -ClientApp::init(int argc, char* argv[]) +ClientApp::init(int argc, ACE_TCHAR* argv[]) { this->orb_ = CORBA::ORB_init(argc, argv); @@ -146,7 +146,7 @@ ClientApp::usage_statement() int ClientApp::arg_dependency_checks() { - if (this->ior_ == "Not Set") + if (this->ior_ == ACE_TEXT("Not Set")) { ACE_ERROR((LM_ERROR, "Error: Missing required command-line option (-i <ior>).\n")); @@ -169,7 +169,7 @@ ClientApp::arg_dependency_checks() int ClientApp::set_arg(unsigned& value, - const char* arg, + const ACE_TCHAR* arg, char opt, const char* name, int min) diff --git a/TAO/performance-tests/CSD_Strategy/TestApps/ClientApp.h b/TAO/performance-tests/CSD_Strategy/TestApps/ClientApp.h index 813f370e1cf..5b34cd82090 100644 --- a/TAO/performance-tests/CSD_Strategy/TestApps/ClientApp.h +++ b/TAO/performance-tests/CSD_Strategy/TestApps/ClientApp.h @@ -34,7 +34,7 @@ class ClientApp : public TestAppBase private: // These are all called, in order, by the run_i() method. - int init(int argc, char* argv[]); + int init(int argc, ACE_TCHAR* argv[]); void client_setup(void); int run_engine(void); void cleanup(); @@ -43,7 +43,7 @@ class ClientApp : public TestAppBase int parse_args(int argc, ACE_TCHAR* argv[]); int set_arg(unsigned& value, - const char* arg, + const ACE_TCHAR* arg, char opt, const char* name, int min = 0); @@ -53,8 +53,8 @@ class ClientApp : public TestAppBase CORBA::ORB_var orb_; - ACE_CString exe_name_; - ACE_CString ior_; + ACE_TString exe_name_; + ACE_TString ior_; ClientEngine_Handle engine_; unsigned client_id_; unsigned num_loops_; diff --git a/TAO/performance-tests/CSD_Strategy/TestApps/ServerApp.cpp b/TAO/performance-tests/CSD_Strategy/TestApps/ServerApp.cpp index aa65f18614a..def6132f088 100644 --- a/TAO/performance-tests/CSD_Strategy/TestApps/ServerApp.cpp +++ b/TAO/performance-tests/CSD_Strategy/TestApps/ServerApp.cpp @@ -16,7 +16,7 @@ ServerApp::ServerApp() : TestAppBase("CSD_PT_ServerApp"), - ior_filename_prefix_("foo"), + ior_filename_prefix_(ACE_TEXT("foo")), num_servants_(1), num_csd_threads_(1), num_orb_threads_(1), @@ -85,7 +85,7 @@ ServerApp::run_i(int argc, ACE_TCHAR* argv[]) int -ServerApp::init(int argc, char* argv[]) +ServerApp::init(int argc, ACE_TCHAR* argv[]) { this->orb_ = CORBA::ORB_init(argc, argv); @@ -276,7 +276,7 @@ ServerApp::parse_args(int argc, ACE_TCHAR* argv[]) break; case 'x': - this->scenario_id_ = get_opts.opt_arg(); + this->scenario_id_ = ACE_TEXT_ALWAYS_CHAR(get_opts.opt_arg()); break; case 'z': @@ -336,7 +336,7 @@ ServerApp::arg_dependency_checks() int ServerApp::set_arg(unsigned& value, - const char* arg, + const ACE_TCHAR* arg, char opt, const char* name, int min) diff --git a/TAO/performance-tests/CSD_Strategy/TestApps/ServerApp.h b/TAO/performance-tests/CSD_Strategy/TestApps/ServerApp.h index 5b017ffd27d..9aa13150f4e 100644 --- a/TAO/performance-tests/CSD_Strategy/TestApps/ServerApp.h +++ b/TAO/performance-tests/CSD_Strategy/TestApps/ServerApp.h @@ -37,7 +37,7 @@ class ServerApp : public TestAppBase private: // These are all called, in order, by the run_i() method. - int init(int argc, char* argv[]); + int init(int argc, ACE_TCHAR* argv[]); void poa_setup(void); void csd_setup(void); void servant_setup(void); @@ -53,7 +53,7 @@ class ServerApp : public TestAppBase int parse_args(int argc, ACE_TCHAR* argv[]); int set_arg(unsigned& value, - const char* arg, + const ACE_TCHAR* arg, char opt, const char* name, int min = 0); @@ -75,8 +75,8 @@ class ServerApp : public TestAppBase ClientTask collocated_client_task_; - ACE_CString exe_name_; - ACE_CString ior_filename_prefix_; + ACE_TString exe_name_; + ACE_TString ior_filename_prefix_; unsigned num_servants_; unsigned num_csd_threads_; unsigned num_orb_threads_; diff --git a/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.cpp b/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.cpp index 485aea870d1..0963cfd77dd 100644 --- a/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.cpp +++ b/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.cpp @@ -4,7 +4,7 @@ void AppHelper::ref_to_file(CORBA::ORB_ptr orb, CORBA::Object_ptr obj, - const char* filename) + const ACE_TCHAR* filename) { CORBA::String_var ior = orb->object_to_string(obj); diff --git a/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.h b/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.h index 83787764d43..88aa3b38408 100644 --- a/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.h +++ b/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.h @@ -17,7 +17,7 @@ struct RefHelper typedef typename T::_var_type T_var; static T_ptr string_to_ref(CORBA::ORB_ptr orb, - const char* ior) + const ACE_TCHAR* ior) { CORBA::Object_var obj = orb->string_to_object(ior); @@ -75,7 +75,7 @@ struct CSD_PT_TestInf_Export AppHelper static void ref_to_file(CORBA::ORB_ptr orb, CORBA::Object_ptr obj, - const char* filename); + const ACE_TCHAR* filename); static PortableServer::POA_ptr create_poa (const char* name, diff --git a/TAO/performance-tests/CSD_Strategy/TestInf/ServantList_T.cpp b/TAO/performance-tests/CSD_Strategy/TestInf/ServantList_T.cpp index ac2dcfbc28c..dc4a387472e 100644 --- a/TAO/performance-tests/CSD_Strategy/TestInf/ServantList_T.cpp +++ b/TAO/performance-tests/CSD_Strategy/TestInf/ServantList_T.cpp @@ -21,13 +21,13 @@ void ServantList<T>::create_and_activate(unsigned num_servants, CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, - const char* ior_fname_prefix) + const ACE_TCHAR* ior_fname_prefix) { for (unsigned i = 0; i < num_servants; i++) { - char buf[32]; - ACE_OS::sprintf(buf, "%02d", i + 1); - ACE_CString filename = ACE_CString(ior_fname_prefix) + "_" + buf + ".ior"; + ACE_TCHAR buf[32]; + ACE_OS::sprintf(buf, ACE_TEXT("%02d"), i + 1); + ACE_TString filename = ACE_TString(ior_fname_prefix) + ACE_TEXT("_") + buf + ACE_TEXT(".ior"); ServantRecord record; record.servant_ = new T(); record.safe_servant_ = record.servant_; diff --git a/TAO/performance-tests/CSD_Strategy/TestInf/ServantList_T.h b/TAO/performance-tests/CSD_Strategy/TestInf/ServantList_T.h index 482fa820ab3..72d643b74be 100644 --- a/TAO/performance-tests/CSD_Strategy/TestInf/ServantList_T.h +++ b/TAO/performance-tests/CSD_Strategy/TestInf/ServantList_T.h @@ -24,7 +24,7 @@ class ServantList void create_and_activate(unsigned num_servants, CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, - const char* ior_fname_prefix); + const ACE_TCHAR* ior_fname_prefix); /// Activate servant and not output ior to a file. void create_and_activate(unsigned num_servants, diff --git a/TAO/performance-tests/Cubit/TAO/DII_Cubit/client.cpp b/TAO/performance-tests/Cubit/TAO/DII_Cubit/client.cpp index 79830e64f1d..ccfce40d702 100644 --- a/TAO/performance-tests/Cubit/TAO/DII_Cubit/client.cpp +++ b/TAO/performance-tests/Cubit/TAO/DII_Cubit/client.cpp @@ -74,7 +74,7 @@ private: int parse_args (void); // Parses the arguments passed on the command line. - int read_ior (char *filename); + int read_ior (ACE_TCHAR *filename); // Function to read the cubit factory IOR from a file. void print_stats (const char *call_name, @@ -266,7 +266,7 @@ DII_Cubit_Client::parse_args (void) this->loop_count_ = ACE_OS::atoi (opts.opt_arg ()); break; case 'i': // Get the IOR from the command line. - this->factory_IOR_ = opts.opt_arg (); + this->factory_IOR_ = ACE_TEXT_ALWAYS_CHAR(opts.opt_arg ()); break; case 'f': // Read the IOR from the file. result = this->read_ior (opts.opt_arg ()); @@ -297,7 +297,7 @@ DII_Cubit_Client::parse_args (void) // Get the factory IOR from the file created by the server. int -DII_Cubit_Client::read_ior (char *filename) +DII_Cubit_Client::read_ior (ACE_TCHAR *filename) { // Open the file for reading. this->f_handle_ = ACE_OS::open (filename,0); diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp index 1cb656f658e..5b66dccf4a1 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp @@ -180,7 +180,7 @@ Cubit_Client::func (u_int i) // Reads the Cubit factory ior from a file int -Cubit_Client::read_ior (const char *filename) +Cubit_Client::read_ior (const ACE_TCHAR *filename) { // Open the file for reading. this->f_handle_ = ACE_OS::open (filename,0); @@ -204,7 +204,7 @@ Cubit_Client::read_ior (const char *filename) -1); } - this->cubit_factory_key_ = ACE_OS::strdup (data); + this->cubit_factory_key_ = ACE_OS::strdup (ACE_TEXT_CHAR_TO_TCHAR(data)); ior_buffer.alloc ()->free (data); @@ -250,14 +250,14 @@ Cubit_Client::parse_args (void) break; case 'v': // For backward compatibility - test_mask = this->opt_to_mask ("void"); + test_mask = this->opt_to_mask (ACE_TEXT("void")); if (test_mask == 0) return -1; this->enable_test (test_mask); break; case 'o': // For backward compatibility - test_mask = this->opt_to_mask ("one_way"); + test_mask = this->opt_to_mask (ACE_TEXT("one_way")); if (test_mask == 0) return -1; this->enable_test (test_mask); diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h index 3a1f8296c5e..0c969d01ac9 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h @@ -60,7 +60,7 @@ private: // Simple function that returns the substraction of 117 from the // parameter. - int read_ior (const char *filename); + int read_ior (const ACE_TCHAR *filename); // Function to read the cubit factory ior from a file. int parse_args (void); @@ -130,7 +130,7 @@ private: ACE_TCHAR **argv_; // arguments from command line. - char *cubit_factory_key_; + ACE_TCHAR *cubit_factory_key_; // Key of factory obj ref. u_int loop_count_; diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/client.cpp b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/client.cpp index 97fb1bdaf21..c97412958cf 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/client.cpp +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/client.cpp @@ -45,7 +45,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) if (cubit_client.init (argc, argv) == -1) return 1; - int retval = cubit_client.run (); + int const retval = cubit_client.run (); ACE_TIMEPROBE_PRINT; diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/server.cpp b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/server.cpp index eb062dfc394..caafb40c1cb 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/server.cpp +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/server.cpp @@ -19,7 +19,6 @@ #include "tao/Strategies/advanced_resource.h" - ACE_RCSID(IDL_Cubit, server, "$Id$") // This runs the server test. @@ -53,9 +52,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) "\n\tIDL_Cubit: server\n\n")); try { - int ret = cubit_server.init (argc, argv); - - if (ret == -1) + if (cubit_server.init (argc, argv)== -1) return -1; cubit_server.run (); diff --git a/TAO/performance-tests/Pluggable/PP_Test_Client.cpp b/TAO/performance-tests/Pluggable/PP_Test_Client.cpp index 290f966274d..f377ac1948b 100644 --- a/TAO/performance-tests/Pluggable/PP_Test_Client.cpp +++ b/TAO/performance-tests/Pluggable/PP_Test_Client.cpp @@ -73,7 +73,7 @@ PP_Test_Client::PP_Test_Client (int shutdown) // Reads the Cubit factory ior from a file int -PP_Test_Client::read_ior (char *filename) +PP_Test_Client::read_ior (ACE_TCHAR *filename) { // Open the file for reading. this->f_handle_ = ACE_OS::open (filename,0); diff --git a/TAO/performance-tests/Pluggable/PP_Test_Client.h b/TAO/performance-tests/Pluggable/PP_Test_Client.h index 16ed70f56e2..568f61a3e07 100644 --- a/TAO/performance-tests/Pluggable/PP_Test_Client.h +++ b/TAO/performance-tests/Pluggable/PP_Test_Client.h @@ -55,7 +55,7 @@ public: // <collocation_test_ior> is used to pass in the ior file name. private: - int read_ior (char *filename); + int read_ior (ACE_TCHAR *filename); // Function to read the cubit factory ior from a file. int parse_args (void); |