You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jakarta.apache.org by bu...@apache.org on 2010/10/12 14:18:45 UTC

DO NOT REPLY [Bug 50080] New: Transaction controller incorrectly creates samples including timer duration

https://issues.apache.org/bugzilla/show_bug.cgi?id=50080

           Summary: Transaction controller incorrectly creates samples
                    including timer duration
           Product: JMeter
           Version: 2.4
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
        AssignedTo: notifications@jakarta.apache.org
        ReportedBy: jens_0@hotmail.com


When using the settings "Generate parent sample" checked and "Include timer
duration in generated sample" unchecked, samples generated by the transaction
controller nevertheless include the duration of timers that are existing as
children.

When "Generate parent sample" is unchecked, the reported times correctly do not
include the timers.

With other words: "Include timer duration in generated sample" does not have
any effect if "Generate parent sample" is checked.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 50080] Transaction controller incorrectly creates samples including timer duration

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50080

--- Comment #1 from Milamber <mi...@apache.org> 2010-10-14 03:38:40 EDT ---
Excludes timer option came with the Bug 41418, but the patch 41418 don't manage
Excludes timer when Generate parent is on.

(in code : Bug 41418 => TC.next2() but not TC.next1())

It's seems hard to solve.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 50080] Transaction controller incorrectly creates samples including timer duration

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50080

--- Comment #3 from jens_0@hotmail.com 2010-10-28 04:50:25 EDT ---
(In reply to comment #2)
Or without changing the visibility of setEndTime:

src/core/org/apache/jmeter/control/TransactionSampler.java

@@ -49,0 +50,2 @@
+    private int totalTime = 0;
+   
@@ -65 +67,2 @@
-        transactionSampleResult.sampleStart();
+        if (transactionController.isIncludeTimers())
+         transactionSampleResult.sampleStart();
@@ -101 +104,9 @@
-        transactionSampleResult.addSubResult(res);
+        if (transactionController.isIncludeTimers()) {
+         transactionSampleResult.addSubResult(res);
+        } else {
+         transactionSampleResult.setBytes(transactionSampleResult.getBytes() +
res.getBytes());
+         transactionSampleResult.addRawSubResult(res);
+         
+         totalTime += res.getTime();
+        }
+       
@@ -112,0 +124,7 @@
+        }
+       
+        if (!transactionController.isIncludeTimers()) {
+         long end = SampleResult.currentTimeInMs();
+         transactionSampleResult.setStampAndTime(end - totalTime, totalTime);
+         //transactionSampleResult.setIdleTime(end -
transactionSampleResult.getStartTime() - totalTime);
+         //transactionSampleResult.setEndTime(end);

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 50080] Transaction controller incorrectly creates samples including timer duration

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50080

Milamber <mi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Milamber <mi...@apache.org> 2010-10-28 15:14:39 EDT ---
Thanks for your work and patch.
The first approach seems better. The second approach comes with more changes in
internal logic (addRawSubResult / setBytes vs addSubResult)
I thinks changing visibility to public for setEndTime() isn't a problem.

(next time: please used the file attachment field for your patch, Bugzilla
cutting long lines)

URL: http://svn.apache.org/viewvc?rev=1028437&view=rev
Log:
Bug 50080 - Transaction controller incorrectly creates samples including timer
duration

Modified:
   
jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/TransactionSampler.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
    jakarta/jmeter/trunk/xdocs/changes.xml

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 50080] Transaction controller incorrectly creates samples including timer duration

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50080

--- Comment #2 from jens_0@hotmail.com 2010-10-27 10:33:14 EDT ---
Here's a suggestion to solve the problem.

It requires changing the visibility of SampleResult's setEndTime from protected
to public.

Any concerns?

original/src/core/org/apache/jmeter/control/TransactionSampler.java Thu Jul 08
22:42:36 2010
+++ new/src/core/org/apache/jmeter/control/TransactionSampler.java Wed Oct 27
16:19:32 2010
@@ -49,0 +50,2 @@
+    private int totalTime = 0;
+   
@@ -101,0 +104 @@
+        totalTime += res.getTime();
@@ -113,0 +117,8 @@
+       
+        if (!transactionController.isIncludeTimers()) {
+         long end = SampleResult.currentTimeInMs();
+         
+         transactionSampleResult.setIdleTime(end -
transactionSampleResult.getStartTime() - totalTime);
+         transactionSampleResult.setEndTime(end);
+        }
+

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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