diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Event/Basic')
-rw-r--r-- | TAO/orbsvcs/tests/Event/Basic/Reconnect.cpp | 24 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Event/Basic/Reconnect.h | 4 |
2 files changed, 18 insertions, 10 deletions
diff --git a/TAO/orbsvcs/tests/Event/Basic/Reconnect.cpp b/TAO/orbsvcs/tests/Event/Basic/Reconnect.cpp index 2f9c403cd6a..bb629b804e8 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Reconnect.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Reconnect.cpp @@ -5,6 +5,7 @@ #include "Supplier.h" #include "orbsvcs/Event/EC_Event_Channel.h" #include "ace/Get_Opt.h" +#include "ace/High_Res_Timer.h" ACE_RCSID(EC_Tests_Basic, Reconnect, "$Id$") @@ -90,12 +91,11 @@ void EC_Reconnect::execute_test (CORBA::Environment& ACE_TRY_ENV) { this->execute_consumer_test (ACE_TRY_ENV); - this->execute_supplier_test (ACE_TRY_ENV); - this->consumer_reconnect_.dump_results ("Reconnect", "consumer"); - - this->supplier_reconnect_.dump_results ("Reconnect", "supplier"); + ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); + this->consumer_reconnect_.dump_results ("Reconnect/consumer", gsf); + this->supplier_reconnect_.dump_results ("Reconnect/supplier", gsf); // this->EC_Driver::execute_test (ACE_TRY_ENV); } @@ -115,6 +115,7 @@ EC_Reconnect::execute_consumer_test (CORBA::Environment& ACE_TRY_ENV) if (this->allow_consumer_reconnect_) { + ACE_hrtime_t start_time = ACE_OS::gethrtime (); for (int i = 0; i < this->disconnections_; ++i) { ACE_hrtime_t start = ACE_OS::gethrtime (); @@ -123,7 +124,8 @@ EC_Reconnect::execute_consumer_test (CORBA::Environment& ACE_TRY_ENV) ACE_TRY_ENV); ACE_CHECK; ACE_hrtime_t stop = ACE_OS::gethrtime (); - this->consumer_reconnect_.sample (stop - start); + this->consumer_reconnect_.sample (stop - start_time, + stop - start); } } else @@ -152,6 +154,7 @@ EC_Reconnect::execute_consumer_test (CORBA::Environment& ACE_TRY_ENV) this->event_channel_->for_consumers (ACE_TRY_ENV); ACE_CHECK; + ACE_hrtime_t start_time = ACE_OS::gethrtime (); for (int i = 0; i < this->disconnections_; ++i) { ACE_hrtime_t start = ACE_OS::gethrtime (); @@ -163,7 +166,8 @@ EC_Reconnect::execute_consumer_test (CORBA::Environment& ACE_TRY_ENV) ACE_TRY_ENV); ACE_CHECK; ACE_hrtime_t stop = ACE_OS::gethrtime (); - this->consumer_reconnect_.sample (stop - start); + this->consumer_reconnect_.sample (stop - start_time, + stop - start); } } } @@ -178,6 +182,7 @@ EC_Reconnect::execute_supplier_test (CORBA::Environment& ACE_TRY_ENV) if (this->allow_supplier_reconnect_) { + ACE_hrtime_t start_time = ACE_OS::gethrtime (); for (int i = 0; i < this->disconnections_; ++i) { ACE_hrtime_t start = ACE_OS::gethrtime (); @@ -185,7 +190,8 @@ EC_Reconnect::execute_supplier_test (CORBA::Environment& ACE_TRY_ENV) ACE_TRY_ENV); ACE_CHECK; ACE_hrtime_t stop = ACE_OS::gethrtime (); - this->supplier_reconnect_.sample (stop - start); + this->supplier_reconnect_.sample (stop - start_time, + stop - start); } } else @@ -213,6 +219,7 @@ EC_Reconnect::execute_supplier_test (CORBA::Environment& ACE_TRY_ENV) this->event_channel_->for_suppliers (ACE_TRY_ENV); ACE_CHECK; + ACE_hrtime_t start_time = ACE_OS::gethrtime (); for (int i = 0; i < this->disconnections_; ++i) { ACE_hrtime_t start = ACE_OS::gethrtime (); @@ -224,7 +231,8 @@ EC_Reconnect::execute_supplier_test (CORBA::Environment& ACE_TRY_ENV) ACE_TRY_ENV); ACE_CHECK; ACE_hrtime_t stop = ACE_OS::gethrtime (); - this->supplier_reconnect_.sample (stop - start); + this->supplier_reconnect_.sample (stop - start_time, + stop - start); } } } diff --git a/TAO/orbsvcs/tests/Event/Basic/Reconnect.h b/TAO/orbsvcs/tests/Event/Basic/Reconnect.h index 9e98eee77df..66cfbdca3a6 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Reconnect.h +++ b/TAO/orbsvcs/tests/Event/Basic/Reconnect.h @@ -72,8 +72,8 @@ private: int disconnections_; // The number of disconnections - EC_Driver::Latency_Stats consumer_reconnect_; - EC_Driver::Latency_Stats supplier_reconnect_; + ACE_Throughput_Stats consumer_reconnect_; + ACE_Throughput_Stats supplier_reconnect_; }; #endif /* EC_RECONNECT_H */ |