diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2012-05-13 12:29:28 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2012-05-13 12:29:28 +0000 |
commit | c869c2cebf9f6c21ba0fc8ce9acbf3a12d4e97f5 (patch) | |
tree | d55d22f1a46f3b7813bfeff8488753b8a53217ff | |
parent | b48d3b6d549c60df6cea2eb2cce0eab94332fc44 (diff) | |
download | ATCD-c869c2cebf9f6c21ba0fc8ce9acbf3a12d4e97f5.tar.gz |
Sun May 13 12:27:03 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/High_Res_Timer.h:
Fixed typo
* ace/Basic_Stats.h:
* ace/Basic_Stats.cpp:
* ace/Throughput_Stats.h:
* ace/Throughput_Stats.cpp:
Introduced scale_factor_type traits to handle the fact that the
ACE HighResTimer scale factor is now ACE_UINT64
* ace/Timeprobe_T.cpp:
Use correct trait for the scale factor
* performance-tests/RPC/client.cpp:
* performance-tests/SCTP/SOCK_SEQPACK_clt.cpp:
* performance-tests/SCTP/SOCK_STREAM_clt.cpp:
* performance-tests/Server_Concurrency/Latency_Stats.h:
* performance-tests/TCP/tcp_test.cpp:
Use ACE_High_Res_Timer::global_scale_factor_type
-rw-r--r-- | ACE/ChangeLog | 22 | ||||
-rw-r--r-- | ACE/ace/Basic_Stats.cpp | 4 | ||||
-rw-r--r-- | ACE/ace/Basic_Stats.h | 9 | ||||
-rw-r--r-- | ACE/ace/High_Res_Timer.h | 2 | ||||
-rw-r--r-- | ACE/ace/Throughput_Stats.cpp | 4 | ||||
-rw-r--r-- | ACE/ace/Throughput_Stats.h | 4 | ||||
-rw-r--r-- | ACE/ace/Timeprobe_T.cpp | 3 | ||||
-rw-r--r-- | ACE/performance-tests/RPC/client.cpp | 3 | ||||
-rw-r--r-- | ACE/performance-tests/SCTP/SOCK_SEQPACK_clt.cpp | 3 | ||||
-rw-r--r-- | ACE/performance-tests/SCTP/SOCK_STREAM_clt.cpp | 3 | ||||
-rw-r--r-- | ACE/performance-tests/Server_Concurrency/Latency_Stats.h | 3 | ||||
-rw-r--r-- | ACE/performance-tests/TCP/tcp_test.cpp | 3 |
12 files changed, 49 insertions, 14 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index ff6afc5e163..bb51922b7c7 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,25 @@ +Sun May 13 12:27:03 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/High_Res_Timer.h: + Fixed typo + + * ace/Basic_Stats.h: + * ace/Basic_Stats.cpp: + * ace/Throughput_Stats.h: + * ace/Throughput_Stats.cpp: + Introduced scale_factor_type traits to handle the fact that the + ACE HighResTimer scale factor is now ACE_UINT64 + + * ace/Timeprobe_T.cpp: + Use correct trait for the scale factor + + * performance-tests/RPC/client.cpp: + * performance-tests/SCTP/SOCK_SEQPACK_clt.cpp: + * performance-tests/SCTP/SOCK_STREAM_clt.cpp: + * performance-tests/Server_Concurrency/Latency_Stats.h: + * performance-tests/TCP/tcp_test.cpp: + Use ACE_High_Res_Timer::global_scale_factor_type + Sat May 12 11:11:45 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> * ace/Time_Value.h: diff --git a/ACE/ace/Basic_Stats.cpp b/ACE/ace/Basic_Stats.cpp index 0122fa36469..21a1ffe5d6d 100644 --- a/ACE/ace/Basic_Stats.cpp +++ b/ACE/ace/Basic_Stats.cpp @@ -42,7 +42,9 @@ ACE_Basic_Stats::accumulate (const ACE_Basic_Stats &rhs) } void -ACE_Basic_Stats::dump_results (const ACE_TCHAR *msg, ACE_UINT32 sf) const +ACE_Basic_Stats::dump_results ( + const ACE_TCHAR *msg, + ACE_Basic_Stats::scale_factor_type sf) const { #ifndef ACE_NLOGGING if (this->samples_count () == 0u) diff --git a/ACE/ace/Basic_Stats.h b/ACE/ace/Basic_Stats.h index 11f24ca6bf8..c701ac5ad8e 100644 --- a/ACE/ace/Basic_Stats.h +++ b/ACE/ace/Basic_Stats.h @@ -9,7 +9,6 @@ */ //============================================================================= - #ifndef ACE_BASIC_STATS_H #define ACE_BASIC_STATS_H #include /**/ "ace/pre.h" @@ -32,6 +31,12 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Export ACE_Basic_Stats { public: +#if !defined (ACE_WIN32) + typedef ACE_UINT32 scale_factor_type; +#else + typedef ACE_UINT64 scale_factor_type; +#endif + /// Constructor /** * The number of samples is pre-allocated, and cannot changes once @@ -56,7 +61,7 @@ public: * presented in microseconds. */ void dump_results (const ACE_TCHAR *msg, - ACE_UINT32 scale_factor) const; + scale_factor_type scale_factor) const; /// The number of samples ACE_UINT32 samples_count_; diff --git a/ACE/ace/High_Res_Timer.h b/ACE/ace/High_Res_Timer.h index 00e91476f75..5b8688aa48b 100644 --- a/ACE/ace/High_Res_Timer.h +++ b/ACE/ace/High_Res_Timer.h @@ -52,7 +52,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * units/second. Because it's possible that the units/second * changes in the future, it's recommended to use it instead * of a "hard coded" solution. - * Dependend on the platform and used class members, there's a + * Dependent on the platform and used class members, there's a * maximum elapsed period before overflow (which is not checked). * Look at the documentation with some members functions. * On some (most?) implementations it's not recommended to measure diff --git a/ACE/ace/Throughput_Stats.cpp b/ACE/ace/Throughput_Stats.cpp index 5f9aa6f6cb7..b49afec15e4 100644 --- a/ACE/ace/Throughput_Stats.cpp +++ b/ACE/ace/Throughput_Stats.cpp @@ -49,7 +49,7 @@ ACE_Throughput_Stats::accumulate (const ACE_Throughput_Stats &rhs) void ACE_Throughput_Stats::dump_results (const ACE_TCHAR* msg, - ACE_UINT32 sf) + ACE_Basic_Stats::scale_factor_type sf) { if (this->samples_count () == 0u) { @@ -67,7 +67,7 @@ ACE_Throughput_Stats::dump_results (const ACE_TCHAR* msg, void ACE_Throughput_Stats::dump_throughput (const ACE_TCHAR *msg, - ACE_UINT32 sf, + ACE_Basic_Stats::scale_factor_type sf, ACE_UINT64 elapsed_time, ACE_UINT32 samples_count) { diff --git a/ACE/ace/Throughput_Stats.h b/ACE/ace/Throughput_Stats.h index c5dfd2da924..6776f2e2087 100644 --- a/ACE/ace/Throughput_Stats.h +++ b/ACE/ace/Throughput_Stats.h @@ -55,11 +55,11 @@ public: void accumulate (const ACE_Throughput_Stats &throughput); /// Print down the stats - void dump_results (const ACE_TCHAR* msg, ACE_UINT32 scale_factor); + void dump_results (const ACE_TCHAR* msg, scale_factor_type scale_factor); /// Dump the average throughput stats. static void dump_throughput (const ACE_TCHAR *msg, - ACE_UINT32 scale_factor, + scale_factor_type scale_factor, ACE_UINT64 elapsed_time, ACE_UINT32 samples_count); private: diff --git a/ACE/ace/Timeprobe_T.cpp b/ACE/ace/Timeprobe_T.cpp index dcb1edbb791..87372211bf1 100644 --- a/ACE/ace/Timeprobe_T.cpp +++ b/ACE/ace/Timeprobe_T.cpp @@ -250,7 +250,8 @@ ACE_Timeprobe_Ex<ACE_LOCK, ALLOCATOR>::print_times (void) "thread", "usec")); - double gsf = ACE_High_Res_Timer::global_scale_factor (); + ACE_High_Res_Timer::global_scale_factor_type gsf = + ACE_High_Res_Timer::global_scale_factor (); u_long i, j; // First element diff --git a/ACE/performance-tests/RPC/client.cpp b/ACE/performance-tests/RPC/client.cpp index 8c3fced9aed..3b5205f6505 100644 --- a/ACE/performance-tests/RPC/client.cpp +++ b/ACE/performance-tests/RPC/client.cpp @@ -65,7 +65,8 @@ int ACE_TMAIN (int argc, ACE_TCHAR* argv[]) } ACE_DEBUG ((LM_DEBUG, "Calibrating high resolution timer . . .")); - ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); + ACE_High_Res_Timer::global_scale_factor_type gsf = + ACE_High_Res_Timer::global_scale_factor (); ACE_DEBUG ((LM_DEBUG, " done\n")); throughput.dump_results ("Client", gsf); diff --git a/ACE/performance-tests/SCTP/SOCK_SEQPACK_clt.cpp b/ACE/performance-tests/SCTP/SOCK_SEQPACK_clt.cpp index fc41f2c7d3a..96c4bfde27f 100644 --- a/ACE/performance-tests/SCTP/SOCK_SEQPACK_clt.cpp +++ b/ACE/performance-tests/SCTP/SOCK_SEQPACK_clt.cpp @@ -36,7 +36,8 @@ extern "C" { // global constants ACE_CDR::UShort const primerIterations = 100; // ace/High_Res_Timer.h describes the need for the following. -ACE_UINT32 const microsec_clock_scale_factor = ACE_High_Res_Timer::global_scale_factor(); +ACE_High_Res_Timer::global_scale_factor_type const microsec_clock_scale_factor + = ACE_High_Res_Timer::global_scale_factor(); // forward declations of functions. Bodies follow main() to improve // file readability. diff --git a/ACE/performance-tests/SCTP/SOCK_STREAM_clt.cpp b/ACE/performance-tests/SCTP/SOCK_STREAM_clt.cpp index 9e560409c8f..57962b86d7c 100644 --- a/ACE/performance-tests/SCTP/SOCK_STREAM_clt.cpp +++ b/ACE/performance-tests/SCTP/SOCK_STREAM_clt.cpp @@ -37,7 +37,8 @@ extern "C" { // global constants ACE_CDR::UShort const primerIterations = 100; // ace/High_Res_Timer.h describes the need for the following. -ACE_UINT32 const microsec_clock_scale_factor = ACE_High_Res_Timer::global_scale_factor(); +ACE_High_Res_Timer::global_scale_factor_type const microsec_clock_scale_factor = + ACE_High_Res_Timer::global_scale_factor(); // forward declations of functions. Bodies follow main() to improve // file readability. diff --git a/ACE/performance-tests/Server_Concurrency/Latency_Stats.h b/ACE/performance-tests/Server_Concurrency/Latency_Stats.h index 2b0694b7ea7..f8772f770a1 100644 --- a/ACE/performance-tests/Server_Concurrency/Latency_Stats.h +++ b/ACE/performance-tests/Server_Concurrency/Latency_Stats.h @@ -68,7 +68,8 @@ Latency_Stats::dump_results (const ACE_TCHAR *test_name, ACE_hrtime_t dev = this->sum2_ / this->n_ - avg.lo()*avg.lo(); #endif - ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); + ACE_High_Res_Timer::global_scale_factor_type gsf = + ACE_High_Res_Timer::global_scale_factor (); double min_usec = ACE_CU64_TO_CU32 (this->min_) / gsf; double max_usec = ACE_CU64_TO_CU32 (this->max_) / gsf; diff --git a/ACE/performance-tests/TCP/tcp_test.cpp b/ACE/performance-tests/TCP/tcp_test.cpp index 0e5996df6a2..2a3d2a461c3 100644 --- a/ACE/performance-tests/TCP/tcp_test.cpp +++ b/ACE/performance-tests/TCP/tcp_test.cpp @@ -250,7 +250,8 @@ Client::run (void) } ACE_hrtime_t test_end = ACE_OS::gethrtime (); - ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); + ACE_High_Res_Timer::global_scale_factor_type gsf = + ACE_High_Res_Timer::global_scale_factor (); if (dump_history) { |