Bug 43363 - Options for compressed content
Options for compressed content
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
unspecified
Other other
: P2 enhancement (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-09-12 07:10 UTC by Sebb
Modified: 2012-02-07 06:30 UTC (History)
1 user (show)



Attachments
Draft patch (see: http://mail-archives.apache.org/mod_mbox/jakarta-dev/201104.mbox/%3CBANLkTi=otZDyWNfJmnaxZUm2_K95G6gTjg@mail.gmail.com%3E) (29.09 KB, patch)
2011-04-10 11:09 UTC, Milamber
Details | Diff
New version (27.22 KB, patch)
2011-04-13 02:53 UTC, Milamber
Details | Diff
Test cases for issue to HttpClient 4.1 get size (24.59 KB, application/octet-stream)
2011-04-13 18:30 UTC, Milamber
Details
JTL + Wireshark capture (11.98 KB, application/x-zip-compressed)
2011-04-19 02:30 UTC, Milamber
Details
Sample metrics code (3.85 KB, text/plain)
2011-04-19 09:59 UTC, Sebb
Details
Sample metrics code log (35.60 KB, text/x-log)
2011-04-19 10:00 UTC, Sebb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebb 2007-09-12 07:10:25 UTC
JMeter automatically decodes certain types of compressed content.

It might be useful to be able to switch off the decoding - so the compressed 
response can be stored. Also it would be useful to have a way to record the 
compressed size as well as the uncompressed size.
Comment 1 Milamber 2010-11-21 06:34:41 UTC
See Bug 50170
Comment 3 Milamber 2011-04-13 02:53:22 UTC
Created attachment 26879 [details]
New version
Comment 4 Sebb 2011-04-13 09:49:14 UTC
(In reply to comment #3)
> Created an attachment (id=26879) [details]
> New version

Looks good to me.
Comment 5 Milamber 2011-04-13 18:29:08 UTC

URL: http://svn.apache.org/viewvc?rev=1091965&view=rev
Log:
Change strategy to get response size (use CountingInputStream from Commons IO) 
View Results Tree - Add new size fields: response headers and response body (in bytes) - derived from Bug 43363 
Size Assertion - Add response size scope (full, headers, body, code, message) - derived from Bug 43363

Modified:
    jakarta/jmeter/trunk/bin/jmeter.properties
    jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/SizeAssertion.java
    jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/SizeAssertionGui.java
    jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SamplerResultTab.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.java
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
    jakarta/jmeter/trunk/test/src/org/apache/jmeter/assertions/SizeAssertionTest.java
    jakarta/jmeter/trunk/xdocs/changes.xml
    jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
Comment 6 Milamber 2011-04-13 18:30:51 UTC
Created attachment 26885 [details]
Test cases for issue to HttpClient 4.1 get size
Comment 7 Milamber 2011-04-19 02:30:01 UTC
Created attachment 26902 [details]
JTL + Wireshark capture

milamber@bothari2:~/W-workspaces/Workspaces-JMeter/Jmeter-integration/lib$ ls -l
total 11604
-rw-r--r-- 1 milamber milamber    4202  4 mars  11:34 aareadme.txt
-rw-r--r-- 1 milamber milamber   69409  4 mars  23:23 activation-1.1.1.jar
drwxr-xr-x 3 milamber milamber    4096 16 mars  23:38 api
-rw-r--r-- 1 milamber milamber   72851  4 mars  23:14 avalon-framework-4.1.4.jar
-rw-r--r-- 1 milamber milamber  113369  4 mars  23:14 bsf-2.4.0.jar
-rw-r--r-- 1 milamber milamber   19174  4 mars  23:14 bsf-api-3.1.jar
-rw-r--r-- 1 milamber milamber  383846  4 mars  23:16 bsh-2.0b5.jar
-rw-r--r-- 1 milamber milamber   37175 18 avril 23:08 bshclient.jar
-rw-r--r-- 1 milamber milamber   73098  2 avril 16:36 commons-codec-1.5.jar
-rw-r--r-- 1 milamber milamber  575389  4 mars  23:16 commons-collections-3.2.1.jar
-rw-r--r-- 1 milamber milamber  305001  4 mars  23:16 commons-httpclient-3.1.jar
-rw-r--r-- 1 milamber milamber  159509  2 avril 16:37 commons-io-2.0.1.jar
-rw-r--r-- 1 milamber milamber  132165  4 mars  23:16 commons-jexl-1.1.jar
-rw-r--r-- 1 milamber milamber  284220  2 avril 16:37 commons-lang-2.6.jar
-rw-r--r-- 1 milamber milamber   60686  4 mars  23:17 commons-logging-1.1.1.jar
-rw-r--r-- 1 milamber milamber  180792  4 mars  23:17 commons-net-1.4.1.jar
drwxr-xr-x 3 milamber milamber    4096 16 mars  23:38 doc
-rw-r--r-- 1 milamber milamber   56089  4 mars  23:17 excalibur-datasource-1.1.1.jar
-rw-r--r-- 1 milamber milamber   17669  4 mars  23:17 excalibur-instrument-1.0.jar
-rw-r--r-- 1 milamber milamber   76725  4 mars  23:17 excalibur-logger-1.1.jar
-rw-r--r-- 1 milamber milamber   44462  4 mars  23:17 excalibur-pool-1.2.jar
drwxr-xr-x 3 milamber milamber    4096 17 avril 10:39 ext
-rw-r--r-- 1 milamber milamber   32359  4 mars  23:23 geronimo-jms_1.1_spec-1.1.1.jar
-rw-r--r-- 1 milamber milamber   71952 23 sept.  2006 htmllexer-2.0-20060923.jar
-rw-r--r-- 1 milamber milamber  138838 23 sept.  2006 htmlparser-2.0-20060923.jar
-rw-r--r-- 1 milamber milamber  351132 21 mars  21:59 httpclient-4.1.1.jar
-rw-r--r-- 1 milamber milamber  181801 15 avril 08:41 httpcore-4.1.1-20110414.220809-1.jar
-rw-r--r-- 1 milamber milamber   26889 21 mars  21:59 httpmime-4.1.1.jar
-rw-r--r-- 1 milamber milamber  142391  2 nov.   2003 jCharts-0.7.5.jar
-rw-r--r-- 1 milamber milamber  153115  4 mars  23:18 jdom-1.1.jar
-rw-r--r-- 1 milamber milamber  132098 18 avril 23:08 jorphan.jar
-rw-r--r-- 1 milamber milamber  708951  4 mars  23:19 js-1.6R5.jar
-rw-r--r-- 1 milamber milamber  249924  4 mars  23:19 jtidy-r938.jar
drwxr-xr-x 3 milamber milamber    4096 16 mars  23:19 junit
-rw-r--r-- 1 milamber milamber  237047  4 mars  23:19 junit-4.8.1.jar
-rw-r--r-- 1 milamber milamber   81885  4 mars  23:19 logkit-2.0.jar
-rw-r--r-- 1 milamber milamber  462097  4 mars  23:23 mail-1.4.3.jar
drwxr-xr-x 3 milamber milamber    4096  4 mars  11:34 opt
-rw-r--r-- 1 milamber milamber   65261  4 mars  23:17 oro-2.0.8.jar
-rw-r--r-- 1 milamber milamber  278281  4 mars  23:20 serializer-2.7.1.jar
-rw-r--r-- 1 milamber milamber  232498  4 mars  23:19 soap-2.3.1.jar
-rw-r--r-- 1 milamber milamber 3176148  4 mars  23:22 xalan-2.7.1.jar
-rw-r--r-- 1 milamber milamber 1229125  4 mars  23:22 xercesImpl-2.9.1.jar
-rw-r--r-- 1 milamber milamber  194354  4 mars  23:23 xml-apis-1.3.04.jar
-rw-r--r-- 1 milamber milamber  517073  4 mars  23:23 xmlgraphics-commons-1.3.1.jar
-rw-r--r-- 1 milamber milamber   24956  4 mars  23:20 xpp3_min-1.1.4c.jar
-rw-r--r-- 1 milamber milamber  431406  4 mars  23:20 xstream-1.3.1.jar
Comment 8 Sebb 2011-04-19 06:27:49 UTC
All looks OK - I get the same response from www.monip.org (apart from the IP address!) and I also get the response as a single packet when viewed using Wireshark.

I need to look further at httpcore to see why it could be reading ahead more in your case and not in mine.
Comment 9 Sebb 2011-04-19 09:59:59 UTC
Created attachment 26907 [details]
Sample metrics code
Comment 10 Sebb 2011-04-19 10:00:28 UTC
Created attachment 26908 [details]
Sample metrics code log
Comment 11 Sebb 2011-04-19 10:01:39 UTC
Added a simple test program to show metrics behaviour with HC4.

Needs to be run with httpclient+httpcore.
Comment 12 Sebb 2011-04-19 12:42:49 UTC
I've looked in more detail at how the data is read from the socket, and I think it is accidental that it works for me and not for you. Probably depends on OS and JVM config.

So let's use the header calculation method. I'll update the code.
Comment 13 Philippe Mouawad 2012-02-05 22:04:51 UTC
Hasn't this one been fixed ?
Comment 14 Milamber 2012-02-06 08:32:56 UTC
Yes, I think too.

When I run Test Case https://issues.apache.org/bugzilla/attachment.cgi?id=26885, the only difference between HC3 and HC4 with chunked test is:
The HC3 doesn't include the size of chunk counters in response body size
The HC4 included this size (35 bytes added)

The docs can be update with a notice to indicate this difference (in View Results Tree section).
Comment 15 Philippe Mouawad 2012-02-06 20:48:10 UTC
Already Fixed in JMeter 2.5



Date: Mon Feb  6 20:45:33 2012
New Revision: 1241169

URL: http://svn.apache.org/viewvc?rev=1241169&view=rev
Log:
Bug 43363 - Options for compressed content
Add doc to component_reference

Modified:
   jmeter/trunk/xdocs/usermanual/component_reference.xml
Comment 16 Philippe Mouawad 2012-02-07 06:30:54 UTC
Date: Tue Feb  7 00:32:39 2012
New Revision: 1241292

URL: http://svn.apache.org/viewvc?rev=1241292&view=rev
Log:
Clarify HC4 behaviour wrt transport overhead

Modified:
   jmeter/trunk/xdocs/usermanual/component_reference.xml