Author: sebb
Date: Fri Sep 23 19:35:06 2011
New Revision: 1174967
URL: http://svn.apache.org/viewvc?rev=1174967&view=rev
Log:
Resolve Asynch queue size property on the server to agree with other sender
behaviour
Modified:
jakarta/jmeter/trunk/bin/jmeter.properties
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/AsynchSampleSender.java
jakarta/jmeter/trunk/xdocs/usermanual/remote-test.xml
Modified: jakarta/jmeter/trunk/bin/jmeter.properties
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/jmeter.properties?rev=1174967&r1=1174966&r2=1174967&view=diff
==============================================================================
--- jakarta/jmeter/trunk/bin/jmeter.properties (original)
+++ jakarta/jmeter/trunk/bin/jmeter.properties Fri Sep 23 19:35:06 2011
@@ -534,15 +534,18 @@ wmlParser.types=text/vnd.wap.wml
#mode=StrippedBatch
#mode=org.example.load.MySampleSender
#hold_samples=true
+#
#num_sample_threshold=100
+# Value is in milliseconds
+#time_threshold=60000
+#
# Asynchronous sender; uses a queue and background worker process to return
the samples
#mode=Asynch
# default queue size
#asynch.batch.queue.size=20
#
-#
-# Value is in milliseconds
-#time_threshold=60000
+# Note: the mode is currently resolved on the client;
+# other properties (e.g. time_threshold) are resolved on the server.
# To set the Monitor Health Visualiser buffer size, enter the desired value
# monitor.buffer.size=800
Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/AsynchSampleSender.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/AsynchSampleSender.java?rev=1174967&r1=1174966&r2=1174967&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/AsynchSampleSender.java
(original)
+++
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/AsynchSampleSender.java
Fri Sep 23 19:35:06 2011
@@ -40,15 +40,15 @@ public class AsynchSampleSender implemen
// Create unique object as marker for end of queue
private transient static final SampleEvent FINAL_EVENT = new SampleEvent();
+ private static final int capacity =
JMeterUtils.getPropDefault("asynch.batch.queue.size", 20); // $NON-NLS-1$
+
// created by client
private final RemoteSampleListener listener;
static {
- log.info("Using Asynch Remote Sampler for this test run");
+ log.info("Using Asynch Remote Sampler for this test run, queue size
"+capacity);
}
- final int capacity = JMeterUtils.getPropDefault("asynch.batch.queue.size",
20); // $NON-NLS-1$
-
private transient BlockingQueue<SampleEvent> queue; // created by server
in readResolve method
private transient long queueWaits; // how many times we had to wait to
queue a sample
Modified: jakarta/jmeter/trunk/xdocs/usermanual/remote-test.xml
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/remote-test.xml?rev=1174967&r1=1174966&r2=1174967&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/usermanual/remote-test.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/remote-test.xml Fri Sep 23 19:35:06
2011
@@ -227,7 +227,14 @@ There are some JMeter properties that ca
<li>Standard - send samples synchronously as soon as they are
generated</li>
<li>Hold - hold samples in an array until the end of a run. This may use a
lot of memory on the server.</li>
<li>Batch - send saved samples when either the count or time exceeds a
threshold,
- at which point the samples are sent synchronously. See also the Asynch
mode, described below.</li>
+ at which point the samples are sent synchronously.
+ The thresholds can be configured on the server using the following
properties:
+ <ul>
+ <li>num_sample_threshold - number of samples to accumulate, default
100</li>
+ <li>time_threshold - time threshold, default 60000 ms = 60 seconds</li>
+ </ul>
+ </li>
+ See also the Asynch mode, described below.
<li>Statistical - send a summary sample when either the count or time
exceeds a threshold.
The samples are summarised by thread group name and sample label.
The following fields are accumulated:
@@ -241,14 +248,14 @@ There are some JMeter properties that ca
Other fields that vary between samples are lost.
</li>
<li>Stripped - remove responseData from succesful samples</li>
- <li>StrippedBatch - remove responseData from succesful samples, and send
as batches</li>
+ <li>StrippedBatch - remove responseData from succesful samples, and use
Batch sender to send them.</li>
<li>Asynch - samples are temporarily stored in a local queue. A separate
worker thread sends the samples.
This allows the test thread to continue without waiting for the result
to be sent back to the client.
However, if samples are being created faster than they can be sent,
the queue will eventually fill up,
and the sampler thread will block until some samples can be drained
from the queue.
This mode is useful for smoothing out peaks in sample generation.
The queue size can be adjusted by setting the JMeter property
- <b><code>asynch.batch.queue.size</code></b> (default 20) on the client
node.
+ <b><code>asynch.batch.queue.size</code></b> (default 20) on the server
node.
</li>
<li>Custom implementation : set the mode parameter to your custom sample
sender class name.
This must implement the interface SampleSender and have a constructor
which takes a single
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]