You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2008/05/29 13:56:29 UTC

svn commit: r661306 - /jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java

Author: sebb
Date: Thu May 29 04:56:28 2008
New Revision: 661306

URL: http://svn.apache.org/viewvc?rev=661306&view=rev
Log:
Document bytes/getBytes()

Modified:
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java

Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java?rev=661306&r1=661305&r2=661306&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java Thu May 29 04:56:28 2008
@@ -186,7 +186,7 @@
 
 	private int sampleCount = 1;
 
-	private int bytes = 0;
+	private int bytes = 0; // Allows override of sample size in case sampler does not want to store all the data
 	
 	private volatile int groupThreads = 0; // Active threads in this thread group
 	
@@ -560,7 +560,12 @@
 
 	/**
 	 * Gets the responseData attribute of the SampleResult object.
+	 * <p>
+	 * Note that some samplers may not store all the data, in which case
+	 * getResponseData().length will be incorrect.
 	 * 
+	 * Instead, always use {@link #getBytes()} to obtain the sample result byte count.
+	 * </p>
 	 * @return the responseData value (cannot be null)
 	 */
 	public byte[] getResponseData() {



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org