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 2007/09/23 19:44:12 UTC

svn commit: r578591 - in /jakarta/jmeter: branches/rel-2-2/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java

Author: sebb
Date: Sun Sep 23 10:44:11 2007
New Revision: 578591

URL: http://svn.apache.org/viewvc?rev=578591&view=rev
Log:
The change of key to include the thread name was wrong
It worked, but fewer samples could be aggregated.

Modified:
    jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java

Modified: jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java?rev=578591&r1=578590&r2=578591&view=diff
==============================================================================
--- jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java (original)
+++ jakarta/jmeter/branches/rel-2-2/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java Sun Sep 23 10:44:11 2007
@@ -50,7 +50,7 @@
 	public StatisticalSampleResult(SampleResult res) {
 		// Copy data that is shared between samples (i.e. the key items):
 		setSampleLabel(res.getSampleLabel());
-		setThreadName(res.getThreadName());
+		// Nothing else can be saved, as the samples may come from any thread
 
 		setSuccessful(true); // Assume result is OK
 		setSampleCount(0); // because we add the sample count in later
@@ -106,9 +106,8 @@
 	 * @return the key to use for aggregating samples
 	 */
 	public static String getKey(SampleEvent event) {
-		SampleResult result = event.getResult();
 		StringBuffer sb = new StringBuffer(80);
-		sb.append(result.getSampleLabel()).append("-").append(result.getThreadName());
+		sb.append(event.getResult().getSampleLabel()).append("-").append(event.getThreadGroup());
 		return sb.toString();
 	}
 }

Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java?rev=578591&r1=578590&r2=578591&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java Sun Sep 23 10:44:11 2007
@@ -50,7 +50,7 @@
 	public StatisticalSampleResult(SampleResult res) {
 		// Copy data that is shared between samples (i.e. the key items):
 		setSampleLabel(res.getSampleLabel());
-		setThreadName(res.getThreadName());
+		// Nothing else can be saved, as the samples may come from any thread
 
 		setSuccessful(true); // Assume result is OK
 		setSampleCount(0); // because we add the sample count in later
@@ -106,9 +106,8 @@
 	 * @return the key to use for aggregating samples
 	 */
 	public static String getKey(SampleEvent event) {
-		SampleResult result = event.getResult();
 		StringBuffer sb = new StringBuffer(80);
-		sb.append(result.getSampleLabel()).append("-").append(result.getThreadName());
+		sb.append(event.getResult().getSampleLabel()).append("-").append(event.getThreadGroup());
 		return sb.toString();
 	}
 }



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