While writing some custom "JavaSamplerClient" classes, i ran into a problem with the JMeter SampleResult class. Currently there are some fields that are too small. private int bytes = 0; private int bodySize = 0; The fields noted above and their relative getter/setter methods use int. this is normally fine, but in the case where you are testing throughput of large streams, you run into a problem. MAX_INT=2,147,483,647 As you can see this is basically a 2GB stream. if i wanted to write any stream bigger than that i couldn't accurately calculate throughput with the SampleResult class. SampleResult result = new SampleResult(); result.setBytes(long); result.sampleStart(); // like write large file to cloud storage server. result.sampleEnd();
This can be quite impacting and introduces issues with arrays of bytes as they are limited to int.
Hi Phillippe Do we have a time line when this can be fixed? This is actually blocker for me since I am mostly doing large objects testing. thanks Ahmad
Created attachment 34337 [details] Proposal for a fix
Created attachment 34338 [details] Updated patch to manage backward compatibility
Created attachment 34347 [details] Updated patch with backward compat and fix to wrong conversion
Created attachment 34348 [details] Last version fixing bad conversion in report part
Created attachment 34355 [details] Last version after fix to Bug 60229
Was 'SampleResult's "bytes" and "bodySize" are currently "int" but should be "long"'
Note the limitation would manifest itself this way (for example): 2016/10/04 11:55:24 WARN - jmeter.save.CSVSaveService: java.lang.NumberFormatException: For input string: "2016/10/03 22:28:11.641" 2016/10/04 11:55:24 WARN - jmeter.save.CSVSaveService: Setting date format to: yyyy/MM/dd HH:mm:ss.SSS 2016/10/04 11:55:25 WARN - jmeter.save.CSVSaveService: Error parsing field 'bytes' at line 3523 java.lang.NumberFormatException: For input string: "5368709120" 2016/10/04 11:55:25 WARN - jmeter.reporters.ResultCollector: Problem reading JTL file: ....
Author: pmouawad Date: Wed Oct 12 08:06:16 2016 New Revision: 1764397 URL: http://svn.apache.org/viewvc?rev=1764397&view=rev Log: Bug 53039 - HTTP Request : Be able to handle responses which size exceeds 2147483647 bytes Bugzilla Id: 53039 Modified: jmeter/trunk/bin/jmeter.properties jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java jmeter/trunk/src/components/org/apache/jmeter/assertions/SizeAssertion.java 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/report/core/Sample.java jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.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/util/Calculator.java jmeter/trunk/src/core/org/apache/jmeter/visualizers/SamplingStatCalculator.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPFileImpl.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java jmeter/trunk/xdocs/changes.xml
Author: pmouawad Date: Wed Oct 12 08:15:14 2016 New Revision: 1764399 URL: http://svn.apache.org/viewvc?rev=1764399&view=rev Log: Bug 53039 - HTTP Request : Be able to handle responses which size exceeds 2147483647 bytes Update properties_reference.xml Bugzilla Id: 53039 Modified: jmeter/trunk/xdocs/usermanual/properties_reference.xml
Author: pmouawad Date: Wed Oct 12 09:17:37 2016 New Revision: 1764412 URL: http://svn.apache.org/viewvc?rev=1764412&view=rev Log: Bug 53039 - HTTP Request : Be able to handle responses which size exceeds 2147483647 bytes Restore changed method for backward compatibility Bugzilla Id: 53039 Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
Author: pmouawad Date: Wed Oct 12 09:43:21 2016 New Revision: 1764422 URL: http://svn.apache.org/viewvc?rev=1764422&view=rev Log: Bug 53039 - HTTP Request : Be able to handle responses which size exceeds 2147483647 bytes Fix bug as per Felix Schumacher review, thx Bugzilla Id: 53039 Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPFileImpl.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
I verified that 5GB file was captured correctly.
Author: pmouawad Date: Tue Oct 18 14:35:43 2016 New Revision: 1765448 URL: http://svn.apache.org/viewvc?rev=1765448&view=rev Log: Bug 53039 - HTTP Request : Be able to handle responses which size exceeds 2147483647 bytes Fix deprecated calls to setBytes(int) Bugzilla Id: 53039 Modified: jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/tools/CounterOutputStream.java
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2802