summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-03-17 19:19:25 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-03-17 19:19:25 +0000
commit29595a509951d4b3952f8f1653dbd89f9f46098a (patch)
tree5f1a34611e6c76618da2b93aaa52fcd134df0e28
parent663b09993f34d4e18016107cba8f01d9952694c4 (diff)
downloadATCD-29595a509951d4b3952f8f1653dbd89f9f46098a.tar.gz
(print_stats): with ACE_LACKS_FLOATING_POINT, multiply calls/usec by 10^6 to get calls/sec, and use call_count_ instead of hard-coded 1000
-rw-r--r--TAO/tests/Cubit/TAO/IDL_Cubit/client.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/TAO/tests/Cubit/TAO/IDL_Cubit/client.cpp b/TAO/tests/Cubit/TAO/IDL_Cubit/client.cpp
index f81f54514b3..46edd8ed5d4 100644
--- a/TAO/tests/Cubit/TAO/IDL_Cubit/client.cpp
+++ b/TAO/tests/Cubit/TAO/IDL_Cubit/client.cpp
@@ -540,7 +540,8 @@ Cubit_Client::print_stats (const char *call_name,
if (this->call_count_ > 0 && this->error_count_ == 0)
{
#if defined (ACE_LACKS_FLOATING_POINT)
- const u_int calls_per_sec = 1000 / elapsed_time.real_time;
+ const u_int calls_per_sec =
+ this->call_count_ * 1000000u / elapsed_time.real_time;
ACE_DEBUG ((LM_DEBUG,
"\treal_time\t= %u usec, \n\t"
@@ -548,7 +549,7 @@ Cubit_Client::print_stats (const char *call_name,
elapsed_time.real_time < 0 ? 0 : elapsed_time.real_time,
calls_per_sec));
#else /* ! ACE_LACKS_FLOATING_POINT */
- double tmp = 1000 / elapsed_time.real_time;
+ double tmp = this->call_count_ / elapsed_time.real_time;
elapsed_time.real_time *= ACE_ONE_SECOND_IN_MSECS;
elapsed_time.user_time *= ACE_ONE_SECOND_IN_MSECS;