You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2016/03/21 19:17:04 UTC

svn commit: r1736072 - in /jmeter/trunk: src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java xdocs/changes.xml

Author: fschumacher
Date: Mon Mar 21 18:17:03 2016
New Revision: 1736072

URL: http://svn.apache.org/viewvc?rev=1736072&view=rev
Log:
TCP Sampler: Set connect time in sampler when connection is established.

Bugzilla Id: 59205

Modified:
    jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java?rev=1736072&r1=1736071&r2=1736072&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java (original)
+++ jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java Mon Mar 21 18:17:03 2016
@@ -393,6 +393,7 @@ public class TCPSampler extends Abstract
         res.sampleStart();
         try {
             Socket sock = getSocket(socketKey);
+            res.connectEnd();
             if (sock == null) {
                 res.setResponseCode("500"); //$NON-NLS-1$
                 res.setResponseMessage(getError());

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1736072&r1=1736071&r2=1736072&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Mon Mar 21 18:17:03 2016
@@ -171,6 +171,7 @@ Summary
     <li><bug>58300</bug> Make existing Java Samplers implement Interruptible</li>
     <li><bug>58160</bug>JMS Publisher : reload file content if file name changes. Based partly on a patch contributed by Maxime Chassagneux (maxime.chassagneux at gmail.com)</li>
     <li><bug>58786</bug>JDBC Sampler : Replace Excalibur DataSource by more up to date library commons-dbcp2</li>
+    <li><bug>59205</bug>TCP Sampler: Set connect time in sampler when connection is established.</li>
 </ul>
 
 <h3>Controllers</h3>



Re: svn commit: r1736072 - in /jmeter/trunk: src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java xdocs/changes.xml

Posted by Philippe Mouawad <ph...@gmail.com>.
Done in :
http://svn.apache.org/viewvc?rev=1736324&view=rev

On Tue, Mar 22, 2016 at 9:50 PM, sebb <se...@gmail.com> wrote:

> On 22 March 2016 at 20:27, Felix Schumacher
> <fe...@internetallee.de> wrote:
> > Am 22.03.2016 um 21:05 schrieb sebb:
> >>
> >> What do we do for other samplers if the connect fails?
> >
> > The only other samplers using connectEnd are those using  the
> > MeasuringConnectionManager. There connectEnd is called in
> > ManagedClientConnection#open.
>
> It is called in a finally clause, so we should do the same for TCP.
>
> And add docs to say so.
>
> > Felix
> >
> >>
> >> Do we document the behaviour?
> >>
> >> is the value supposed to be the time to connect even if connect fails?
> >>
> >> On 22 March 2016 at 19:32, Philippe Mouawad <philippe.mouawad@gmail.com
> >
> >> wrote:
> >>>
> >>> In fact I don't know :-)
> >>>
> >>> In case of exception, connectEnd won't be called so for example, if
> issue
> >>> is due to timeout, value will not be equal to timeout.
> >>> Should we put it in a try/finally arount getSocket ?
> >>> Thanks
> >>>
> >>> On Tue, Mar 22, 2016 at 8:29 PM, Felix Schumacher <
> >>> felix.schumacher@internetallee.de> wrote:
> >>>
> >>>>
> >>>> Am 22. März 2016 20:22:22 MEZ, schrieb Philippe Mouawad <
> >>>> philippe.mouawad@gmail.com>:
> >>>>>
> >>>>> Hi Felix,
> >>>>> Do you think it is ok in case of Connection error ?
> >>>>
> >>>> Yes,  that is why I put connectEnd there. But feel free to place it
> >>>> somewhere else. I wouldn't be angry.
> >>>>
> >>>> Regards,
> >>>> Felix
> >>>>
> >>>>> Thank you
> >>>>> Regards
> >>>>>
> >>>>> On Mon, Mar 21, 2016 at 7:17 PM, <fs...@apache.org> wrote:
> >>>>>
> >>>>>> Author: fschumacher
> >>>>>> Date: Mon Mar 21 18:17:03 2016
> >>>>>> New Revision: 1736072
> >>>>>>
> >>>>>> URL: http://svn.apache.org/viewvc?rev=1736072&view=rev
> >>>>>> Log:
> >>>>>> TCP Sampler: Set connect time in sampler when connection is
> >>>>>
> >>>>> established.
> >>>>>>
> >>>>>> Bugzilla Id: 59205
> >>>>>>
> >>>>>> Modified:
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> >>>>>>
> >>>>>>      jmeter/trunk/xdocs/changes.xml
> >>>>>>
> >>>>>> Modified:
> >>>>>>
> >>>>>
> >>>>>
> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> >>>>>>
> >>>>>> URL:
> >>>>>>
> >>>>
> >>>>
> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java?rev=1736072&r1=1736071&r2=1736072&view=diff
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> ==============================================================================
> >>>>>>
> >>>>>> ---
> >>>>>>
> >>>>>
> >>>>>
> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> >>>>>>
> >>>>>> (original)
> >>>>>> +++
> >>>>>>
> >>>>>
> >>>>>
> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> >>>>>>
> >>>>>> Mon Mar 21 18:17:03 2016
> >>>>>> @@ -393,6 +393,7 @@ public class TCPSampler extends Abstract
> >>>>>>           res.sampleStart();
> >>>>>>           try {
> >>>>>>               Socket sock = getSocket(socketKey);
> >>>>>> +            res.connectEnd();
> >>>>>>               if (sock == null) {
> >>>>>>                   res.setResponseCode("500"); //$NON-NLS-1$
> >>>>>>                   res.setResponseMessage(getError());
> >>>>>>
> >>>>>> Modified: jmeter/trunk/xdocs/changes.xml
> >>>>>> URL:
> >>>>>>
> >>>>
> >>>>
> http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1736072&r1=1736071&r2=1736072&view=diff
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> ==============================================================================
> >>>>>>
> >>>>>> --- jmeter/trunk/xdocs/changes.xml (original)
> >>>>>> +++ jmeter/trunk/xdocs/changes.xml Mon Mar 21 18:17:03 2016
> >>>>>> @@ -171,6 +171,7 @@ Summary
> >>>>>>       <li><bug>58300</bug> Make existing Java Samplers implement
> >>>>>> Interruptible</li>
> >>>>>>       <li><bug>58160</bug>JMS Publisher : reload file content if
> file
> >>>>>
> >>>>> name
> >>>>>>
> >>>>>> changes. Based partly on a patch contributed by Maxime Chassagneux
> >>>>>> (maxime.chassagneux at gmail.com)</li>
> >>>>>>       <li><bug>58786</bug>JDBC Sampler : Replace Excalibur
> DataSource
> >>>>>
> >>>>> by
> >>>>>>
> >>>>>> more up to date library commons-dbcp2</li>
> >>>>>> +    <li><bug>59205</bug>TCP Sampler: Set connect time in sampler
> >>>>>
> >>>>> when
> >>>>>>
> >>>>>> connection is established.</li>
> >>>>>>   </ul>
> >>>>>>
> >>>>>>   <h3>Controllers</h3>
> >>>>>>
> >>>>>>
> >>>>>>
>

Re: svn commit: r1736072 - in /jmeter/trunk: src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java xdocs/changes.xml

Posted by sebb <se...@gmail.com>.
On 22 March 2016 at 20:27, Felix Schumacher
<fe...@internetallee.de> wrote:
> Am 22.03.2016 um 21:05 schrieb sebb:
>>
>> What do we do for other samplers if the connect fails?
>
> The only other samplers using connectEnd are those using  the
> MeasuringConnectionManager. There connectEnd is called in
> ManagedClientConnection#open.

It is called in a finally clause, so we should do the same for TCP.

And add docs to say so.

> Felix
>
>>
>> Do we document the behaviour?
>>
>> is the value supposed to be the time to connect even if connect fails?
>>
>> On 22 March 2016 at 19:32, Philippe Mouawad <ph...@gmail.com>
>> wrote:
>>>
>>> In fact I don't know :-)
>>>
>>> In case of exception, connectEnd won't be called so for example, if issue
>>> is due to timeout, value will not be equal to timeout.
>>> Should we put it in a try/finally arount getSocket ?
>>> Thanks
>>>
>>> On Tue, Mar 22, 2016 at 8:29 PM, Felix Schumacher <
>>> felix.schumacher@internetallee.de> wrote:
>>>
>>>>
>>>> Am 22. März 2016 20:22:22 MEZ, schrieb Philippe Mouawad <
>>>> philippe.mouawad@gmail.com>:
>>>>>
>>>>> Hi Felix,
>>>>> Do you think it is ok in case of Connection error ?
>>>>
>>>> Yes,  that is why I put connectEnd there. But feel free to place it
>>>> somewhere else. I wouldn't be angry.
>>>>
>>>> Regards,
>>>> Felix
>>>>
>>>>> Thank you
>>>>> Regards
>>>>>
>>>>> On Mon, Mar 21, 2016 at 7:17 PM, <fs...@apache.org> wrote:
>>>>>
>>>>>> Author: fschumacher
>>>>>> Date: Mon Mar 21 18:17:03 2016
>>>>>> New Revision: 1736072
>>>>>>
>>>>>> URL: http://svn.apache.org/viewvc?rev=1736072&view=rev
>>>>>> Log:
>>>>>> TCP Sampler: Set connect time in sampler when connection is
>>>>>
>>>>> established.
>>>>>>
>>>>>> Bugzilla Id: 59205
>>>>>>
>>>>>> Modified:
>>>>>>
>>>>>>
>>>>>
>>>>> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>>>>>>
>>>>>>      jmeter/trunk/xdocs/changes.xml
>>>>>>
>>>>>> Modified:
>>>>>>
>>>>>
>>>>> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>>>>>>
>>>>>> URL:
>>>>>>
>>>>
>>>> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java?rev=1736072&r1=1736071&r2=1736072&view=diff
>>>>>>
>>>>>>
>>>>>
>>>>> ==============================================================================
>>>>>>
>>>>>> ---
>>>>>>
>>>>>
>>>>> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>>>>>>
>>>>>> (original)
>>>>>> +++
>>>>>>
>>>>>
>>>>> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>>>>>>
>>>>>> Mon Mar 21 18:17:03 2016
>>>>>> @@ -393,6 +393,7 @@ public class TCPSampler extends Abstract
>>>>>>           res.sampleStart();
>>>>>>           try {
>>>>>>               Socket sock = getSocket(socketKey);
>>>>>> +            res.connectEnd();
>>>>>>               if (sock == null) {
>>>>>>                   res.setResponseCode("500"); //$NON-NLS-1$
>>>>>>                   res.setResponseMessage(getError());
>>>>>>
>>>>>> Modified: jmeter/trunk/xdocs/changes.xml
>>>>>> URL:
>>>>>>
>>>>
>>>> http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1736072&r1=1736071&r2=1736072&view=diff
>>>>>>
>>>>>>
>>>>>
>>>>> ==============================================================================
>>>>>>
>>>>>> --- jmeter/trunk/xdocs/changes.xml (original)
>>>>>> +++ jmeter/trunk/xdocs/changes.xml Mon Mar 21 18:17:03 2016
>>>>>> @@ -171,6 +171,7 @@ Summary
>>>>>>       <li><bug>58300</bug> Make existing Java Samplers implement
>>>>>> Interruptible</li>
>>>>>>       <li><bug>58160</bug>JMS Publisher : reload file content if file
>>>>>
>>>>> name
>>>>>>
>>>>>> changes. Based partly on a patch contributed by Maxime Chassagneux
>>>>>> (maxime.chassagneux at gmail.com)</li>
>>>>>>       <li><bug>58786</bug>JDBC Sampler : Replace Excalibur DataSource
>>>>>
>>>>> by
>>>>>>
>>>>>> more up to date library commons-dbcp2</li>
>>>>>> +    <li><bug>59205</bug>TCP Sampler: Set connect time in sampler
>>>>>
>>>>> when
>>>>>>
>>>>>> connection is established.</li>
>>>>>>   </ul>
>>>>>>
>>>>>>   <h3>Controllers</h3>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>
>>> --
>>> Cordialement.
>>> Philippe Mouawad.
>
>

Re: svn commit: r1736072 - in /jmeter/trunk: src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java xdocs/changes.xml

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 22.03.2016 um 21:05 schrieb sebb:
> What do we do for other samplers if the connect fails?
The only other samplers using connectEnd are those using  the 
MeasuringConnectionManager. There connectEnd is called in 
ManagedClientConnection#open.

Felix
>
> Do we document the behaviour?
>
> is the value supposed to be the time to connect even if connect fails?
>
> On 22 March 2016 at 19:32, Philippe Mouawad <ph...@gmail.com> wrote:
>> In fact I don't know :-)
>>
>> In case of exception, connectEnd won't be called so for example, if issue
>> is due to timeout, value will not be equal to timeout.
>> Should we put it in a try/finally arount getSocket ?
>> Thanks
>>
>> On Tue, Mar 22, 2016 at 8:29 PM, Felix Schumacher <
>> felix.schumacher@internetallee.de> wrote:
>>
>>>
>>> Am 22. März 2016 20:22:22 MEZ, schrieb Philippe Mouawad <
>>> philippe.mouawad@gmail.com>:
>>>> Hi Felix,
>>>> Do you think it is ok in case of Connection error ?
>>> Yes,  that is why I put connectEnd there. But feel free to place it
>>> somewhere else. I wouldn't be angry.
>>>
>>> Regards,
>>> Felix
>>>
>>>> Thank you
>>>> Regards
>>>>
>>>> On Mon, Mar 21, 2016 at 7:17 PM, <fs...@apache.org> wrote:
>>>>
>>>>> Author: fschumacher
>>>>> Date: Mon Mar 21 18:17:03 2016
>>>>> New Revision: 1736072
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=1736072&view=rev
>>>>> Log:
>>>>> TCP Sampler: Set connect time in sampler when connection is
>>>> established.
>>>>> Bugzilla Id: 59205
>>>>>
>>>>> Modified:
>>>>>
>>>>>
>>>> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>>>>>      jmeter/trunk/xdocs/changes.xml
>>>>>
>>>>> Modified:
>>>>>
>>>> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>>>>> URL:
>>>>>
>>> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java?rev=1736072&r1=1736071&r2=1736072&view=diff
>>>>>
>>>> ==============================================================================
>>>>> ---
>>>>>
>>>> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>>>>> (original)
>>>>> +++
>>>>>
>>>> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>>>>> Mon Mar 21 18:17:03 2016
>>>>> @@ -393,6 +393,7 @@ public class TCPSampler extends Abstract
>>>>>           res.sampleStart();
>>>>>           try {
>>>>>               Socket sock = getSocket(socketKey);
>>>>> +            res.connectEnd();
>>>>>               if (sock == null) {
>>>>>                   res.setResponseCode("500"); //$NON-NLS-1$
>>>>>                   res.setResponseMessage(getError());
>>>>>
>>>>> Modified: jmeter/trunk/xdocs/changes.xml
>>>>> URL:
>>>>>
>>> http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1736072&r1=1736071&r2=1736072&view=diff
>>>>>
>>>> ==============================================================================
>>>>> --- jmeter/trunk/xdocs/changes.xml (original)
>>>>> +++ jmeter/trunk/xdocs/changes.xml Mon Mar 21 18:17:03 2016
>>>>> @@ -171,6 +171,7 @@ Summary
>>>>>       <li><bug>58300</bug> Make existing Java Samplers implement
>>>>> Interruptible</li>
>>>>>       <li><bug>58160</bug>JMS Publisher : reload file content if file
>>>> name
>>>>> changes. Based partly on a patch contributed by Maxime Chassagneux
>>>>> (maxime.chassagneux at gmail.com)</li>
>>>>>       <li><bug>58786</bug>JDBC Sampler : Replace Excalibur DataSource
>>>> by
>>>>> more up to date library commons-dbcp2</li>
>>>>> +    <li><bug>59205</bug>TCP Sampler: Set connect time in sampler
>>>> when
>>>>> connection is established.</li>
>>>>>   </ul>
>>>>>
>>>>>   <h3>Controllers</h3>
>>>>>
>>>>>
>>>>>
>>>
>>
>> --
>> Cordialement.
>> Philippe Mouawad.


Re: svn commit: r1736072 - in /jmeter/trunk: src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java xdocs/changes.xml

Posted by sebb <se...@gmail.com>.
What do we do for other samplers if the connect fails?

Do we document the behaviour?

is the value supposed to be the time to connect even if connect fails?

On 22 March 2016 at 19:32, Philippe Mouawad <ph...@gmail.com> wrote:
> In fact I don't know :-)
>
> In case of exception, connectEnd won't be called so for example, if issue
> is due to timeout, value will not be equal to timeout.
> Should we put it in a try/finally arount getSocket ?
> Thanks
>
> On Tue, Mar 22, 2016 at 8:29 PM, Felix Schumacher <
> felix.schumacher@internetallee.de> wrote:
>
>>
>>
>> Am 22. März 2016 20:22:22 MEZ, schrieb Philippe Mouawad <
>> philippe.mouawad@gmail.com>:
>> >Hi Felix,
>> >Do you think it is ok in case of Connection error ?
>>
>> Yes,  that is why I put connectEnd there. But feel free to place it
>> somewhere else. I wouldn't be angry.
>>
>> Regards,
>> Felix
>>
>> >
>> >Thank you
>> >Regards
>> >
>> >On Mon, Mar 21, 2016 at 7:17 PM, <fs...@apache.org> wrote:
>> >
>> >> Author: fschumacher
>> >> Date: Mon Mar 21 18:17:03 2016
>> >> New Revision: 1736072
>> >>
>> >> URL: http://svn.apache.org/viewvc?rev=1736072&view=rev
>> >> Log:
>> >> TCP Sampler: Set connect time in sampler when connection is
>> >established.
>> >>
>> >> Bugzilla Id: 59205
>> >>
>> >> Modified:
>> >>
>> >>
>>
>> >jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>> >>     jmeter/trunk/xdocs/changes.xml
>> >>
>> >> Modified:
>> >>
>>
>> >jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>> >> URL:
>> >>
>> >
>> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java?rev=1736072&r1=1736071&r2=1736072&view=diff
>> >>
>> >>
>>
>> >==============================================================================
>> >> ---
>> >>
>>
>> >jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>> >> (original)
>> >> +++
>> >>
>>
>> >jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>> >> Mon Mar 21 18:17:03 2016
>> >> @@ -393,6 +393,7 @@ public class TCPSampler extends Abstract
>> >>          res.sampleStart();
>> >>          try {
>> >>              Socket sock = getSocket(socketKey);
>> >> +            res.connectEnd();
>> >>              if (sock == null) {
>> >>                  res.setResponseCode("500"); //$NON-NLS-1$
>> >>                  res.setResponseMessage(getError());
>> >>
>> >> Modified: jmeter/trunk/xdocs/changes.xml
>> >> URL:
>> >>
>> >
>> http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1736072&r1=1736071&r2=1736072&view=diff
>> >>
>> >>
>>
>> >==============================================================================
>> >> --- jmeter/trunk/xdocs/changes.xml (original)
>> >> +++ jmeter/trunk/xdocs/changes.xml Mon Mar 21 18:17:03 2016
>> >> @@ -171,6 +171,7 @@ Summary
>> >>      <li><bug>58300</bug> Make existing Java Samplers implement
>> >> Interruptible</li>
>> >>      <li><bug>58160</bug>JMS Publisher : reload file content if file
>> >name
>> >> changes. Based partly on a patch contributed by Maxime Chassagneux
>> >> (maxime.chassagneux at gmail.com)</li>
>> >>      <li><bug>58786</bug>JDBC Sampler : Replace Excalibur DataSource
>> >by
>> >> more up to date library commons-dbcp2</li>
>> >> +    <li><bug>59205</bug>TCP Sampler: Set connect time in sampler
>> >when
>> >> connection is established.</li>
>> >>  </ul>
>> >>
>> >>  <h3>Controllers</h3>
>> >>
>> >>
>> >>
>>
>>
>
>
> --
> Cordialement.
> Philippe Mouawad.

Re: svn commit: r1736072 - in /jmeter/trunk: src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java xdocs/changes.xml

Posted by Philippe Mouawad <ph...@gmail.com>.
In fact I don't know :-)

In case of exception, connectEnd won't be called so for example, if issue
is due to timeout, value will not be equal to timeout.
Should we put it in a try/finally arount getSocket ?
Thanks

On Tue, Mar 22, 2016 at 8:29 PM, Felix Schumacher <
felix.schumacher@internetallee.de> wrote:

>
>
> Am 22. März 2016 20:22:22 MEZ, schrieb Philippe Mouawad <
> philippe.mouawad@gmail.com>:
> >Hi Felix,
> >Do you think it is ok in case of Connection error ?
>
> Yes,  that is why I put connectEnd there. But feel free to place it
> somewhere else. I wouldn't be angry.
>
> Regards,
> Felix
>
> >
> >Thank you
> >Regards
> >
> >On Mon, Mar 21, 2016 at 7:17 PM, <fs...@apache.org> wrote:
> >
> >> Author: fschumacher
> >> Date: Mon Mar 21 18:17:03 2016
> >> New Revision: 1736072
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1736072&view=rev
> >> Log:
> >> TCP Sampler: Set connect time in sampler when connection is
> >established.
> >>
> >> Bugzilla Id: 59205
> >>
> >> Modified:
> >>
> >>
>
> >jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> >>     jmeter/trunk/xdocs/changes.xml
> >>
> >> Modified:
> >>
>
> >jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> >> URL:
> >>
> >
> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java?rev=1736072&r1=1736071&r2=1736072&view=diff
> >>
> >>
>
> >==============================================================================
> >> ---
> >>
>
> >jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> >> (original)
> >> +++
> >>
>
> >jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> >> Mon Mar 21 18:17:03 2016
> >> @@ -393,6 +393,7 @@ public class TCPSampler extends Abstract
> >>          res.sampleStart();
> >>          try {
> >>              Socket sock = getSocket(socketKey);
> >> +            res.connectEnd();
> >>              if (sock == null) {
> >>                  res.setResponseCode("500"); //$NON-NLS-1$
> >>                  res.setResponseMessage(getError());
> >>
> >> Modified: jmeter/trunk/xdocs/changes.xml
> >> URL:
> >>
> >
> http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1736072&r1=1736071&r2=1736072&view=diff
> >>
> >>
>
> >==============================================================================
> >> --- jmeter/trunk/xdocs/changes.xml (original)
> >> +++ jmeter/trunk/xdocs/changes.xml Mon Mar 21 18:17:03 2016
> >> @@ -171,6 +171,7 @@ Summary
> >>      <li><bug>58300</bug> Make existing Java Samplers implement
> >> Interruptible</li>
> >>      <li><bug>58160</bug>JMS Publisher : reload file content if file
> >name
> >> changes. Based partly on a patch contributed by Maxime Chassagneux
> >> (maxime.chassagneux at gmail.com)</li>
> >>      <li><bug>58786</bug>JDBC Sampler : Replace Excalibur DataSource
> >by
> >> more up to date library commons-dbcp2</li>
> >> +    <li><bug>59205</bug>TCP Sampler: Set connect time in sampler
> >when
> >> connection is established.</li>
> >>  </ul>
> >>
> >>  <h3>Controllers</h3>
> >>
> >>
> >>
>
>


-- 
Cordialement.
Philippe Mouawad.

Re: svn commit: r1736072 - in /jmeter/trunk: src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java xdocs/changes.xml

Posted by Felix Schumacher <fe...@internetallee.de>.

Am 22. März 2016 20:22:22 MEZ, schrieb Philippe Mouawad <ph...@gmail.com>:
>Hi Felix,
>Do you think it is ok in case of Connection error ?

Yes,  that is why I put connectEnd there. But feel free to place it somewhere else. I wouldn't be angry.

Regards, 
Felix 

>
>Thank you
>Regards
>
>On Mon, Mar 21, 2016 at 7:17 PM, <fs...@apache.org> wrote:
>
>> Author: fschumacher
>> Date: Mon Mar 21 18:17:03 2016
>> New Revision: 1736072
>>
>> URL: http://svn.apache.org/viewvc?rev=1736072&view=rev
>> Log:
>> TCP Sampler: Set connect time in sampler when connection is
>established.
>>
>> Bugzilla Id: 59205
>>
>> Modified:
>>
>>
>jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>>     jmeter/trunk/xdocs/changes.xml
>>
>> Modified:
>>
>jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>> URL:
>>
>http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java?rev=1736072&r1=1736071&r2=1736072&view=diff
>>
>>
>==============================================================================
>> ---
>>
>jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>> (original)
>> +++
>>
>jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>> Mon Mar 21 18:17:03 2016
>> @@ -393,6 +393,7 @@ public class TCPSampler extends Abstract
>>          res.sampleStart();
>>          try {
>>              Socket sock = getSocket(socketKey);
>> +            res.connectEnd();
>>              if (sock == null) {
>>                  res.setResponseCode("500"); //$NON-NLS-1$
>>                  res.setResponseMessage(getError());
>>
>> Modified: jmeter/trunk/xdocs/changes.xml
>> URL:
>>
>http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1736072&r1=1736071&r2=1736072&view=diff
>>
>>
>==============================================================================
>> --- jmeter/trunk/xdocs/changes.xml (original)
>> +++ jmeter/trunk/xdocs/changes.xml Mon Mar 21 18:17:03 2016
>> @@ -171,6 +171,7 @@ Summary
>>      <li><bug>58300</bug> Make existing Java Samplers implement
>> Interruptible</li>
>>      <li><bug>58160</bug>JMS Publisher : reload file content if file
>name
>> changes. Based partly on a patch contributed by Maxime Chassagneux
>> (maxime.chassagneux at gmail.com)</li>
>>      <li><bug>58786</bug>JDBC Sampler : Replace Excalibur DataSource
>by
>> more up to date library commons-dbcp2</li>
>> +    <li><bug>59205</bug>TCP Sampler: Set connect time in sampler
>when
>> connection is established.</li>
>>  </ul>
>>
>>  <h3>Controllers</h3>
>>
>>
>>


Re: svn commit: r1736072 - in /jmeter/trunk: src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java xdocs/changes.xml

Posted by Philippe Mouawad <ph...@gmail.com>.
Hi Felix,
Do you think it is ok in case of Connection error ?

Thank you
Regards

On Mon, Mar 21, 2016 at 7:17 PM, <fs...@apache.org> wrote:

> Author: fschumacher
> Date: Mon Mar 21 18:17:03 2016
> New Revision: 1736072
>
> URL: http://svn.apache.org/viewvc?rev=1736072&view=rev
> Log:
> TCP Sampler: Set connect time in sampler when connection is established.
>
> Bugzilla Id: 59205
>
> Modified:
>
> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
>     jmeter/trunk/xdocs/changes.xml
>
> Modified:
> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> URL:
> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java?rev=1736072&r1=1736071&r2=1736072&view=diff
>
> ==============================================================================
> ---
> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> (original)
> +++
> jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> Mon Mar 21 18:17:03 2016
> @@ -393,6 +393,7 @@ public class TCPSampler extends Abstract
>          res.sampleStart();
>          try {
>              Socket sock = getSocket(socketKey);
> +            res.connectEnd();
>              if (sock == null) {
>                  res.setResponseCode("500"); //$NON-NLS-1$
>                  res.setResponseMessage(getError());
>
> Modified: jmeter/trunk/xdocs/changes.xml
> URL:
> http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1736072&r1=1736071&r2=1736072&view=diff
>
> ==============================================================================
> --- jmeter/trunk/xdocs/changes.xml (original)
> +++ jmeter/trunk/xdocs/changes.xml Mon Mar 21 18:17:03 2016
> @@ -171,6 +171,7 @@ Summary
>      <li><bug>58300</bug> Make existing Java Samplers implement
> Interruptible</li>
>      <li><bug>58160</bug>JMS Publisher : reload file content if file name
> changes. Based partly on a patch contributed by Maxime Chassagneux
> (maxime.chassagneux at gmail.com)</li>
>      <li><bug>58786</bug>JDBC Sampler : Replace Excalibur DataSource by
> more up to date library commons-dbcp2</li>
> +    <li><bug>59205</bug>TCP Sampler: Set connect time in sampler when
> connection is established.</li>
>  </ul>
>
>  <h3>Controllers</h3>
>
>
>


-- 
Cordialement.
Philippe Mouawad.