On 22 March 2016 at 20:27, Felix Schumacher <felix.schumac...@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.moua...@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.schumac...@internetallee.de> wrote: >>> >>>> >>>> Am 22. März 2016 20:22:22 MEZ, schrieb Philippe Mouawad < >>>> philippe.moua...@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, <fschumac...@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. > >