jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1461380 - in /jmeter/trunk: src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java xdocs/changes.xml
Date Wed, 27 Mar 2013 00:48:58 GMT
Author: sebb
Date: Wed Mar 27 00:48:57 2013
New Revision: 1461380

URL: http://svn.apache.org/r1461380
Log:
StringIndexOutOfBoundsException at SampleResult.getSampleLabel() if key_on_threadname=false
when using Statistical mode
Bugzilla Id: 5473

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java
    jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java?rev=1461380&r1=1461379&r2=1461380&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java Wed Mar
27 00:48:57 2013
@@ -56,21 +56,30 @@ public class StatisticalSampleResult ext
      * Create a statistical sample result from an ordinary sample result.
      * 
      * @param res the sample result 
-     * @param keyOnThreadName true if key includes threadName, false if threadGroup
      */
-    public StatisticalSampleResult(SampleResult res, boolean keyOnThreadName) {
+    public StatisticalSampleResult(SampleResult res) {
         // Copy data that is shared between samples (i.e. the key items):
         setSampleLabel(res.getSampleLabel());
         
-        if (keyOnThreadName) {
-            setThreadName(res.getThreadName());
-        }
+        setThreadName(res.getThreadName());
 
         setSuccessful(true); // Assume result is OK
         setSampleCount(0); // because we add the sample count in later
         elapsed = 0;
     }
 
+    /**
+     * Create a statistical sample result from an ordinary sample result.
+     * 
+     * @param res the sample result 
+     * @param unused no longer used
+     * @deprecated no longer necessary; use {@link #StatisticalSampleResult(SampleResult)}
instead
+     */
+    @Deprecated
+    public StatisticalSampleResult(SampleResult res, boolean unused) {
+        this(res);
+    }
+
     public void add(SampleResult res) {
         // Add Sample Counter
         setSampleCount(getSampleCount() + res.getSampleCount());

Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java?rev=1461380&r1=1461379&r2=1461380&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java Wed Mar
27 00:48:57 2013
@@ -149,7 +149,7 @@ public class StatisticalSampleSender ext
             String key = StatisticalSampleResult.getKey(e, keyOnThreadName);
             StatisticalSampleResult statResult = sampleTable.get(key);
             if (statResult == null) {
-                statResult = new StatisticalSampleResult(e.getResult(), keyOnThreadName);
+                statResult = new StatisticalSampleResult(e.getResult());
                 // store the new statistical result collector
                 sampleTable.put(key, statResult);
                 // add a new wrapper samplevent

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1461380&r1=1461379&r2=1461380&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Wed Mar 27 00:48:57 2013
@@ -109,6 +109,7 @@ This does not affect JMeter operation.
 <h3>Listeners</h3>
 <ul>
 <li><bugzilla>54589</bugzilla> - View Results Tree have a lot of Garbage
characters if html page uses double-byte charset</li>
+<li><bugzilla>5473</bugzilla> - StringIndexOutOfBoundsException at SampleResult.getSampleLabel()
if key_on_threadname=false when using Statistical mode</li>
 </ul>
 
 <h3>Timers, Assertions, Config, Pre- &amp; Post-Processors</h3>



Mime
View raw message