jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1568793 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Date Sun, 16 Feb 2014 17:07:22 GMT
Author: pmouawad
Date: Sun Feb 16 17:07:21 2014
New Revision: 1568793

URL: http://svn.apache.org/r1568793
Log:
Add documentation on hack from metrics

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=1568793&r1=1568792&r2=1568793&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
Sun Feb 16 17:07:21 2014
@@ -132,8 +132,14 @@ public class HTTPHC4Impl extends HTTPHCA
     /** retry count to be used (default 1); 0 = disable retries */
     private static final int RETRY_COUNT = JMeterUtils.getPropDefault("httpclient4.retrycount",
0);
 
-    private static final String CONTEXT_METRICS = "jmeter_metrics"; // TODO hack, to be removed
later
+    private static final String CONTEXT_METRICS = "jmeter_metrics"; // TODO hack for metrics
related to HTTPCLIENT-1081, to be removed later
 
+    /**
+     * Special interceptor made to keep metrics when connection is released for some method
like HEAD
+     * Otherwise calling directly ((HttpConnection) localContext.getAttribute(ExecutionContext.HTTP_CONNECTION)).getMetrics();
+     * would throw org.apache.http.impl.conn.ConnectionShutdownException
+     * See https://issues.apache.org/jira/browse/HTTPCLIENT-1081
+     */
     private static final HttpResponseInterceptor METRICS_SAVER = new HttpResponseInterceptor(){
         @Override
         public void process(HttpResponse response, HttpContext context)



Mime
View raw message