You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Stephane Rainville <st...@hotmail.com> on 2008/07/14 23:52:58 UTC
TCP Sampler questions
Hi,
I'm trying to test a socket based server and I'm having a weird behaviour with the TCP Sampler.
1-How can you know you get errors or timeout?
Even if I have timeouts the "Aggregate Report" always says 0% error.
The only way I can see if i did not get replies id to use the "Save Reponses to a file" and manually count the number of files that are above 0 KiloBytes. If I set a very High timeout value I get my return values but I think it defeats the purpos of stressing the server and measuring failures.
Which brings me to question 2 that is not documented on the Jmeter help.
2- If I uncheck "re-use" connection all my responses files are ok. If i check it almost 70% of responses files are empty.
Comment?
How do you use the TCP sampler?
Thanks
Stéphane
_________________________________________________________________
Re: TCP Sampler questions
Posted by sebb <se...@gmail.com>.
On 16/07/2008, sebb <se...@gmail.com> wrote:
> On 14/07/2008, Stephane Rainville <st...@hotmail.com> wrote:
> >
> > Hi,
> >
> > I'm trying to test a socket based server and I'm having a weird behaviour with the TCP Sampler.
> >
> > 1-How can you know you get errors or timeout?
> > Even if I have timeouts the "Aggregate Report" always says 0% error.
> >
>
>
> The sample implementation that is supplied is fairly basic, and does
> not report timeout errors. Nor does it report write errors.
>
>
> > The only way I can see if i did not get replies id to use the "Save Reponses to a file" and manually count the number of files that are above 0 KiloBytes. If I set a very High timeout value I get my return values but I think it defeats the purpos of stressing the server and measuring failures.
>
>
> Or you can add a Response Assertion to check for > 0 bytes.
>
Or check for the time the sample takes using a Duration Assertion.
>
> >
> > Which brings me to question 2 that is not documented on the Jmeter help.
>
>
> Oops.
>
>
> > 2- If I uncheck "re-use" connection all my responses files are ok. If i check it almost 70% of responses files are empty.
> > Comment?
>
>
> Originally, the sampler always re-used the same socket.
> If the checkbox is not checked, then the socket is closed when the
> sample finishes, and a new socket will be created next time round.
>
> Presumably the errors occur because the server does not expect the
> socket to be re-used.
>
>
> > How do you use the TCP sampler?
> >
>
>
> The TCPClient interface is intended for implementation by users.
> The supplied implementation can be overridden by changing the property
> "tcp.handler".
>
> Patches to improve the default implementation are welcome - please
> create a Bugzilla issue and attach any patches etc there.
>
> > Thanks
> >
> > Stéphane
> >
> >
> >
> >
> > _________________________________________________________________
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: TCP Sampler questions
Posted by sebb <se...@gmail.com>.
On 14/07/2008, Stephane Rainville <st...@hotmail.com> wrote:
>
> Hi,
>
> I'm trying to test a socket based server and I'm having a weird behaviour with the TCP Sampler.
>
> 1-How can you know you get errors or timeout?
> Even if I have timeouts the "Aggregate Report" always says 0% error.
>
The sample implementation that is supplied is fairly basic, and does
not report timeout errors. Nor does it report write errors.
> The only way I can see if i did not get replies id to use the "Save Reponses to a file" and manually count the number of files that are above 0 KiloBytes. If I set a very High timeout value I get my return values but I think it defeats the purpos of stressing the server and measuring failures.
Or you can add a Response Assertion to check for > 0 bytes.
>
> Which brings me to question 2 that is not documented on the Jmeter help.
Oops.
> 2- If I uncheck "re-use" connection all my responses files are ok. If i check it almost 70% of responses files are empty.
> Comment?
Originally, the sampler always re-used the same socket.
If the checkbox is not checked, then the socket is closed when the
sample finishes, and a new socket will be created next time round.
Presumably the errors occur because the server does not expect the
socket to be re-used.
> How do you use the TCP sampler?
>
The TCPClient interface is intended for implementation by users.
The supplied implementation can be overridden by changing the property
"tcp.handler".
Patches to improve the default implementation are welcome - please
create a Bugzilla issue and attach any patches etc there.
> Thanks
>
> Stéphane
>
>
>
>
> _________________________________________________________________
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org