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
)
10 Roundtrip_Handler::pending_callbacks () const
12 return this->pending_callbacks_
;
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
);
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
);
32 Roundtrip_Handler::test_method_excep (::Messaging::ExceptionHolder
*holder
)
36 --this->pending_callbacks_
;
37 holder
->raise_exception ();
39 catch (const CORBA::Exception
& ex
)
41 ex
._tao_print_exception ("test_method:");
46 Roundtrip_Handler::shutdown ()
51 Roundtrip_Handler::shutdown_excep (::Messaging::ExceptionHolder
*holder
)
55 holder
->raise_exception ();
57 catch (const CORBA::Exception
& ex
)
59 ex
._tao_print_exception ("shutdown:");