3 * @file Periodic_Supplier.h
5 * @author Pradeep Gore <pradeep@oomworks.com>
8 #ifndef TAO_Notify_Tests_PERIODIC_SUPPLIER_H
9 #define TAO_Notify_Tests_PERIODIC_SUPPLIER_H
10 #include /**/ "ace/pre.h"
12 #include "notify_test_export.h"
14 #if !defined (ACE_LACKS_PRAGMA_ONCE)
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 #include "Notify_StructuredPushSupplier.h"
19 #include "Task_Stats.h"
20 #include "StructuredEvent.h"
22 #include "ace/Barrier.h"
23 #include "ace/Arg_Shifter.h"
25 class TAO_Notify_Tests_Task_Callback
;
28 * @class TAO_Notify_Tests_Periodic_Supplier
30 * @brief A Periodic Supplier.
32 class TAO_NOTIFY_TEST_Export TAO_Notify_Tests_Periodic_Supplier
: public TAO_Notify_Tests_StructuredPushSupplier
, public ACE_Task
<ACE_SYNCH
>
36 TAO_Notify_Tests_Periodic_Supplier ();
39 ~TAO_Notify_Tests_Periodic_Supplier ();
41 /// set the helper callback
42 void task_callback(TAO_Notify_Tests_Task_Callback
* client
);
44 /// Init the state of this object.
45 int init_state (ACE_Arg_Shifter
& arg_shifter
);
47 /// Activate this task, synch on the given barrier.
48 virtual int activate_task (ACE_Barrier
* barrier
);
54 void dump_stats (ACE_TCHAR
* msg
, int dump_samples
);
56 /// Get the name of the proxy
57 const char* proxy_name ();
63 /// Send a few events before the actual measurements.
64 void send_warmup_events ();
67 void send_prologue ();
69 /// All tasks synch at this barrier.
70 ACE_Barrier
* barrier_
;
72 /// The event to send.
73 TAO_Notify_Tests_StructuredEvent event_
;
75 TAO_Notify_Tests_StructuredEvent zeroth_event
;
77 /// The priority of this task.
78 CORBA::Short priority_
;
83 /// Counts the total number of deadlines missed.
84 long total_deadlines_missed_
;
86 /// RunTime - The Max. time to run the supplier.
89 /// Worst case exec. time.
90 unsigned long exec_time_
;
95 /// Number of times to exec. Job
98 /// A load factor supplied to each Job.
101 /// Stats house keeping
105 TAO_Notify_Tests_Task_Callback
* client_
;
108 #include /**/ "ace/post.h"
109 #endif /* TAO_Notify_Tests_PERIODIC_SUPPLIER_H */