jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1379959 - in /jmeter/trunk/src/core/org/apache/jmeter: engine/RemoteJMeterEngineImpl.java engine/StandardJMeterEngine.java util/JMeterUtils.java
Date Sun, 02 Sep 2012 12:45:47 GMT
Author: pmouawad
Date: Sun Sep  2 12:45:47 2012
New Revision: 1379959

URL: http://svn.apache.org/viewvc?rev=1379959&view=rev
Log:
Extract gc and finalization calls in localized method as it is controversed.
Add call to System.runFinalization in StandardJMeterEngine.

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java
    jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
    jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java?rev=1379959&r1=1379958&r2=1379959&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java Sun Sep  2
12:45:47 2012
@@ -194,8 +194,7 @@ public final class RemoteJMeterEngineImp
         }
         log.info("Unbound from registry");
         // Help with garbage control
-        System.gc();
-        System.runFinalization();
+        JMeterUtils.helpGC();
     }
 
     public void rsetProperties(Properties p) throws RemoteException, IllegalStateException
{

Modified: jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java?rev=1379959&r1=1379958&r2=1379959&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java Sun Sep  2 12:45:47
2012
@@ -375,8 +375,8 @@ public class StandardJMeterEngine implem
          * at all (just delays test start by a tiny amount) and hitting one too
          * early in the test can impair results for short tests.
          */
-        System.gc();
-
+        JMeterUtils.helpGC();
+        
         JMeterContextService.getContext().setSamplingStarted(true);
         boolean mainGroups = running; // still running at this point, i.e. setUp was not
cancelled
         while (running && iter.hasNext()) {// for each thread group

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java?rev=1379959&r1=1379958&r2=1379959&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java Sun Sep  2 12:45:47 2012
@@ -1295,4 +1295,12 @@ public class JMeterUtils implements Unit
             }
         }
     }
-}
+    
+    /**
+     * Help GC by triggering GC and finalization
+     */
+    public static final void helpGC() {
+        System.gc();
+        System.runFinalization();
+    }
+}
\ No newline at end of file



Mime
View raw message