diff options
Diffstat (limited to 'TAO/performance-tests/Latency/client.cpp')
-rw-r--r-- | TAO/performance-tests/Latency/client.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/TAO/performance-tests/Latency/client.cpp b/TAO/performance-tests/Latency/client.cpp index f4cae9a5c3d..8acd6e47ce2 100644 --- a/TAO/performance-tests/Latency/client.cpp +++ b/TAO/performance-tests/Latency/client.cpp @@ -12,15 +12,12 @@ ACE_RCSID(Latency, client, "$Id$") const char *ior = "file://test.ior"; int nthreads = 5; int niterations = 5; - -int sleep_flag = 0; - -ACE_Time_Value sleep_time (0, 10000); +int period = -1; int parse_args (int argc, char *argv[]) { - ACE_Get_Opt get_opts (argc, argv, "k:n:i:s"); + ACE_Get_Opt get_opts (argc, argv, "k:n:i:p:"); int c; while ((c = get_opts ()) != -1) @@ -35,8 +32,8 @@ parse_args (int argc, char *argv[]) case 'i': niterations = ACE_OS::atoi (get_opts.optarg); break; - case 's': - sleep_flag = 1; + case 'p': + period = ACE_OS::atoi (get_opts.optarg); break; case '?': default: @@ -227,13 +224,13 @@ Client::svc (void) ACE_TRY_CHECK; - // Sleep for 10 msecs. - if (sleep_flag) - ACE_OS::sleep (sleep_time); - - if (TAO_debug_level > 0 && i % 100 == 0) ACE_DEBUG ((LM_DEBUG, "(%P|%t) iteration = %d\n", i)); + if (period != -1) + { + ACE_Time_Value tv (0, period * 1000); + ACE_OS::sleep (tv); + } } } ACE_CATCHANY |