summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-02-21 15:07:12 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-02-21 15:07:12 +0000
commit03e7a659d31405e821e0a45f1dc52c31942809f1 (patch)
treebc99c2f6396dc8342461b87b188be7a06b3d47a0 /TAO/orbsvcs/tests
parent981479e2a1f645ec385eb8111138067899288f7a (diff)
downloadATCD-03e7a659d31405e821e0a45f1dc52c31942809f1.tar.gz
(dump_results): fixed 64-to-32 bit conversions so that they operate on the 64-bit quantity directly, instead of a quotient. And, divide by a float instead of an int, to use floating point division.
Diffstat (limited to 'TAO/orbsvcs/tests')
-rw-r--r--TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.cpp
index 56d9044432d..8f4b7103195 100644
--- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.cpp
+++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.cpp
@@ -35,13 +35,12 @@ ECT_Driver::Latency_Stats::dump_results (const char *description,
this->sum2_ / (this->n_ - 1)
- (this->sum_ / this->n_) * (this->sum_ / (this->n_ - 1));
- double min_usec = ACE_CU64_TO_CU32 (this->min_ / 1000);
- double max_usec = ACE_CU64_TO_CU32 (this->max_ / 1000);
- double avg_usec = ACE_CU64_TO_CU32 (avg / 1000);
- double dev_usec = ACE_CU64_TO_CU32 (dev / 1000);
+ double min_usec = ACE_CU64_TO_CU32 (this->min_) / 1000.0;
+ double max_usec = ACE_CU64_TO_CU32 (this->max_) / 1000.0;
+ double avg_usec = ACE_CU64_TO_CU32 (avg) / 1000.0;
+ double dev_usec = ACE_CU64_TO_CU32 (dev) / 1000.0;
ACE_DEBUG ((LM_DEBUG,
"%s (%s): %.2f/%.2f/%.2f/%.2f (min/avg/max/dev2) [usecs]\n",
description, desc2,
min_usec, avg_usec, max_usec, dev_usec));
}
-