diff options
Diffstat (limited to 'TAO/performance-tests/Latency/server.cpp')
-rw-r--r-- | TAO/performance-tests/Latency/server.cpp | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/TAO/performance-tests/Latency/server.cpp b/TAO/performance-tests/Latency/server.cpp index 721930c7a9e..1275c0212fa 100644 --- a/TAO/performance-tests/Latency/server.cpp +++ b/TAO/performance-tests/Latency/server.cpp @@ -21,22 +21,22 @@ parse_args (int argc, char *argv[]) switch (c) { case 'o': - ior_output_file = get_opts.optarg; - break; + ior_output_file = get_opts.optarg; + break; case 'n': - nthreads = ACE_OS::atoi (get_opts.optarg); - break; + nthreads = ACE_OS::atoi (get_opts.optarg); + break; case 'w': - workload = ACE_OS::atoi (get_opts.optarg); - break; + workload = ACE_OS::atoi (get_opts.optarg); + break; case '?': default: ACE_ERROR_RETURN ((LM_ERROR, "usage: %s " - "-o <iorfile>" + "-o <iorfile>" "\n", argv [0]), -1); @@ -71,10 +71,14 @@ main (int argc, char *argv[]) int priority = (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO) + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2; + priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO, - priority); - // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. + priority); + + priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO, + priority); + // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, priority, ACE_SCOPE_PROCESS)) != 0) @@ -121,23 +125,23 @@ main (int argc, char *argv[]) ACE_TRY_CHECK; CORBA::String_var ior = - orb->object_to_string (server.in (), ACE_TRY_ENV); + orb->object_to_string (server.in (), ACE_TRY_ENV); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ())); // If the ior_output_file exists, output the ior to it if (ior_output_file != 0) - { - FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); - if (output_file == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for writing IOR: %s", - ior_output_file), - 1); - ACE_OS::fprintf (output_file, "%s", ior.in ()); - ACE_OS::fclose (output_file); - } + { + FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); + if (output_file == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Cannot open output file for writing IOR: %s", + ior_output_file), + 1); + ACE_OS::fprintf (output_file, "%s", ior.in ()); + ACE_OS::fclose (output_file); + } poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; |