vdaburon opened a new issue, #6319:
URL: https://github.com/apache/jmeter/issues/6319

   ### Use case
   
   Add a thread variable __jmv_THEAD_START_TIME_ITERATION that contains the 
System.currentTimeMillis() when the iteration start for the current thread (or 
the variable name : __jmv_START_TIME_ITERATION) 
   
   This thread variable will useful for a new Pacing Timer or Pacing Pause
   
   The pacing is the minimum time before the next iteration.
   
   The Pacing Timer will dynamically compute the waiting time to add the 
duration of current iteration to the pacing time.
   E.g: 
   Pacing 30 sec and the current time duration for the thread is 25 sec, we 
will add dynamically 5 sec.
   
   Pacing 30 sec and the current time duration for the thread is 20 sec, we 
will add dynamically 10 sec.
    
   Pacing 30 sec and the current time duration for the thread is 32 sec, we 
will add dynamically 0 sec because the current time duration is greater than 
the Pacing time.
   
   Current time iteration duration for the thread is (System.currentTime() - 
Long.parseLong(__jmv_THEAD_START_TIME_ITERATION )).
   
   ### Possible solution
   
   Add a new variable in JMeterVariables classe likes :
   <code>
      private long startTimeIteration = resetStartTimeIteration();
   
       and setter getter :
       public void resetStartTimeIteration() {
             startTimeIteration = System.currentTimeMillis();
       }
   
       public long getStartTimeIteration() {
           return startTimeIteration;
       }
   </code>
   ====================================== 
   
   This variable is Unmodifiable JMeter Variables. Add in 
UnmodifiableJMeterVariables classe
   
   <code>
      @Override
       public int getStartTimeIteration() {
           return variables.getStartTimeIteration();
       }
   
       @Override
       public int resetStartTimeIteration() {
           throw new UnsupportedOperationException();
       }
   </code>
   ======================================
   
   Maybe in JMeterThread classe
   <code>
      void notifyTestListeners() {
           threadVars.incIteration();
          threadVars.resetStartTimeIteration();
           for (TestIterationListener listener : testIterationStartListeners) {
   
   </code>
   
   ### Possible workarounds
   
   _No response_
   
   ### JMeter Version
   
   6.0
   
   ### Java Version
   
   open JDK 17
   
   ### OS Version
   
   All OS


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jmeter.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to