Use a variable on the stack to not have a temporary in the call
[ACE_TAO.git] / TAO / performance-tests / Latency / Thread_Per_Connection / Client_Task.h
blob5ffe18e12acfa6acfbdc2424f4b3de748b02d3c5
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 (Test::Roundtrip_ptr roundtrip,
16 int niterations);
18 /// Add this thread results to the global numbers and print the
19 /// per-thread results.
20 void accumulate_and_dump (ACE_Basic_Stats &totals,
21 const ACE_TCHAR *msg,
22 ACE_High_Res_Timer::global_scale_factor_type gsf);
24 /// The service method
25 virtual int svc ();
27 private:
28 /// Make sure that the current thread has a connection available.
29 void validate_connection ();
31 private:
32 /// The object reference used for this test
33 Test::Roundtrip_var roundtrip_;
35 /// The number of iterations
36 int niterations_;
38 /// Keep track of the latency (minimum, average, maximum and jitter)
39 ACE_Basic_Stats latency_;
42 #include /**/ "ace/post.h"
43 #endif /* CLIENT_TASK_H */