jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Mouawad <philippe.moua...@gmail.com>
Subject BUG 53501
Date Sun, 08 Jul 2012 13:25:21 GMT
Hello,
I investigated this issue.
My idea to fix it is the following:

   - Add 2 new methods on AbstractThreadGroup:
      - public void start()  => Called when
      StandardJMeterEngine#startThreadGroup is called just before JMeterThread
      creation loop. It will notify AbstractThreadGroup that it is started
      - public void registerStartedThread(JMeterThread jmeterThread, Thread
      newThread) , which will be called just after Thread creation
      - public void stop(); => Called when stop or shutdown is called
      - Then in ThreadGroup, if scheduler mode is on , start will start a
   Timer that will execute on end of duration or at endTime. This timer will
   call on each JMeterThread of the Group:


   1. JMeterThread item = entry.getKey();
               item.stop(); // set stop flag
               item.interrupt(); // interrupt sampler if possible
               Thread t = entry.getValue();
               if (t != null ) { // Bug 49734
                   t.interrupt(); // also interrupt JVM thread
               }


   - I will also have to handle premature stops to cancel timerTask.



These changes will impact AbstractThreadGroup which is extended by Plugins
(JMETER Plugins @GC for example).  But for now they will just have to
recompile.

They will also have to call super.start() if they implement method in the
future.


It tried it and it fixes the issue but I wanted your ideas on impacts I may
not have foreseen.
Regards
Philippe

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