On 2 October 2011 08:51, Milamber <milam...@apache.org> wrote:
> Hello,
>
> I will work on a patch which introduce a property to change the
> readBuffer size (default 8192B).

I'm OK with making the buffer size configurable.

> That me seems important because this buffer size is the calculation base
> for the latency time.
> I would like for some bandwidth tests, change the buffer size to ~1400
> or 1500B (i.e. ip packet size).
>
> Sebb, have you a special opinion (or history) on this buffer size?

I think it would be useful to be able to configure the buffer size,
but I question whether it is really necessary to change the buffer
size to improve the accuracy of the latency figure.

Perhaps there's a better way to achieve the goal which does not
involve artificially changing the buffer size.

Maybe via override of the input stream methods, or perhaps by using a
shorter initial read?

The buffer size may affect subsequent read performance, so it seems
wrong to change it just to improve the latency accuracy.

> Thanks
>
> Milamber
>
>
>
> Le 02/10/2011 07:49, milam...@apache.org a ecrit :
>> Author: milamber
>> Date: Sun Oct  2 05:49:57 2011
>> New Revision: 1178129
>>
>> URL: http://svn.apache.org/viewvc?rev=1178129&view=rev
>> Log:
>> Bug 51918 - GZIP compressed traffic produces errors, when multiple 
>> connections allowed
>>
>> Modified:
>>     
>> jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java
>>     
>> jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
>>     jakarta/jmeter/trunk/xdocs/changes.xml
>>
>> Modified: 
>> jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java
>> URL: 
>> http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java?rev=1178129&r1=1178128&r2=1178129&view=diff
>> ==============================================================================
>> --- 
>> jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java 
>> (original)
>> +++ 
>> jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java 
>> Sun Oct  2 05:49:57 2011
>> @@ -47,8 +47,6 @@ public class JMeterContext {
>>
>>      private int threadNum;
>>
>> -    private byte[] readBuffer = null;
>> -
>>      private boolean isReinitSubControllers = false;
>>
>>      JMeterContext() {
>> @@ -66,7 +64,6 @@ public class JMeterContext {
>>          previousSampler = null;
>>          samplingStarted = false;
>>          threadNum = 0;
>> -        readBuffer = null;
>>          thread = null;
>>          isReinitSubControllers = false;
>>      }
>> @@ -80,18 +77,6 @@ public class JMeterContext {
>>          return variables;
>>      }
>>
>> -    /**
>> -     * A temporary buffer that can be shared between samplers in a thread.
>> -     *
>> -     * @return the shared read buffer
>> -     */
>> -    public byte[] getReadBuffer() {
>> -        if (readBuffer == null) {
>> -            readBuffer = new byte[8192];
>> -        }
>> -        return readBuffer;
>> -    }
>> -
>>      public void setVariables(JMeterVariables vars) {
>>          this.variables = vars;
>>      }
>>
>> Modified: 
>> jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
>> URL: 
>> http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java?rev=1178129&r1=1178128&r2=1178129&view=diff
>> ==============================================================================
>> --- 
>> jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
>>  (original)
>> +++ 
>> jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
>>  Sun Oct  2 05:49:57 2011
>> @@ -1548,7 +1548,7 @@ public abstract class HTTPSamplerBase ex
>>       */
>>      public byte[] readResponse(SampleResult sampleResult, InputStream in, 
>> int length) throws IOException {
>>
>> -        byte[] readBuffer = getThreadContext().getReadBuffer();
>> +        byte[] readBuffer = new byte[8192]; // 8kB is the (max) size to 
>> have the latency ('the first packet')
>>          int bufferSize=32;// Enough for MD5
>>
>>          MessageDigest md=null;
>>
>> Modified: jakarta/jmeter/trunk/xdocs/changes.xml
>> URL: 
>> http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=1178129&r1=1178128&r2=1178129&view=diff
>> ==============================================================================
>> --- jakarta/jmeter/trunk/xdocs/changes.xml (original)
>> +++ jakarta/jmeter/trunk/xdocs/changes.xml Sun Oct  2 05:49:57 2011
>> @@ -33,6 +33,7 @@ Earlier changes are detailed in the <a h
>>  <p>temporary section to collect changes while release vote is in 
>> progress</p>
>>  <ul>
>>  <li>Bug 51932 - CacheManager does not handle cache-control header with any 
>> attributes after max-age</li>
>> +<li>Bug 51918 - GZIP compressed traffic produces errors, when multiple 
>> connections allowed</li>
>>  </ul>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: notifications-unsubscr...@jakarta.apache.org
>> For additional commands, e-mail: notifications-h...@jakarta.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@jakarta.apache.org
> For additional commands, e-mail: dev-h...@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: dev-h...@jakarta.apache.org

Reply via email to