diff options
| author | Rupert Smith <rupertlssmith@apache.org> | 2007-10-10 14:29:02 +0000 |
|---|---|---|
| committer | Rupert Smith <rupertlssmith@apache.org> | 2007-10-10 14:29:02 +0000 |
| commit | d87738d772276138fb20427558701febf455f510 (patch) | |
| tree | 9bd4075ec7f7c4d13b8f1c36efee3fa4a9ea20dd /java | |
| parent | 7289ff94c6520175f1dbad689f245fda7f6c7220 (diff) | |
| download | qpid-python-d87738d772276138fb20427558701febf455f510.tar.gz | |
Merged revisions 583438-583483 via svnmerge from
https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1
........
r583438 | rupertlssmith | 2007-10-10 12:46:59 +0100 (Wed, 10 Oct 2007) | 1 line
Changed tests to use global maxPending limit, rather than per producer.
........
r583483 | rupertlssmith | 2007-10-10 15:21:20 +0100 (Wed, 10 Oct 2007) | 1 line
Removed debug logging from performance test code.
........
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@583487 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
| -rw-r--r-- | java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java index bf1d9aba4a..70e548d613 100644 --- a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java +++ b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java @@ -423,10 +423,10 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti * Holds a monitor which is used to synchronize sender and receivers threads, where the sender has elected
* to wait until the number of unreceived message is reduced before continuing to send.
*/
- protected final Object _sendPauseMonitor = new Object();
+ protected static final Object _sendPauseMonitor = new Object();
/** Keeps a count of the number of message currently sent but not received. */
- protected AtomicInteger _unreceived = new AtomicInteger(0);
+ protected static AtomicInteger _unreceived = new AtomicInteger(0);
/** A source for providing sequential unique correlation ids. These will be unique within the same JVM. */
private static AtomicLong _correlationIdGenerator = new AtomicLong(0L);
@@ -894,9 +894,6 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti // log.debug("Reply was expected, decrementing the latch for the id, " + correlationID);
- // log.debug("unreceived = " + unreceived);
- // log.debug("unreceivedSize = " + unreceivedSize);
-
// Release waiting senders if there are some and using maxPending limit.
if ((_maxPendingSize > 0))
{
@@ -906,11 +903,14 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti (unreceived * ((_messageSize == 0) ? 1 : _messageSize))
/ (_isPubSub ? getConsumersPerDestination() : 1);
+ // log.debug("unreceived = " + unreceived);
+ // log.debug("unreceivedSize = " + unreceivedSize);
+
synchronized (_sendPauseMonitor)
{
if (unreceivedSize < _maxPendingSize)
{
- _sendPauseMonitor.notify();
+ _sendPauseMonitor.notifyAll();
}
}
}
@@ -988,7 +988,7 @@ public class PingPongProducer implements Runnable /*, MessageListener*/, Excepti finally
{
// log.debug("public void onMessageWithConsumerNo(Message message, int consumerNo): ending");
- NDC.clear();
+ // NDC.clear();
}
}
|
