You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Sato Takanobu <sa...@gmail.com> on 2013/10/05 05:56:05 UTC

TCP Sampler response length

I am using TCP Sampler for performance test.
My test target application receives the 10 bytes data from JMeter, and
returns 10 bytes data.

If I set 2000(ms) to response timeout field for example, response time
shown in Aggregate Report always becomes 2000.
(if I set 0 to response timeout field, sampler never return the result.)

I expect that when TCP Sampler receives the 10 bytes response, it returns
the result and finishes.
How about adding the field of response size to TCP Sampler?

Regards,
Sato

Re: TCP Sampler response length

Posted by Sato Takanobu <sa...@gmail.com>.
>
> That would be one way to do it, but it seems like a very specific use
> case for which you should be writing your own implementation.
>

I don't consider to use always the same data size.
The variable, like $data_length, is set to the length field and updated
each TCP Sampler is executed.
If response size can be known beforehand or calculated before sampler
executes, all we have to do is set $data_length.
Does this seem like specific use? If so, I'm OK.

Is there anything in the response that indicates when it is complete?
> e.g. a fixed byte at the end, or an initial length prefix?
>

For example, first N bytes are fixed length, and next M bytes indicate
the following data size.

If response length is not clear, my idea cannot be applied.
But I think that the original implementation is necessary in such case.

Re: TCP Sampler response length

Posted by sebb <se...@gmail.com>.
On 5 October 2013 04:56, Sato Takanobu <sa...@gmail.com> wrote:
> I am using TCP Sampler for performance test.
> My test target application receives the 10 bytes data from JMeter, and
> returns 10 bytes data.
>
> If I set 2000(ms) to response timeout field for example, response time
> shown in Aggregate Report always becomes 2000.
> (if I set 0 to response timeout field, sampler never return the result.)

That is because JMeter does not detect the end of the response.

> I expect that when TCP Sampler receives the 10 bytes response, it returns
> the result and finishes.

How is the sampler supposed to know that the response is complete?

> How about adding the field of response size to TCP Sampler?

That would be one way to do it, but it seems like a very specific use
case for which you should be writing your own implementation.

Is there anything in the response that indicates when it is complete?
e.g. a fixed byte at the end, or an initial length prefix?

> Regards,
> Sato

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org