Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / performance-tests / Latency / AMI / Roundtrip_Handler.cpp
blobb09c855071e957fc9b9f57bd13bd71b9011fc624
1 #include "Roundtrip_Handler.h"
2 #include "ace/OS_NS_time.h"
4 Roundtrip_Handler::Roundtrip_Handler (int expected_callbacks)
5 : pending_callbacks_ (expected_callbacks)
9 int
10 Roundtrip_Handler::pending_callbacks () const
12 return this->pending_callbacks_;
15 void
16 Roundtrip_Handler::dump_results (
17 ACE_High_Res_Timer::global_scale_factor_type gsf)
19 this->latency_stats_.dump_results (ACE_TEXT("AMI Latency"), gsf);
22 void
23 Roundtrip_Handler::test_method (Test::Timestamp send_time)
25 --this->pending_callbacks_;
27 ACE_hrtime_t now = ACE_OS::gethrtime ();
28 this->latency_stats_.sample (now - send_time);
31 void
32 Roundtrip_Handler::test_method_excep (::Messaging::ExceptionHolder *holder)
34 try
36 --this->pending_callbacks_;
37 holder->raise_exception ();
39 catch (const CORBA::Exception& ex)
41 ex._tao_print_exception ("test_method:");
45 void
46 Roundtrip_Handler::shutdown ()
50 void
51 Roundtrip_Handler::shutdown_excep (::Messaging::ExceptionHolder *holder)
53 try
55 holder->raise_exception ();
57 catch (const CORBA::Exception& ex)
59 ex._tao_print_exception ("shutdown:");