blob: 66cfbdca3a687886013591577753c4ad7fba0406 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
/* -*- C++ -*- */
// $Id$
//
// ============================================================================
//
// = LIBRARY
// ORBSVCS Real-time Event Channel testsuite
//
// = FILENAME
// Reconnect
//
// = AUTHOR
// Carlos O'Ryan (coryan@cs.wustl.edu)
//
// ============================================================================
#ifndef EC_RECONNECT_H
#define EC_RECONNECT_H
#include "Driver.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
class EC_Reconnect : public EC_Driver
{
//
// = TITLE
// Test the EC reconnection feature
//
// = DESCRIPTION
// The EC can be configured to allow re-connection of suppliers
// and consumers, this test verifies that:
// + The EC does *not* allow reconnections if the feature is
// disabled (the default)
// + The EC does allow reconnections if the feature is enabled
// and:
// - There are no memory leaks
// - Compares the time required for a reconnection vs a complete
// connect/disconnect cycle, specially as the number of
// suppliers and consumers increases.
//
public:
EC_Reconnect (void);
// Constructor
// = The EC_Driver methods
virtual int parse_args (int& argc, char* argv[]);
virtual void print_args (void) const;
virtual void print_usage (void);
// add some command line args to enable/disable reconnections
virtual void modify_attributes (TAO_EC_Event_Channel_Attributes& attr);
// set the reconnection flags
void execute_test (CORBA::Environment& ACE_TRY_ENV);
// Don't run the suppliers, just test connect and disconnect calls.
void dump_results (void);
// Don't dump the EC_Driver results, they are meaningless.
void execute_consumer_test (CORBA::Environment& ACE_TRY_ENV);
void execute_supplier_test (CORBA::Environment& ACE_TRY_ENV);
// Separate the suppliers and consumers.
private:
int allow_consumer_reconnect_;
int allow_supplier_reconnect_;
// What aspect of reconnection are we going to test?
int disconnections_;
// The number of disconnections
ACE_Throughput_Stats consumer_reconnect_;
ACE_Throughput_Stats supplier_reconnect_;
};
#endif /* EC_RECONNECT_H */
|