jsalvata    2003/11/28 16:47:34

  Modified:    src/core/org/apache/jmeter/engine StandardJMeterEngine.java
  Log:
  Run a full GC just before starting the test.
  
  Revision  Changes    Path
  1.39      +11 -1     
jakarta-jmeter/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
  
  Index: StandardJMeterEngine.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- StandardJMeterEngine.java 7 Nov 2003 16:42:30 -0000       1.38
  +++ StandardJMeterEngine.java 29 Nov 2003 00:47:34 -0000      1.39
  @@ -290,11 +290,21 @@
           // and the listeners, and the timer
           JMeterThread[] threads;
           Iterator iter = searcher.getSearchResults().iterator();
  +
  +        /*
  +         * Here's where the test really starts. Run a Full GC now: it's no
  +         * harm 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();
  +        
           if (iter.hasNext())
           {
               notifyTestListenersOfStart();
           }
           notifier = new ListenerNotifier();
  +        
           schcdule_run = true;
           JMeterContextService.getContext().setSamplingStarted(true);
           int groupCount = 0;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to