summaryrefslogtreecommitdiff
path: root/performance-tests/Server_Concurrency
diff options
context:
space:
mode:
authorfhunleth <fhunleth@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-12-28 22:55:09 +0000
committerfhunleth <fhunleth@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-12-28 22:55:09 +0000
commitc530c67530685a09de3e1b135c5db3121d30f7d9 (patch)
tree484851a840d6c91bf33fc7895389d89e23312c04 /performance-tests/Server_Concurrency
parent18098a05eb997c303ce250ecd99c8f5e55206c12 (diff)
downloadATCD-c530c67530685a09de3e1b135c5db3121d30f7d9.tar.gz
ChangeLogTag: Thu Dec 28 16:10:59 2000 Frank Hunleth <fhunleth@cs.wustl.edu>
Diffstat (limited to 'performance-tests/Server_Concurrency')
-rw-r--r--performance-tests/Server_Concurrency/Latency_Stats.h13
-rw-r--r--performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp10
-rw-r--r--performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp10
3 files changed, 27 insertions, 6 deletions
diff --git a/performance-tests/Server_Concurrency/Latency_Stats.h b/performance-tests/Server_Concurrency/Latency_Stats.h
index 951a8ae110d..ccfba66ee66 100644
--- a/performance-tests/Server_Concurrency/Latency_Stats.h
+++ b/performance-tests/Server_Concurrency/Latency_Stats.h
@@ -35,7 +35,12 @@ inline void
Latency_Stats::sample (ACE_hrtime_t sample)
{
this->sum_ += sample;
+#ifndef ACE_LACKS_LONGLONG_T
this->sum2_ += sample * sample;
+#else
+ // possible loss of precision here due to lack of 64bit support
+ this->sum2_ += sample * sample.lo();
+#endif
if (this->n_ == 0)
{
this->min_ = sample;
@@ -50,15 +55,19 @@ Latency_Stats::sample (ACE_hrtime_t sample)
inline void
Latency_Stats::dump_results (const char *test_name,
- const char *sub_test)
+ const char *sub_test)
{
if (this->n_ < 1)
return;
ACE_hrtime_t avg = this->sum_ / this->n_;
+#ifndef ACE_LACKS_LONGLONG_T
ACE_hrtime_t dev =
this->sum2_ / this->n_ - avg*avg;
-
+#else
+ ACE_hrtime_t dev =
+ this->sum2_ / this->n_ - avg.lo()*avg.lo();
+#endif
ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
double min_usec = ACE_CU64_TO_CU32 (this->min_) / gsf;
diff --git a/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp b/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp
index 875f0bd2345..d03a62194e1 100644
--- a/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp
+++ b/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp
@@ -22,12 +22,12 @@ static ACE_hrtime_t start_of_burst;
enum DEBUGGING_RANGE
{
- NONE = 0,
+ DEBUG_NONE = 0,
DEFAULT = 1,
PRINT_INDIVIDUAL_LATENCY = 2
};
-static DEBUGGING_RANGE debug = NONE;
+static DEBUGGING_RANGE debug = DEBUG_NONE;
typedef ACE_Task<ACE_MT_SYNCH> TASK;
@@ -170,9 +170,15 @@ Leader_Follower_Task::svc (void)
if (debug >= PRINT_INDIVIDUAL_LATENCY)
{
+#ifndef ACE_LACKS_LONGLONG_T
ACE_DEBUG ((LM_DEBUG,
"(%t) latency from start of burst: %Q\n",
latency_from_start_of_burst));
+#else
+ ACE_DEBUG ((LM_DEBUG,
+ "(%t) latency from start of burst: %u\n",
+ latency_from_start_of_burst.lo()));
+#endif
}
}
}
diff --git a/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp b/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp
index 81e8f006111..27b7274826d 100644
--- a/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp
+++ b/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp
@@ -15,12 +15,12 @@ static size_t timeout_between_bursts = 1;
enum DEBUGGING_RANGE
{
- NONE = 0,
+ DEBUG_NONE = 0,
DEFAULT = 1,
PRINT_INDIVIDUAL_LATENCY = 2
};
-static DEBUGGING_RANGE debug = NONE;
+static DEBUGGING_RANGE debug = DEBUG_NONE;
static ACE_Data_Block *data_block = 0;
@@ -140,9 +140,15 @@ Worker_Task::svc (void)
if (debug >= PRINT_INDIVIDUAL_LATENCY)
{
+#ifndef ACE_LACKS_LONGLONG_T
ACE_DEBUG ((LM_DEBUG,
"(%t) latency from start of burst: %Q\n",
latency_from_start_of_burst));
+#else
+ ACE_DEBUG ((LM_DEBUG,
+ "(%t) latency from start of burst: %u\n",
+ latency_from_start_of_burst.lo()));
+#endif
}
}