Author: sebb
Date: Mon Sep 19 22:50:16 2011
New Revision: 1172874

URL: http://svn.apache.org/viewvc?rev=1172874&view=rev
Log:
Adjust nanoTime fudge factors.

Modified:
    
jakarta/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java?rev=1172874&r1=1172873&r2=1172874&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java 
(original)
+++ 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java 
Mon Sep 19 22:50:16 2011
@@ -211,19 +211,21 @@ public class TestSampleResult extends Te
             long overallTime = resWithSubResults.currentTimeInMillis() - 
beginTest;
 
             // Check the sample times
+            final long fudge1 = 15;
             long allsamplesTime = sampleWithSubResultsTime + sample1Time + 
sample2Time;
-            if (totalTime+3 < allsamplesTime) { // Add fudge factor
-                fail("Total+3: "+totalTime+" < sum(samples): "+ 
allsamplesTime);
+            if (totalTime + fudge1 < allsamplesTime) { // Add fudge factor
+                fail("Total: " + totalTime + " " + fudge1 + " < sum(samples): 
"+ allsamplesTime);
             }
             /*
              * The granularity of System.currentTimeMillis() - plus the fact 
that the nanoTime()
              * offset is now calculated for each sampleResult - means that 
there can be some
              * minor variation in the value returned by 
SampleResult#currentTimeInMillis().
              * 
-             * Allow for this by adding a fudge factor - 3ms seems to be 
sufficient.
+             * Allow for this by adding a fudge factor
             */
-            if (totalTime > overallTime+3) {
-                fail("Total: "+totalTime+" > 3 + overall time: "+ overallTime);
+            long fudge2 = 13;
+            if (totalTime > overallTime + fudge2) {
+                fail("Total: "+totalTime+" > overall time: "+ overallTime + " 
+ " + fudge2);
             }
             
             // Check that calculator gets the correct statistics from the 
sample



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

Reply via email to