jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From und...@apache.org
Subject svn commit: r1662172 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Date Wed, 25 Feb 2015 07:01:10 GMT
Author: undera
Date: Wed Feb 25 07:01:10 2015
New Revision: 1662172

URL: http://svn.apache.org/r1662172
Log:
Bug 48799 - Add connect time to output metrics (missed setSample)

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java

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=1662172&r1=1662171&r2=1662172&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
Wed Feb 25 07:01:10 2015
@@ -279,7 +279,7 @@ public class HTTPHC4Impl extends HTTPHCA
 
         HTTPSampleResult res = createSampleResult(url, method);
 
-        HttpClient httpClient = setupClient(url);
+        HttpClient httpClient = setupClient(url, res);
 
         HttpRequestBase httpRequest = null;
         try {
@@ -617,7 +617,7 @@ public class HTTPHC4Impl extends HTTPHCA
         }
     }
 
-    private HttpClient setupClient(URL url) {
+    private HttpClient setupClient(URL url, SampleResult res) {
 
         Map<HttpClientKey, HttpClient> mapHttpClientPerHttpClientKey = HTTPCLIENTS_CACHE_PER_THREAD_AND_HTTPCLIENTKEY.get();
         
@@ -716,6 +716,9 @@ public class HTTPHC4Impl extends HTTPHCA
             }
         }
 
+        MeasuringConnectionManager connectionManager = (MeasuringConnectionManager) httpClient.getConnectionManager();
+        connectionManager.setSample(res);
+
         // TODO - should this be done when the client is created?
         // If so, then the details need to be added as part of HttpClientKey
         setConnectionAuthorization(httpClient, url, getAuthManager(), key);



Mime
View raw message