jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Schumacher <felix.schumac...@internetallee.de>
Subject Re: svn commit: r1649629 - in /jmeter/trunk: bin/ bin/testfiles/ src/components/org/apache/jmeter/visualizers/ src/core/org/apache/jmeter/control/ src/core/org/apache/jmeter/resources/ src/core/org/apache/jmeter/samplers/ src/core/org/apache/jmeter/save/ s...
Date Tue, 06 Jan 2015 08:54:21 GMT
Hi Andrey,

I have only a few nitpicks.

In  the constructor of MeasuringConnectionManager I would rename the 
variable aDefault to something like schemeRegistry.

The javadoc for the private class MeasuringConnectionRequest starts with 
"And", but I believe you meant "An".

In the glossary you wrote "estable", but I think it should be "establish".

In listeners.xml there is a note about "not all samplers support this", 
as I see it by now only httpclient 4 supports it ;)

Thanks for your first commit.

Felix

Am 05.01.2015 um 20:49 schrieb undera@apache.org:
> Author: undera
> Date: Mon Jan  5 19:49:06 2015
> New Revision: 1649629
>
> URL: http://svn.apache.org/r1649629
> Log:
> 48799 - Add connect time to output metrics
>
> Added:
>      jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/MeasuringConnectionManager.java
> Modified:
>      jmeter/trunk/bin/jmeter.properties
>      jmeter/trunk/bin/testfiles/AssertionTestPlan.jmx
>      jmeter/trunk/bin/testfiles/AuthManagerTestPlan.jmx
>      jmeter/trunk/bin/testfiles/GenTest210.jmx
>      jmeter/trunk/bin/testfiles/GenTest27.jmx
>      jmeter/trunk/bin/testfiles/GuiTest.jmx
>      jmeter/trunk/bin/testfiles/GuiTest231.jmx
>      jmeter/trunk/bin/testfiles/HeaderManagerTestPlan.jmx
>      jmeter/trunk/bin/testfiles/InterleaveTestPlan.jmx
>      jmeter/trunk/bin/testfiles/InterleaveTestPlan2.jmx
>      jmeter/trunk/bin/testfiles/LoopTestPlan.jmx
>      jmeter/trunk/bin/testfiles/OnceOnlyTestPlan.jmx
>      jmeter/trunk/bin/testfiles/SimpleTestPlan.jmx
>      jmeter/trunk/src/components/org/apache/jmeter/visualizers/SamplerResultTab.java
>      jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java
>      jmeter/trunk/src/core/org/apache/jmeter/control/TransactionController.java
>      jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
>      jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
>      jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java
>      jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java
>      jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java
>      jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleResultConverter.java
>      jmeter/trunk/src/core/org/apache/jmeter/visualizers/TableSample.java
>      jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
>      jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
>      jmeter/trunk/xdocs/changes.xml
>      jmeter/trunk/xdocs/usermanual/glossary.xml
>      jmeter/trunk/xdocs/usermanual/listeners.xml
>
> Modified: jmeter/trunk/bin/jmeter.properties
> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter.properties?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/bin/jmeter.properties (original)
> +++ jmeter/trunk/bin/jmeter.properties Mon Jan  5 19:49:06 2015
> @@ -465,6 +465,7 @@ log_level.jorphan=INFO
>   #jmeter.save.saveservice.subresults=true
>   #jmeter.save.saveservice.assertions=true
>   #jmeter.save.saveservice.latency=true
> +#jmeter.save.saveservice.connect_time=false
>   #jmeter.save.saveservice.samplerData=false
>   #jmeter.save.saveservice.responseHeaders=false
>   #jmeter.save.saveservice.requestHeaders=false
>
> Modified: jmeter/trunk/bin/testfiles/AssertionTestPlan.jmx
> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/AssertionTestPlan.jmx?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/bin/testfiles/AssertionTestPlan.jmx (original)
> +++ jmeter/trunk/bin/testfiles/AssertionTestPlan.jmx Mon Jan  5 19:49:06 2015
> @@ -60,6 +60,7 @@
>               <value class="SampleSaveConfiguration">
>                 <time>true</time>
>                 <latency>true</latency>
> +              <connectTime>false</connectTime>
>                 <timestamp>true</timestamp>
>                 <success>true</success>
>                 <label>true</label>
> @@ -91,6 +92,7 @@
>               <value class="SampleSaveConfiguration">
>                 <time>true</time>
>                 <latency>true</latency>
> +              <connectTime>false</connectTime>
>                 <timestamp>true</timestamp>
>                 <success>true</success>
>                 <label>true</label>
>
> Modified: jmeter/trunk/bin/testfiles/AuthManagerTestPlan.jmx
> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/AuthManagerTestPlan.jmx?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/bin/testfiles/AuthManagerTestPlan.jmx (original)
> +++ jmeter/trunk/bin/testfiles/AuthManagerTestPlan.jmx Mon Jan  5 19:49:06 2015
> @@ -106,6 +106,7 @@
>               <value class="SampleSaveConfiguration">
>                 <time>true</time>
>                 <latency>true</latency>
> +              <connectTime>false</connectTime>
>                 <timestamp>true</timestamp>
>                 <success>true</success>
>                 <label>true</label>
>
> Modified: jmeter/trunk/bin/testfiles/GenTest210.jmx
> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/GenTest210.jmx?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/bin/testfiles/GenTest210.jmx (original)
> +++ jmeter/trunk/bin/testfiles/GenTest210.jmx Mon Jan  5 19:49:06 2015
> @@ -970,6 +970,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1002,6 +1003,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1034,6 +1036,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1080,6 +1083,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1112,6 +1116,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1146,6 +1151,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1186,6 +1192,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1227,6 +1234,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1259,6 +1267,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1299,6 +1308,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1331,6 +1341,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1363,6 +1374,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1395,6 +1407,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1427,6 +1440,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
>
> Modified: jmeter/trunk/bin/testfiles/GenTest27.jmx
> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/GenTest27.jmx?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/bin/testfiles/GenTest27.jmx (original)
> +++ jmeter/trunk/bin/testfiles/GenTest27.jmx Mon Jan  5 19:49:06 2015
> @@ -942,6 +942,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -974,6 +975,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1006,6 +1008,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1052,6 +1055,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1084,6 +1088,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1118,6 +1123,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1157,6 +1163,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1198,6 +1205,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1238,6 +1246,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1270,6 +1279,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1302,6 +1312,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1334,6 +1345,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1366,6 +1378,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
>
> Modified: jmeter/trunk/bin/testfiles/GuiTest.jmx
> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/GuiTest.jmx?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/bin/testfiles/GuiTest.jmx (original)
> +++ jmeter/trunk/bin/testfiles/GuiTest.jmx Mon Jan  5 19:49:06 2015
> @@ -189,6 +189,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -220,6 +221,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -251,6 +253,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -282,6 +285,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -313,6 +317,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -344,6 +349,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -375,6 +381,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
>
> Modified: jmeter/trunk/bin/testfiles/GuiTest231.jmx
> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/GuiTest231.jmx?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/bin/testfiles/GuiTest231.jmx (original)
> +++ jmeter/trunk/bin/testfiles/GuiTest231.jmx Mon Jan  5 19:49:06 2015
> @@ -787,6 +787,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -825,6 +826,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -857,6 +859,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -889,6 +892,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -930,6 +934,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -962,6 +967,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -994,6 +1000,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1026,6 +1033,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1058,6 +1066,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1090,6 +1099,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1122,6 +1132,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
> @@ -1154,6 +1165,7 @@
>                 <value class="SampleSaveConfiguration">
>                   <time>true</time>
>                   <latency>true</latency>
> +                <connectTime>false</connectTime>
>                   <timestamp>true</timestamp>
>                   <success>true</success>
>                   <label>true</label>
>
> Modified: jmeter/trunk/bin/testfiles/HeaderManagerTestPlan.jmx
> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/HeaderManagerTestPlan.jmx?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/bin/testfiles/HeaderManagerTestPlan.jmx (original)
> +++ jmeter/trunk/bin/testfiles/HeaderManagerTestPlan.jmx Mon Jan  5 19:49:06 2015
> @@ -59,6 +59,7 @@
>               <value class="SampleSaveConfiguration">
>                 <time>true</time>
>                 <latency>true</latency>
> +              <connectTime>false</connectTime>
>                 <timestamp>true</timestamp>
>                 <success>true</success>
>                 <label>true</label>
>
> Modified: jmeter/trunk/bin/testfiles/InterleaveTestPlan.jmx
> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/InterleaveTestPlan.jmx?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/bin/testfiles/InterleaveTestPlan.jmx (original)
> +++ jmeter/trunk/bin/testfiles/InterleaveTestPlan.jmx Mon Jan  5 19:49:06 2015
> @@ -99,6 +99,7 @@
>               <value class="SampleSaveConfiguration">
>                 <time>true</time>
>                 <latency>true</latency>
> +              <connectTime>false</connectTime>
>                 <timestamp>true</timestamp>
>                 <success>true</success>
>                 <label>true</label>
>
> Modified: jmeter/trunk/bin/testfiles/InterleaveTestPlan2.jmx
> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/InterleaveTestPlan2.jmx?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/bin/testfiles/InterleaveTestPlan2.jmx (original)
> +++ jmeter/trunk/bin/testfiles/InterleaveTestPlan2.jmx Mon Jan  5 19:49:06 2015
> @@ -126,6 +126,7 @@
>               <value class="SampleSaveConfiguration">
>                 <time>true</time>
>                 <latency>true</latency>
> +              <connectTime>false</connectTime>
>                 <timestamp>true</timestamp>
>                 <success>true</success>
>                 <label>true</label>
>
> Modified: jmeter/trunk/bin/testfiles/LoopTestPlan.jmx
> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/LoopTestPlan.jmx?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/bin/testfiles/LoopTestPlan.jmx (original)
> +++ jmeter/trunk/bin/testfiles/LoopTestPlan.jmx Mon Jan  5 19:49:06 2015
> @@ -83,6 +83,7 @@
>               <value class="SampleSaveConfiguration">
>                 <time>true</time>
>                 <latency>true</latency>
> +              <connectTime>false</connectTime>
>                 <timestamp>true</timestamp>
>                 <success>true</success>
>                 <label>true</label>
>
> Modified: jmeter/trunk/bin/testfiles/OnceOnlyTestPlan.jmx
> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/OnceOnlyTestPlan.jmx?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/bin/testfiles/OnceOnlyTestPlan.jmx (original)
> +++ jmeter/trunk/bin/testfiles/OnceOnlyTestPlan.jmx Mon Jan  5 19:49:06 2015
> @@ -80,6 +80,7 @@
>               <value class="SampleSaveConfiguration">
>                 <time>true</time>
>                 <latency>true</latency>
> +              <connectTime>false</connectTime>
>                 <timestamp>true</timestamp>
>                 <success>true</success>
>                 <label>true</label>
>
> Modified: jmeter/trunk/bin/testfiles/SimpleTestPlan.jmx
> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/SimpleTestPlan.jmx?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/bin/testfiles/SimpleTestPlan.jmx (original)
> +++ jmeter/trunk/bin/testfiles/SimpleTestPlan.jmx Mon Jan  5 19:49:06 2015
> @@ -117,6 +117,7 @@
>               <value class="SampleSaveConfiguration">
>                 <time>true</time>
>                 <latency>true</latency>
> +              <connectTime>false</connectTime>
>                 <timestamp>true</timestamp>
>                 <success>true</success>
>                 <label>true</label>
>
> Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/SamplerResultTab.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SamplerResultTab.java?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/src/components/org/apache/jmeter/visualizers/SamplerResultTab.java (original)
> +++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/SamplerResultTab.java Mon Jan  5 19:49:06 2015
> @@ -229,6 +229,7 @@ public abstract class SamplerResultTab i
>                   String startTime = dateFormat.format(new Date(sampleResult.getStartTime()));
>                   statsBuff.append(JMeterUtils.getResString("view_results_sample_start")).append(startTime).append(NL); //$NON-NLS-1$
>                   statsBuff.append(JMeterUtils.getResString("view_results_load_time")).append(sampleResult.getTime()).append(NL); //$NON-NLS-1$
> +                statsBuff.append(JMeterUtils.getResString("view_results_connect_time")).append(sampleResult.getConnectTime()).append(NL); //$NON-NLS-1$
>                   statsBuff.append(JMeterUtils.getResString("view_results_latency")).append(sampleResult.getLatency()).append(NL); //$NON-NLS-1$
>                   statsBuff.append(JMeterUtils.getResString("view_results_size_in_bytes")).append(sampleResult.getBytes()).append(NL); //$NON-NLS-1$
>                   statsBuff.append(JMeterUtils.getResString("view_results_size_headers_in_bytes")).append(sampleResult.getHeadersSize()).append(NL); //$NON-NLS-1$
>
> Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java (original)
> +++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java Mon Jan  5 19:49:06 2015
> @@ -81,7 +81,8 @@ public class TableVisualizer extends Abs
>               "table_visualizer_sample_time", // $NON-NLS-1$
>               "table_visualizer_status",      // $NON-NLS-1$
>               "table_visualizer_bytes",       // $NON-NLS-1$
> -            "table_visualizer_latency"};    // $NON-NLS-1$
> +            "table_visualizer_latency",     // $NON-NLS-1$
> +            "table_visualizer_connect"};    // $NON-NLS-1$
>   
>       private ObjectTableModel model = null;
>   
> @@ -125,18 +126,19 @@ public class TableVisualizer extends Abs
>           model = new ObjectTableModel(COLUMNS,
>                   TableSample.class,         // The object used for each row
>                   new Functor[] {
> -                new Functor("getSampleNumberString"), // $NON-NLS-1$
> -                new Functor("getStartTimeFormatted",  // $NON-NLS-1$
> +                new Functor("getSampleNumberString"),  // $NON-NLS-1$
> +                new Functor("getStartTimeFormatted",   // $NON-NLS-1$
>                           new Object[]{format}),
> -                new Functor("getThreadName"), // $NON-NLS-1$
> -                new Functor("getLabel"), // $NON-NLS-1$
> -                new Functor("getElapsed"), // $NON-NLS-1$
> +                new Functor("getThreadName"),          // $NON-NLS-1$
> +                new Functor("getLabel"),               // $NON-NLS-1$
> +                new Functor("getElapsed"),             // $NON-NLS-1$
>                   new SampleSuccessFunctor("isSuccess"), // $NON-NLS-1$
> -                new Functor("getBytes"), // $NON-NLS-1$
> -                new Functor("getLatency") }, // $NON-NLS-1$
> -                new Functor[] { null, null, null, null, null, null, null, null },
> +                new Functor("getBytes"),               // $NON-NLS-1$
> +                new Functor("getLatency"),             // $NON-NLS-1$
> +                new Functor("getConnectTime") },       // $NON-NLS-1$
> +                new Functor[] { null, null, null, null, null, null, null, null, null },
>                   new Class[] {
> -                String.class, String.class, String.class, String.class, Long.class, ImageIcon.class, Long.class, Long.class });
> +                String.class, String.class, String.class, String.class, Long.class, ImageIcon.class, Long.class, Long.class, Long.class });
>           init();
>       }
>   
> @@ -188,7 +190,9 @@ public class TableVisualizer extends Abs
>                               res.getTime(),
>                               res.isSuccessful(),
>                               res.getBytes(),
> -                            res.getLatency());
> +                            res.getLatency(),
> +                            res.getConnectTime()
> +                            );
>                       model.addRow(newS);
>                   }
>                   updateTextFields(res);
>
> Modified: jmeter/trunk/src/core/org/apache/jmeter/control/TransactionController.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/control/TransactionController.java?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/src/core/org/apache/jmeter/control/TransactionController.java (original)
> +++ jmeter/trunk/src/core/org/apache/jmeter/control/TransactionController.java Mon Jan  5 19:49:06 2015
> @@ -291,6 +291,7 @@ public class TransactionController exten
>                   res.setAllThreads(sampleResult.getAllThreads());
>                   res.setGroupThreads(sampleResult.getGroupThreads());
>                   res.setLatency(res.getLatency() + sampleResult.getLatency());
> +                res.setConnectTime(res.getConnectTime() + sampleResult.getConnectTime());
>               }
>           }
>       }
>
> Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties (original)
> +++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Mon Jan  5 19:49:06 2015
> @@ -906,6 +906,7 @@ save_hostname=Save Hostname
>   save_idletime=Save Idle Time
>   save_label=Save Label
>   save_latency=Save Latency
> +save_connecttime=Save Connect Time
>   save_message=Save Response Message
>   save_overwrite_existing_file=The selected file already exists, do you want to overwrite it?
>   save_requestheaders=Save Request Headers (XML)
> @@ -1072,6 +1073,7 @@ system_sampler_stdout=Standard output (s
>   system_sampler_title=OS Process Sampler
>   table_visualizer_bytes=Bytes
>   table_visualizer_latency=Latency
> +table_visualizer_connect=Connect
>   table_visualizer_sample_num=Sample #
>   table_visualizer_sample_time=Sample Time(ms)
>   table_visualizer_start_time=Start Time
> @@ -1196,6 +1198,7 @@ view_results_error_count=Error Count:
>   view_results_fields=fields:
>   view_results_in_table=View Results in Table
>   view_results_latency=Latency:
> +view_results_connect_time=Connect Time:
>   view_results_load_time=Load time:
>   view_results_render=Render:
>   view_results_render_document=Document
>
> Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java (original)
> +++ jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java Mon Jan  5 19:49:06 2015
> @@ -178,7 +178,12 @@ public class SampleResult implements Ser
>   
>       /** time to first response */
>       private long latency = 0;
> -
> +
> +    /**
> +     * time to end connecting
> +     */
> +    private long connectTime = 0;
> +
>       /** Should thread start next iteration ? */
>       private boolean startNextThreadLoop = false;
>   
> @@ -301,6 +306,7 @@ public class SampleResult implements Ser
>           isMonitor = res.isMonitor;
>           label = res.label;//OK
>           latency = res.latency;
> +        connectTime = res.connectTime;
>           location = res.location;//OK
>           parent = res.parent; // TODO ??
>           pauseTime = res.pauseTime;
> @@ -1207,6 +1213,29 @@ public class SampleResult implements Ser
>       }
>   
>       /**
> +     * @return Returns the connect time.
> +     */
> +    public long getConnectTime() {
> +        return connectTime;
> +    }
> +
> +    /**
> +     * Set the time to the end of connecting
> +     */
> +    public void connectEnd() {
> +        connectTime = currentTimeInMillis() - startTime - idleTime;
> +    }
> +
> +    /**
> +     * This is only intended for use by SampleResultConverter!
> +     *
> +     * @param time The connect time to set.
> +     */
> +    public void setConnectTime(long time) {
> +        this.connectTime = time;
> +    }
> +
> +    /**
>        * This is only intended for use by SampleResultConverter!
>        *
>        * @param timeStamp
>
> Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java (original)
> +++ jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java Mon Jan  5 19:49:06 2015
> @@ -198,6 +198,7 @@ public class SampleSaveConfiguration imp
>       private static final String SUBRESULTS_PROP      = "jmeter.save.saveservice.subresults"; // $NON_NLS-1$
>       private static final String ASSERTIONS_PROP      = "jmeter.save.saveservice.assertions"; // $NON_NLS-1$
>       private static final String LATENCY_PROP         = "jmeter.save.saveservice.latency"; // $NON_NLS-1$
> +    private static final String CONNECT_TIME_PROP    = "jmeter.save.saveservice.connect_time"; // $NON_NLS-1$
>       private static final String SAMPLERDATA_PROP     = "jmeter.save.saveservice.samplerData"; // $NON_NLS-1$
>       private static final String RESPONSEHEADERS_PROP = "jmeter.save.saveservice.responseHeaders"; // $NON_NLS-1$
>       private static final String REQUESTHEADERS_PROP  = "jmeter.save.saveservice.requestHeaders"; // $NON_NLS-1$
> @@ -216,7 +217,7 @@ public class SampleSaveConfiguration imp
>       // N.B. Remember to update the equals and hashCode methods when adding new variables.
>   
>       // Initialise values from properties
> -    private boolean time = _time, latency = _latency, timestamp = _timestamp, success = _success, label = _label,
> +    private boolean time = _time, latency = _latency, connectTime=_connectTime, timestamp = _timestamp, success = _success, label = _label,
>               code = _code, message = _message, threadName = _threadName, dataType = _dataType, encoding = _encoding,
>               assertions = _assertions, subresults = _subresults, responseData = _responseData,
>               samplerData = _samplerData, xml = _xml, fieldNames = _fieldNames, responseHeaders = _responseHeaders,
> @@ -250,7 +251,7 @@ public class SampleSaveConfiguration imp
>   
>       // Defaults from properties:
>       private static final boolean _time, _timestamp, _success, _label, _code, _message, _threadName, _xml,
> -            _responseData, _dataType, _encoding, _assertions, _latency, _subresults, _samplerData, _fieldNames,
> +            _responseData, _dataType, _encoding, _assertions, _latency, _connectTime, _subresults, _samplerData, _fieldNames,
>               _responseHeaders, _requestHeaders;
>   
>       private static final boolean _responseDataOnError;
> @@ -303,6 +304,7 @@ public class SampleSaveConfiguration imp
>           _subresults      = TRUE.equalsIgnoreCase(props.getProperty(SUBRESULTS_PROP, TRUE));
>           _assertions      = TRUE.equalsIgnoreCase(props.getProperty(ASSERTIONS_PROP, TRUE));
>           _latency         = TRUE.equalsIgnoreCase(props.getProperty(LATENCY_PROP, TRUE));
> +        _connectTime     = TRUE.equalsIgnoreCase(props.getProperty(CONNECT_TIME_PROP, FALSE));
>           _samplerData     = TRUE.equalsIgnoreCase(props.getProperty(SAMPLERDATA_PROP, FALSE));
>           _responseHeaders = TRUE.equalsIgnoreCase(props.getProperty(RESPONSEHEADERS_PROP, FALSE));
>           _requestHeaders  = TRUE.equalsIgnoreCase(props.getProperty(REQUESTHEADERS_PROP, FALSE));
> @@ -441,6 +443,7 @@ public class SampleSaveConfiguration imp
>           hostname = value;
>           label = value;
>           latency = value;
> +        connectTime = value;
>           message = value;
>           printMilliseconds = _printMilliseconds;//is derived from properties only
>           requestHeaders = value;
> @@ -491,6 +494,7 @@ public class SampleSaveConfiguration imp
>           SampleSaveConfiguration s = (SampleSaveConfiguration)obj;
>           boolean primitiveValues = s.time == time &&
>               s.latency == latency &&
> +            s.connectTime == connectTime &&
>               s.timestamp == timestamp &&
>               s.success == success &&
>               s.label == label &&
> @@ -536,6 +540,7 @@ public class SampleSaveConfiguration imp
>           int hash = 7;
>           hash = 31 * hash + (time ? 1 : 0);
>           hash = 31 * hash + (latency ? 1 : 0);
> +        hash = 31 * hash + (connectTime ? 1 : 0);
>           hash = 31 * hash + (timestamp ? 1 : 0);
>           hash = 31 * hash + (success ? 1 : 0);
>           hash = 31 * hash + (label ? 1 : 0);
> @@ -635,6 +640,14 @@ public class SampleSaveConfiguration imp
>           this.latency = latency;
>       }
>   
> +    public boolean saveConnectTime() {
> +        return connectTime;
> +    }
> +
> +    public void setConnectTime(boolean connectTime) {
> +        this.connectTime = connectTime;
> +    }
> +
>       public boolean saveMessage() {
>           return message;
>       }
>
> Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java (original)
> +++ jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java Mon Jan  5 19:49:06 2015
> @@ -101,6 +101,7 @@ public class StatisticalSampleResult ext
>           this.setEndTime(Math.max(getEndTime(), res.getEndTime()));
>   
>           setLatency(getLatency()+ res.getLatency());
> +        setConnectTime(getConnectTime()+ res.getConnectTime());
>   
>           elapsed += res.getTime();
>       }
>
> Modified: jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java (original)
> +++ jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java Mon Jan  5 19:49:06 2015
> @@ -87,6 +87,7 @@ public final class CSVSaveService {
>       private static final String CSV_URL = "URL"; // $NON-NLS-1$
>       private static final String CSV_FILENAME = "Filename"; // $NON-NLS-1$
>       private static final String CSV_LATENCY = "Latency"; // $NON-NLS-1$
> +    private static final String CSV_CONNECT_TIME = "Connect"; // $NON-NLS-1$
>       private static final String CSV_ENCODING = "Encoding"; // $NON-NLS-1$
>       private static final String CSV_HOSTNAME = "Hostname"; // $NON-NLS-1$
>       private static final String CSV_IDLETIME = "IdleTime"; // $NON-NLS-1$
> @@ -350,6 +351,11 @@ public final class CSVSaveService {
>                   text = parts[i++];
>                   result.setIdleTime(Long.parseLong(text));
>               }
> +            if (saveConfig.saveConnectTime()) {
> +                field = CSV_CONNECT_TIME;
> +                text = parts[i++];
> +                result.setConnectTime(Long.parseLong(text));
> +            }
>   
>               if (i + saveConfig.getVarCount() < parts.length) {
>                   log.warn("Line: " + lineNumber + ". Found " + parts.length
> @@ -488,6 +494,11 @@ public final class CSVSaveService {
>               text.append(delim);
>           }
>   
> +        if (saveConfig.saveConnectTime()) {
> +            text.append(CSV_CONNECT_TIME);
> +            text.append(delim);
> +        }
> +
>           for (int i = 0; i < SampleEvent.getVarCount(); i++) {
>               text.append(VARIABLE_NAME_QUOTE_CHAR);
>               text.append(SampleEvent.getVarName(i));
> @@ -541,6 +552,7 @@ public final class CSVSaveService {
>           headerLabelMethods.put(CSV_ERROR_COUNT, new Functor("setSampleCount"));
>           headerLabelMethods.put(CSV_HOSTNAME, new Functor("setHostname"));
>           headerLabelMethods.put(CSV_IDLETIME, new Functor("setIdleTime"));
> +        headerLabelMethods.put(CSV_CONNECT_TIME, new Functor("setConnectTime"));
>       }
>   
>       /**
> @@ -951,6 +963,10 @@ public final class CSVSaveService {
>               text.append(event.getResult().getIdleTime());
>           }
>   
> +        if (saveConfig.saveConnectTime()) {
> +            text.append(sample.getConnectTime());
> +        }
> +
>           for (int i = 0; i < SampleEvent.getVarCount(); i++) {
>               text.append(event.getVarValue(i));
>           }
>
> Modified: jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleResultConverter.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleResultConverter.java?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleResultConverter.java (original)
> +++ jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleResultConverter.java Mon Jan  5 19:49:06 2015
> @@ -77,6 +77,7 @@ public class SampleResultConverter exten
>       private static final String ATT_HOSTNAME          = "hn"; //$NON-NLS-1$
>       private static final String ATT_LABEL             = "lb"; //$NON-NLS-1$
>       private static final String ATT_LATENCY           = "lt"; //$NON-NLS-1$
> +    private static final String ATT_CONNECT_TIME      = "ct"; //$NON-NLS-1$
>   
>       private static final String ATT_ALL_THRDS         = "na"; //$NON-NLS-1$
>       private static final String ATT_GRP_THRDS         = "ng"; //$NON-NLS-1$
> @@ -291,6 +292,9 @@ public class SampleResultConverter exten
>           if (save.saveLatency()) {
>               writer.addAttribute(ATT_LATENCY, Long.toString(res.getLatency()));
>           }
> +        if (save.saveConnectTime()) {
> +            writer.addAttribute(ATT_CONNECT_TIME, Long.toString(res.getConnectTime()));
> +        }
>           if (save.saveTimestamp()) {
>               writer.addAttribute(ATT_TIME_STAMP, Long.toString(res.getTimeStamp()));
>           }
> @@ -441,6 +445,7 @@ public class SampleResultConverter exten
>                   Converter.getLong(reader.getAttribute(ATT_TIME)));
>           res.setIdleTime(Converter.getLong(reader.getAttribute(ATT_IDLETIME)));
>           res.setLatency(Converter.getLong(reader.getAttribute(ATT_LATENCY)));
> +        res.setConnectTime(Converter.getLong(reader.getAttribute(ATT_CONNECT_TIME)));
>           res.setBytes(Converter.getInt(reader.getAttribute(ATT_BYTES)));
>           res.setSampleCount(Converter.getInt(reader.getAttribute(ATT_SAMPLE_COUNT),1)); // default is 1
>           res.setErrorCount(Converter.getInt(reader.getAttribute(ATT_ERROR_COUNT),0)); // default is 0
>
> Modified: jmeter/trunk/src/core/org/apache/jmeter/visualizers/TableSample.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/visualizers/TableSample.java?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/src/core/org/apache/jmeter/visualizers/TableSample.java (original)
> +++ jmeter/trunk/src/core/org/apache/jmeter/visualizers/TableSample.java Mon Jan  5 19:49:06 2015
> @@ -46,17 +46,19 @@ public class TableSample implements Seri
>   
>       private final long latency;
>   
> +    private final long connect;
> +
>       /**
>        * @deprecated for unit test code only
>        */
>       @Deprecated
>       public TableSample() {
> -        this(0, 1, 0, "", "", 0, true, 0, 0);
> +        this(0, 1, 0, "", "", 0, true, 0, 0, 0);
>       }
>   
>       public TableSample(long totalSamples, int sampleCount, long startTime, String threadName,
>               String label,
> -            long elapsed, boolean success, long bytes, long latency) {
> +            long elapsed, boolean success, long bytes, long latency, long connect) {
>           this.totalSamples = totalSamples;
>           this.sampleCount = sampleCount;
>           this.startTime = startTime;
> @@ -67,6 +69,7 @@ public class TableSample implements Seri
>           this.bytes =  (sampleCount > 0) ? bytes/sampleCount : 0;
>           this.success = success;
>           this.latency = latency;
> +        this.connect = connect;
>       }
>   
>       // The following getters may appear not to be used - however they are invoked via the Functor class
> @@ -142,4 +145,10 @@ public class TableSample implements Seri
>           return latency;
>       }
>   
> +    /**
> +     * @return the conneect time
> +     */
> +    public long getConnectTime() {
> +        return connect;
> +    }
>   }
>
> Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java (original)
> +++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java Mon Jan  5 19:49:06 2015
> @@ -73,6 +73,7 @@ import org.apache.http.client.methods.Ht
>   import org.apache.http.client.params.ClientPNames;
>   import org.apache.http.client.params.CookiePolicy;
>   import org.apache.http.client.protocol.ResponseContentEncoding;
> +import org.apache.http.conn.ClientConnectionManager;
>   import org.apache.http.conn.ConnectionKeepAliveStrategy;
>   import org.apache.http.conn.DnsResolver;
>   import org.apache.http.conn.params.ConnRoutePNames;
> @@ -90,7 +91,6 @@ import org.apache.http.impl.client.Abstr
>   import org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy;
>   import org.apache.http.impl.client.DefaultHttpClient;
>   import org.apache.http.impl.client.DefaultHttpRequestRetryHandler;
> -import org.apache.http.impl.conn.PoolingClientConnectionManager;
>   import org.apache.http.impl.conn.SchemeRegistryFactory;
>   import org.apache.http.impl.conn.SystemDefaultDnsResolver;
>   import org.apache.http.message.BasicNameValuePair;
> @@ -123,6 +123,7 @@ import org.apache.jmeter.util.JsseSSLMan
>   import org.apache.jmeter.util.SSLManager;
>   import org.apache.jorphan.logging.LoggingManager;
>   import org.apache.log.Logger;
> +import org.htmlparser.http.ConnectionManager;
>   
>   /**
>    * HTTP Sampler using Apache HttpClient 4.x.
> @@ -654,10 +655,9 @@ public class HTTPHC4Impl extends HTTPHCA
>               if (resolver == null) {
>                   resolver = new SystemDefaultDnsResolver();
>               }
> -            PoolingClientConnectionManager poolingClientConnectionManager = new PoolingClientConnectionManager(
> -                    SchemeRegistryFactory.createDefault(), resolver);
> +            ClientConnectionManager connManager = new MeasuringConnectionManager(SchemeRegistryFactory.createDefault(), resolver);
>   
> -            httpClient = new DefaultHttpClient(poolingClientConnectionManager, clientParams) {
> +            httpClient = new DefaultHttpClient(connManager, clientParams) {
>                   @Override
>                   protected HttpRequestRetryHandler createHttpRequestRetryHandler() {
>                       return new DefaultHttpRequestRetryHandler(RETRY_COUNT, false); // set retry count
>
> Added: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/MeasuringConnectionManager.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/MeasuringConnectionManager.java?rev=1649629&view=auto
> ==============================================================================
> --- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/MeasuringConnectionManager.java (added)
> +++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/MeasuringConnectionManager.java Mon Jan  5 19:49:06 2015
> @@ -0,0 +1,268 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements.  See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache License, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License.  You may obtain a copy of the License at
> + *
> + *   http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + *
> + */
> +
> +package org.apache.jmeter.protocol.http.sampler;
> +
> +import org.apache.http.HttpConnectionMetrics;
> +import org.apache.http.HttpException;
> +import org.apache.http.HttpHost;
> +import org.apache.http.HttpResponse;
> +import org.apache.http.HttpRequest;
> +import org.apache.http.HttpEntityEnclosingRequest;
> +import org.apache.http.conn.ClientConnectionRequest;
> +import org.apache.http.conn.ConnectionPoolTimeoutException;
> +import org.apache.http.conn.DnsResolver;
> +import org.apache.http.conn.ManagedClientConnection;
> +import org.apache.http.conn.routing.HttpRoute;
> +import org.apache.http.conn.scheme.SchemeRegistry;
> +import org.apache.http.impl.conn.PoolingClientConnectionManager;
> +import org.apache.http.params.HttpParams;
> +import org.apache.http.protocol.HttpContext;
> +import org.apache.jmeter.samplers.SampleResult;
> +
> +import javax.net.ssl.SSLSession;
> +import java.io.IOException;
> +import java.net.InetAddress;
> +import java.util.concurrent.TimeUnit;
> +
> +/**
> + * Adapter for {@link PoolingClientConnectionManager}
> + * that wraps all connection requests into time-measured implementation {@link MeasuringConnectionRequest}
> + */
> +public class MeasuringConnectionManager extends PoolingClientConnectionManager {
> +
> +    private MeasuringConnectionRequest measuredConnection;
> +    private SampleResult sample;
> +
> +    public MeasuringConnectionManager(SchemeRegistry aDefault, DnsResolver resolver) {
> +        super(aDefault, resolver);
> +    }
> +
> +    @Override
> +    public ClientConnectionRequest requestConnection(final HttpRoute route, final Object state) {
> +        ClientConnectionRequest res = super.requestConnection(route, state);
> +        this.measuredConnection = new MeasuringConnectionRequest(res, this.sample);
> +        return this.measuredConnection;
> +    }
> +
> +    public void setSample(SampleResult sample) {
> +        this.sample = sample;
> +    }
> +
> +    /**
> +     * And adapter class to pass {@link SampleResult} into {@link MeasuredConnection}
> +     */
> +    private static class MeasuringConnectionRequest implements ClientConnectionRequest {
> +        private final ClientConnectionRequest handler;
> +        private final SampleResult sample;
> +
> +        public MeasuringConnectionRequest(ClientConnectionRequest res, SampleResult sample) {
> +            handler = res;
> +            this.sample = sample;
> +        }
> +
> +        @Override
> +        public ManagedClientConnection getConnection(long timeout, TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException {
> +            ManagedClientConnection res = handler.getConnection(timeout, tunit);
> +            return new MeasuredConnection(res, this.sample);
> +        }
> +
> +        @Override
> +        public void abortRequest() {
> +            handler.abortRequest();
> +        }
> +    }
> +
> +    /**
> +     * An adapter for {@link ManagedClientConnection}
> +     * that calls SampleResult.connectEnd after calling ManagedClientConnection.open
> +     */
> +    private static class MeasuredConnection implements ManagedClientConnection {
> +        private final ManagedClientConnection handler;
> +        private final SampleResult sample;
> +
> +        public MeasuredConnection(ManagedClientConnection res, SampleResult sample) {
> +            handler = res;
> +            this.sample = sample;
> +        }
> +
> +        @Override
> +        public void open(HttpRoute route, HttpContext context, HttpParams params) throws IOException {
> +            handler.open(route, context, params);
> +            if (sample != null) {
> +                sample.connectEnd();
> +            }
> +        }
> +
> +        // ================= all following methods just wraps handler's =================
> +        @Override
> +        public boolean isSecure() {
> +            return handler.isSecure();
> +        }
> +
> +        @Override
> +        public HttpRoute getRoute() {
> +            return handler.getRoute();
> +        }
> +
> +        @Override
> +        public SSLSession getSSLSession() {
> +            return handler.getSSLSession();
> +        }
> +
> +        @Override
> +        public void tunnelTarget(boolean secure, HttpParams params) throws IOException {
> +            handler.tunnelTarget(secure, params);
> +        }
> +
> +        @Override
> +        public void tunnelProxy(HttpHost next, boolean secure, HttpParams params) throws IOException {
> +            handler.tunnelProxy(next, secure, params);
> +        }
> +
> +        @Override
> +        public void layerProtocol(HttpContext context, HttpParams params) throws IOException {
> +            handler.layerProtocol(context, params);
> +        }
> +
> +        @Override
> +        public void markReusable() {
> +            handler.markReusable();
> +        }
> +
> +        @Override
> +        public void unmarkReusable() {
> +            handler.unmarkReusable();
> +        }
> +
> +        @Override
> +        public boolean isMarkedReusable() {
> +            return handler.isMarkedReusable();
> +        }
> +
> +        @Override
> +        public void setState(Object state) {
> +            handler.setState(state);
> +        }
> +
> +        @Override
> +        public Object getState() {
> +            return handler.getState();
> +        }
> +
> +        @Override
> +        public void setIdleDuration(long duration, TimeUnit unit) {
> +            handler.setIdleDuration(duration, unit);
> +        }
> +
> +        @Override
> +        public void releaseConnection() throws IOException {
> +            handler.releaseConnection();
> +        }
> +
> +        @Override
> +        public void abortConnection() throws IOException {
> +            handler.abortConnection();
> +        }
> +
> +        @Override
> +        public boolean isResponseAvailable(int timeout) throws IOException {
> +            return handler.isResponseAvailable(timeout);
> +        }
> +
> +        @Override
> +        public void sendRequestHeader(HttpRequest request) throws HttpException, IOException {
> +            handler.sendRequestHeader(request);
> +        }
> +
> +        @Override
> +        public void sendRequestEntity(HttpEntityEnclosingRequest request) throws HttpException, IOException {
> +            handler.sendRequestEntity(request);
> +        }
> +
> +        @Override
> +        public HttpResponse receiveResponseHeader() throws HttpException, IOException {
> +            return handler.receiveResponseHeader();
> +        }
> +
> +        @Override
> +        public void receiveResponseEntity(HttpResponse response) throws HttpException, IOException {
> +            handler.receiveResponseEntity(response);
> +        }
> +
> +        @Override
> +        public void flush() throws IOException {
> +            handler.flush();
> +        }
> +
> +        @Override
> +        public InetAddress getLocalAddress() {
> +            return handler.getLocalAddress();
> +        }
> +
> +        @Override
> +        public int getLocalPort() {
> +            return handler.getLocalPort();
> +        }
> +
> +        @Override
> +        public InetAddress getRemoteAddress() {
> +            return handler.getRemoteAddress();
> +        }
> +
> +        @Override
> +        public int getRemotePort() {
> +            return handler.getRemotePort();
> +        }
> +
> +        @Override
> +        public void close() throws IOException {
> +            handler.close();
> +        }
> +
> +        @Override
> +        public boolean isOpen() {
> +            return handler.isOpen();
> +        }
> +
> +        @Override
> +        public boolean isStale() {
> +            return handler.isStale();
> +        }
> +
> +        @Override
> +        public void setSocketTimeout(int timeout) {
> +            handler.setSocketTimeout(timeout);
> +        }
> +
> +        @Override
> +        public int getSocketTimeout() {
> +            return handler.getSocketTimeout();
> +        }
> +
> +        @Override
> +        public void shutdown() throws IOException {
> +            handler.shutdown();
> +        }
> +
> +        @Override
> +        public HttpConnectionMetrics getMetrics() {
> +            return handler.getMetrics();
> +        }
> +    }
> +}
>
> Modified: jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java (original)
> +++ jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java Mon Jan  5 19:49:06 2015
> @@ -84,6 +84,7 @@ public class JDBCSampler extends Abstrac
>               try {
>                   conn = DataSourceElement.getConnection(getDataSource());
>               } finally {
> +                // FIXME: there is separate connect time field now
>                   res.latencyEnd(); // use latency to measure connection time
>               }
>               res.setResponseHeaders(conn.toString());
>
> Modified: jmeter/trunk/xdocs/changes.xml
> URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/xdocs/changes.xml (original)
> +++ jmeter/trunk/xdocs/changes.xml Mon Jan  5 19:49:06 2015
> @@ -55,6 +55,7 @@ Summary
>   <!-- <ch_title>Sample title</ch_title>
>   <p>
>   <ul>
> +<li><bugzilla>48799</bugzilla> - Add time to establish connection to available sample metrics. Implemented by Andrey Pokhilko (andrey at blazemeter.com) and contributed by BlazeMeter Ltd.</li>
>   <li>Sample text</li>
>   </ul>
>   </p>
>
> Modified: jmeter/trunk/xdocs/usermanual/glossary.xml
> URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/glossary.xml?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/xdocs/usermanual/glossary.xml (original)
> +++ jmeter/trunk/xdocs/usermanual/glossary.xml Mon Jan  5 19:49:06 2015
> @@ -48,6 +48,10 @@ browser or other application client.
>   </p>
>   
>   <p>
> +<a name="Connect"><b>Connect Time</b></a>. JMeter measures the time it took to estable the connection, including SSL handshake. Note that connect time is not automatically subtracted from <a href="#Latency">latency</a>.
> +</p>
> +
> +<p>
>   <a name="Median"><b>Median</b></a> is a number which divides the samples into two equal halves.
>   Half of the samples are smaller than the median, and half are larger.
>   [Some samples may equal the median.]
>
> Modified: jmeter/trunk/xdocs/usermanual/listeners.xml
> URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/listeners.xml?rev=1649629&r1=1649628&r2=1649629&view=diff
> ==============================================================================
> --- jmeter/trunk/xdocs/usermanual/listeners.xml (original)
> +++ jmeter/trunk/xdocs/usermanual/listeners.xml Mon Jan  5 19:49:06 2015
> @@ -137,6 +137,7 @@ The full set of properties that affect r
>   #jmeter.save.saveservice.subresults=true
>   #jmeter.save.saveservice.assertions=true
>   #jmeter.save.saveservice.latency=true
> +#jmeter.save.saveservice.connect_time=false
>   #jmeter.save.saveservice.samplerData=false
>   #jmeter.save.saveservice.responseHeaders=false
>   #jmeter.save.saveservice.requestHeaders=false
> @@ -304,6 +305,7 @@ The order of appearance of columns is fi
>   <li>URL</li>
>   <li>Filename - if Save Response to File was used</li>
>   <li>latency - time to first response</li>
> +<li>connect - time to establish connection</li>
>   <li>encoding</li>
>   <li>SampleCount - number of samples (1, unless multiple samples are aggregated)</li>
>   <li>ErrorCount - number of errors (0 or 1, unless multiple samples are aggregated)</li>
> @@ -427,6 +429,7 @@ The sample attributes have the following
>   <tr><td>it</td><td>Idle Time = time not spent sampling (milliseconds) (generally 0)</td></tr>
>   <tr><td>lb</td><td>Label</td></tr>
>   <tr><td>lt</td><td>Latency = time to initial response (milliseconds) - not all samplers support this</td></tr>
> +<tr><td>lt</td><td>Connect Time = time to establish the connection (milliseconds) - not all samplers support this</td></tr>
>   <tr><td>na</td><td>Number of active threads for all thread groups</td></tr>
>   <tr><td>ng</td><td>Number of active threads in this group</td></tr>
>   <tr><td>rc</td><td>Response Code (e.g. 200)</td></tr>
>
>


Mime
View raw message