jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Mouawad <philippe.moua...@gmail.com>
Subject Re: svn commit: r1838686 - in /jmeter/trunk/src/core/org/apache/jmeter: control/TransactionSampler.java samplers/SampleResult.java
Date Thu, 23 Aug 2018 12:00:59 GMT
yes.
I had adapted them previously and partly wrongly.

I’ll do it this evening unless you can before me.

Thanks

On Thursday, August 23, 2018, Felix Schumacher <
felix.schumacher@internetallee.de> wrote:

> These changes seem to break the tests.
>
> Could it be, that the expected results have to be adapted?
>
> Regards,
>  Felix
>
> Am 22. August 2018 23:04:12 GMT+01:00 schrieb pmouawad@apache.org:
> >Author: pmouawad
> >Date: Wed Aug 22 22:04:11 2018
> >New Revision: 1838686
> >
> >URL: http://svn.apache.org/viewvc?rev=1838686&view=rev
> >Log:
> >Bug 62648 - Sub Results of Transaction Controller when "Generate Parent
> >Sample" is checked are modified
> >Bugzilla Id: 62648
> >
> >Modified:
> >jmeter/trunk/src/core/org/apache/jmeter/control/TransactionSampler.java
> >    jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
> >
> >Modified:
> >jmeter/trunk/src/core/org/apache/jmeter/control/TransactionSampler.java
> >URL:
> >http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/
> apache/jmeter/control/TransactionSampler.java?rev=
> 1838686&r1=1838685&r2=1838686&view=diff
> >===========================================================
> ===================
> >---
> >jmeter/trunk/src/core/org/apache/jmeter/control/TransactionSampler.java
> >(original)
> >+++
> >jmeter/trunk/src/core/org/apache/jmeter/control/TransactionSampler.java
> >Wed Aug 22 22:04:11 2018
> >@@ -116,7 +116,7 @@ public class TransactionSampler extends
> >             noFailingSamples++;
> >         }
> >         // Add the sub result to the transaction result
> >-        transactionSampleResult.addSubResult(res);
> >+        transactionSampleResult.addSubResult(res, false);
> >        // Add current time to total for later use (exclude pause time)
> >         totalTime += res.getTime();
> >     }
> >
> >Modified:
> >jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
> >URL:
> >http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/
> apache/jmeter/samplers/SampleResult.java?rev=1838686&
> r1=1838685&r2=1838686&view=diff
> >===========================================================
> ===================
> >--- jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
> >(original)
> >+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
> >Wed Aug 22 22:04:11 2018
> >@@ -614,6 +614,16 @@ public class SampleResult implements Ser
> >      *            the {@link SampleResult} to be added
> >      */
> >     public void addSubResult(SampleResult subResult) {
> >+        addSubResult(subResult, true);
> >+    }
> >+    /**
> >+     * Add a subresult and adjust the parent byte count and end-time.
> >+     *
> >+     * @param subResult
> >+     *            the {@link SampleResult} to be added
> >+     * @param renameSubResults boolean do we rename subResults based
> >on position
> >+     */
> >+    public void addSubResult(SampleResult subResult, boolean
> >renameSubResults) {
> >         if(subResult == null) {
> >            // see https://bz.apache.org/bugzilla/show_bug.cgi?id=54778
> >             return;
> >@@ -632,7 +642,7 @@ public class SampleResult implements Ser
> >         setSentBytes(getSentBytes() + subResult.getSentBytes());
> >         setHeadersSize(getHeadersSize() + subResult.getHeadersSize());
> >      setBodySize(getBodySizeAsLong() + subResult.getBodySizeAsLong());
> >-        addRawSubResult(subResult);
> >+        addRawSubResult(subResult, renameSubResults);
> >     }
> >
> >     /**
> >@@ -640,9 +650,20 @@ public class SampleResult implements Ser
> >      *
> >      * @param subResult
> >      *            the {@link SampleResult} to be added
> >+     * @param renameSubResults boolean do we rename subResults based
> >on position
> >      */
> >     public void addRawSubResult(SampleResult subResult){
> >-        storeSubResult(subResult);
> >+        storeSubResult(subResult, true);
> >+    }
> >+
> >+    /**
> >+     * Add a subresult to the collection without updating any parent
> >fields.
> >+     *
> >+     * @param subResult
> >+     *            the {@link SampleResult} to be added
> >+     */
> >+    private void addRawSubResult(SampleResult subResult, boolean
> >renameSubResults){
> >+        storeSubResult(subResult, renameSubResults);
> >     }
> >
> >     /**
> >@@ -656,10 +677,27 @@ public class SampleResult implements Ser
> >      *            the {@link SampleResult} to be added
> >      */
> >     public void storeSubResult(SampleResult subResult) {
> >+        storeSubResult(subResult, true);
> >+    }
> >+
> >+    /**
> >+     * Add a subresult read from a results file.
> >+     * <p>
> >+     * As for {@link SampleResult#addSubResult(SampleResult)
> >+     * addSubResult(SampleResult)}, except that the fields don't need
> >to be
> >+     * accumulated
> >+     *
> >+     * @param subResult
> >+     *            the {@link SampleResult} to be added
> >+     * @param renameSubResults boolean do we rename subResults based
> >on position
> >+     */
> >+    private void storeSubResult(SampleResult subResult, boolean
> >renameSubResults) {
> >         if (subResults == null) {
> >             subResults = new ArrayList<>();
> >         }
> >-
> >subResult.setSampleLabel(getSampleLabel()+"-"+subResultIndex++);
> >+        if(renameSubResults) {
> >+
> >subResult.setSampleLabel(getSampleLabel()+"-"+subResultIndex++);
> >+        }
> >         subResults.add(subResult);
> >         subResult.setParent(this);
> >     }
>


-- 
Cordialement.
Philippe Mouawad.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message