Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / performance-tests / Throughput / Receiver.h
blobf2697134c855093e47fa84d63232afebdf2a72ff
2 #ifndef THROUGHPUT_RECEIVER_H
3 #define THROUGHPUT_RECEIVER_H
4 #include /**/ "ace/pre.h"
6 #include "TestS.h"
7 #include "ace/OS_NS_time.h"
9 #if defined (_MSC_VER)
10 # pragma warning(push)
11 # pragma warning (disable:4250)
12 #endif /* _MSC_VER */
14 /// Implement the Test::Receiver interface
15 class Receiver
16 : public virtual POA_Test::Receiver
18 public:
19 /// Constructor
20 Receiver ();
22 // = The skeleton methods
23 virtual void receive_data (const Test::Message &message);
25 virtual void done ();
27 private:
28 /// The timestamp for the first message
29 ACE_hrtime_t start_time_;
31 /// The number of messages received
32 size_t message_count_;
34 /// The number of bytes received
35 size_t byte_count_;
37 /// The timestamp for the last message
38 ACE_hrtime_t last_message_time_;
40 /// The id for the last message
41 CORBA::ULong last_message_id_;
44 #if defined(_MSC_VER)
45 # pragma warning(pop)
46 #endif /* _MSC_VER */
48 #include /**/ "ace/post.h"
49 #endif /* THROUGHPUT_RECEIVER_H */