Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / performance-tests / POA / Demux / demux_test_client.h
blob17ec654b5dfdfe2657b57ac93b4e0c7968a95d00
1 #ifndef TAO_DEMUX_TEST_CLIENT_H
2 #define TAO_DEMUX_TEST_CLIENT_H
4 //=============================================================================
5 /**
6 * @file demux_test_client.h
8 * Definition of the client-side demux_test class
10 * @author Aniruddha Gokhale
12 //=============================================================================
15 // FUZZ: disable check_for_math_include
17 #include "ace/Get_Opt.h"
18 #include "ace/Vector_T.h"
19 #include "demux_testC.h"
20 #include "demux_test_macros.h"
21 #include "tao/Intrusive_Ref_Count_Handle_T.h"
23 class Demux_Test_Client
25 public:
26 // Request invocation strategies
27 enum INVOKE_STRATEGY
29 LINEAR,
30 RANDOM,
31 BEST,
32 WORST
35 typedef void (*OP_PTR) (Demux_Test_ptr);
37 struct Operation_DB_Entry
39 OP_PTR op_;
42 /// CTOR
43 Demux_Test_Client ();
45 /// DTOR
46 ~Demux_Test_Client ();
48 /// initialize the client test bed
49 int init (int argc, ACE_TCHAR *argv []);
51 /// run the tests
52 int run ();
54 private:
55 /// parse command line arguments
56 int parse_args ();
58 /// initialize the operation database
59 int init_operation_db ();
61 /// run linear strategy
62 int run_linear_test ();
64 /// run random strategy
65 int run_random_test ();
67 /// run best strategy (w.r.t to linear)
68 int run_best_test ();
70 /// run worst strategy (w.r.t to linear)
71 int run_worst_test ();
73 /// print results
74 int print_results ();
76 /// number of command line arguments
77 int argc_;
79 /// the actual command line arguments
80 ACE_TCHAR **argv_;
82 /// The underlying ORB
83 CORBA::ORB_var orb_;
85 /// invocation strategy (default linear)
86 INVOKE_STRATEGY is_;
88 /// number of POAs
89 CORBA::ULong num_POAs_;
91 /// number of objects
92 CORBA::ULong num_objs_;
94 /// number of operations
95 CORBA::ULong num_ops_;
97 /// object references to the Demux_Test objects
98 typedef TAO_Intrusive_Ref_Count_Handle<Demux_Test> Demux_Test_Var;
99 typedef ACE_Vector<Demux_Test_Var> Demux_Test_Container;
100 Demux_Test_Container demux_test_;
102 /// number of times to invoke the request
103 CORBA::ULong loop_count_;
105 /// IOR database
106 FILE *ior_fp_;
108 /// temporary results file
109 FILE *result_fp_;
112 * Step for the no. of objects to be skipped while making remote calls
113 * on the given no. of objects.
114 * If the step is 100, a call will be made to every 100th Object.
116 CORBA::ULong step_;
118 /// database of operations
119 Operation_DB_Entry op_db_[TAO_DEMUX_TEST_MAX_OPS];
123 #endif /* TAO_DEMUX_TEST_CLIENT_H */