summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp')
-rw-r--r--TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp
index 8ce4695e239..29385f74690 100644
--- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp
+++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp
@@ -12,6 +12,7 @@
#include "ace/Get_Opt.h"
#include "ace/Auto_Ptr.h"
#include "ace/Sched_Params.h"
+#include "ace/OS_NS_unistd.h"
ACE_RCSID (EC_Throughput,
ECT_Consumer,
@@ -19,12 +20,14 @@ ACE_RCSID (EC_Throughput,
Test_Consumer::Test_Consumer (ECT_Driver *driver,
void *cookie,
- int n_suppliers)
+ int n_suppliers,
+ int stall_length)
: driver_ (driver),
cookie_ (cookie),
n_suppliers_ (n_suppliers),
recv_count_ (0),
- shutdown_count_ (0)
+ shutdown_count_ (0),
+ stall_length_(stall_length)
{
}
@@ -107,7 +110,6 @@ Test_Consumer::accumulate (ACE_Throughput_Stats& stats) const
void
Test_Consumer::push (const RtecEventComm::EventSet& events)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
if (events.length () == 0)
{
@@ -120,7 +122,14 @@ Test_Consumer::push (const RtecEventComm::EventSet& events)
// We start the timer as soon as we receive the first event...
if (this->recv_count_ == 0)
- this->first_event_ = ACE_OS::gethrtime ();
+ {
+ this->first_event_ = ACE_OS::gethrtime ();
+ ACE_DEBUG ((LM_DEBUG,
+ "ECT_Consumer (%P|%t) stalling for %d seconds\n", this->stall_length_));
+ ACE_OS::sleep(this->stall_length_);
+ ACE_DEBUG ((LM_DEBUG, "ECT_Consumer (%P|%t) finished stalling\n"));
+ }
+
this->recv_count_ += events.length ();
@@ -163,6 +172,5 @@ Test_Consumer::push (const RtecEventComm::EventSet& events)
void
Test_Consumer::disconnect_push_consumer (void)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
}