Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / performance-tests / Sequence_Latency / AMI / Roundtrip_Handler.cpp
blob764786b08e372afb83e4342f3265454c7f8283c4
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 // = The skeleton methods for test octet load
24 void
25 Roundtrip_Handler::test_octet_method (Test::Timestamp send_time)
27 --this->pending_callbacks_;
29 ACE_hrtime_t now = ACE_OS::gethrtime ();
30 this->latency_stats_.sample (now - send_time);
33 void
34 Roundtrip_Handler::test_octet_method_excep (::Messaging::ExceptionHolder *holder)
36 try
38 --this->pending_callbacks_;
39 holder->raise_exception ();
41 catch (const CORBA::Exception& ex)
43 ex._tao_print_exception ("test_octet_method:");
47 // = The skeleton methods for test char load
49 void
50 Roundtrip_Handler::test_char_method (Test::Timestamp send_time)
52 --this->pending_callbacks_;
54 ACE_hrtime_t now = ACE_OS::gethrtime ();
55 this->latency_stats_.sample (now - send_time);
58 void
59 Roundtrip_Handler::test_char_method_excep (::Messaging::ExceptionHolder *holder)
61 try
63 --this->pending_callbacks_;
64 holder->raise_exception ();
66 catch (const CORBA::Exception& ex)
68 ex._tao_print_exception ("test_char_method:");
72 // = The skeleton methods for test long load
74 void
75 Roundtrip_Handler::test_long_method (Test::Timestamp send_time)
77 --this->pending_callbacks_;
79 ACE_hrtime_t now = ACE_OS::gethrtime ();
80 this->latency_stats_.sample (now - send_time);
83 void
84 Roundtrip_Handler::test_long_method_excep (::Messaging::ExceptionHolder *holder)
86 try
88 --this->pending_callbacks_;
89 holder->raise_exception ();
91 catch (const CORBA::Exception& ex)
93 ex._tao_print_exception ("test_long_method:");
97 // = The skeleton methods for test short load
99 void
100 Roundtrip_Handler::test_short_method (Test::Timestamp send_time)
102 --this->pending_callbacks_;
104 ACE_hrtime_t now = ACE_OS::gethrtime ();
105 this->latency_stats_.sample (now - send_time);
108 void
109 Roundtrip_Handler::test_short_method_excep (::Messaging::ExceptionHolder *holder)
113 --this->pending_callbacks_;
114 holder->raise_exception ();
116 catch (const CORBA::Exception& ex)
118 ex._tao_print_exception ("test_short_method:");
122 // = The skeleton methods for test double load
124 void
125 Roundtrip_Handler::test_double_method (Test::Timestamp send_time)
127 --this->pending_callbacks_;
129 ACE_hrtime_t now = ACE_OS::gethrtime ();
130 this->latency_stats_.sample (now - send_time);
133 void
134 Roundtrip_Handler::test_double_method_excep (::Messaging::ExceptionHolder *holder)
138 --this->pending_callbacks_;
139 holder->raise_exception ();
141 catch (const CORBA::Exception& ex)
143 ex._tao_print_exception ("test_double_method:");
147 // = The skeleton methods for test longlong load
149 void
150 Roundtrip_Handler::test_longlong_method (Test::Timestamp send_time)
152 --this->pending_callbacks_;
154 ACE_hrtime_t now = ACE_OS::gethrtime ();
155 this->latency_stats_.sample (now - send_time);
158 void
159 Roundtrip_Handler::test_longlong_method_excep (::Messaging::ExceptionHolder *holder)
163 --this->pending_callbacks_;
164 holder->raise_exception ();
166 catch (const CORBA::Exception& ex)
168 ex._tao_print_exception ("test_longlong_method:");
173 // = Other methods
175 void
176 Roundtrip_Handler::shutdown ()
180 void
181 Roundtrip_Handler::shutdown_excep (::Messaging::ExceptionHolder *holder)
185 holder->raise_exception ();
187 catch (const CORBA::Exception& ex)
189 ex._tao_print_exception ("shutdown:");