Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / performance-tests / Sequence_Latency / Thread_Per_Connection / Client_Task.h
blob531173d8acdc10b987aa661b36d2bddee3bfe5ff
1 #ifndef CLIENT_TASK_H
2 #define CLIENT_TASK_H
3 #include /**/ "ace/pre.h"
5 #include "TestC.h"
6 #include "ace/Task.h"
7 #include "ace/Basic_Stats.h"
8 #include "ace/High_Res_Timer.h"
10 /// Implement the Test::Client_Task interface
11 class Client_Task : public ACE_Task_Base
13 public:
14 /// Constructor
15 Client_Task (const ACE_TCHAR *data_type,
16 int size,
17 Test::Roundtrip_ptr roundtrip,
18 int niterations);
20 /// Add this thread results to the global numbers and print the
21 /// per-thread results.
22 void accumulate_and_dump (ACE_Basic_Stats &totals,
23 const ACE_TCHAR *msg,
24 ACE_High_Res_Timer::global_scale_factor_type gsf);
26 /// The service method
27 virtual int svc ();
29 private:
30 /// Make sure that the current thread has a connection available.
31 void validate_connection ();
33 /// Some performance test methods
34 void test_octet_seq ();
35 void test_long_seq ();
36 void test_short_seq ();
37 void test_char_seq ();
38 void test_longlong_seq ();
39 void test_double_seq ();
41 private:
42 /// The data type of the sequence load to be tested
43 const ACE_TCHAR* data_type_;
45 /// The size of the sequence data
46 int size_;
48 /// The object reference used for this test
49 Test::Roundtrip_var roundtrip_;
51 /// The number of iterations
52 int niterations_;
54 /// Keep track of the latency (minimum, average, maximum and jitter)
55 ACE_Basic_Stats latency_;
58 #include /**/ "ace/post.h"
59 #endif /* CLIENT_TASK_H */