diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-09-16 21:19:02 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-09-16 21:19:02 +0000 |
commit | 40fdc8a404e75ab03b68cc62e9987cf208fd8c30 (patch) | |
tree | 37d9c4d3abe4aefd8a34ed797883dd2cd4862ca7 /TAO/performance-tests/Thread_Per_Connection_Latency/Client_Task.cpp | |
parent | c254b281f1b9a4ca19dd0c3ee73a0654a7718909 (diff) | |
download | ATCD-typecode-overhaul.tar.gz |
This commit was manufactured by cvs2svn to create branchtypecode-overhaul
'typecode-overhaul'.
Diffstat (limited to 'TAO/performance-tests/Thread_Per_Connection_Latency/Client_Task.cpp')
-rw-r--r-- | TAO/performance-tests/Thread_Per_Connection_Latency/Client_Task.cpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/TAO/performance-tests/Thread_Per_Connection_Latency/Client_Task.cpp b/TAO/performance-tests/Thread_Per_Connection_Latency/Client_Task.cpp deleted file mode 100644 index 09d15331436..00000000000 --- a/TAO/performance-tests/Thread_Per_Connection_Latency/Client_Task.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// -// $Id$ -// -#include "Client_Task.h" - -ACE_RCSID(Thread_Per_Connection_Latency, Client_Task, "$Id$") - -Client_Task::Client_Task (Test::Roundtrip_ptr roundtrip, - int niterations) - : roundtrip_ (Test::Roundtrip::_duplicate (roundtrip)) - , niterations_ (niterations) -{ -} - -int -Client_Task::svc (void) -{ - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - this->validate_connection (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - for (int i = 0; i != this->niterations_; ++i) - { - CORBA::ULongLong start = ACE_OS::gethrtime (); - - (void) this->roundtrip_->test_method (start ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_hrtime_t now = ACE_OS::gethrtime (); - this->latency_.sample (now - start); - } - } - ACE_CATCHANY - { - return 0; - } - ACE_ENDTRY; - return 0; -} - -void -Client_Task::accumulate_and_dump (ACE_Basic_Stats &totals, - const char *msg, - ACE_UINT32 gsf) -{ - totals.accumulate (this->latency_); - this->latency_.dump_results (msg, gsf); -} - -void -Client_Task::validate_connection (ACE_ENV_SINGLE_ARG_DECL) -{ - CORBA::ULongLong dummy = 0; - for (int i = 0; i != 100; ++i) - { - ACE_TRY - { - (void) this->roundtrip_->test_method (dummy ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY {} ACE_ENDTRY; - } -} |