5

we are developing tool that's support For execute Jmx files in our Application currently i have issue with get the Execution Duration Time Based On Steping thread Group Values.

I got the Duration time by using Java

 public class SteppingThreadGroup {

    public static void main(String[] args) {
        int TotalThreads = 500,
            firstWait   = 25,
            thenStart_threads = 5,
            nextAdd_threads    = 25,                        
            threadsEverySeconds = 30,
            usingRamupSeconds = 5,  
            holdForSeconds =600,
            finallyStopThreads =25,
            down_threadsEverySeconds =25,
            //extra varaibles
            RemaingThreads =0, Duration=0;
        float RampDown =0,rampupTime =0;;

        if(thenStart_threads>0){
            rampupTime =(firstWait+usingRamupSeconds+threadsEverySeconds);
            RemaingThreads =TotalThreads-thenStart_threads;
            System.out.format("Inital_Remaing_threads=%S,Inital_rampupTime=%f \n\n",RemaingThreads,rampupTime);
//          System.out.format(" ",rampupTime);
        }else{
            rampupTime = (firstWait);
            RemaingThreads=TotalThreads;
        }
        while(RemaingThreads >0){
            if(RemaingThreads>nextAdd_threads)
                rampupTime+= (Duration+usingRamupSeconds+threadsEverySeconds);
            else if(RemaingThreads==nextAdd_threads)
                rampupTime +=(Duration+usingRamupSeconds);
            else
                rampupTime +=(Duration+(RemaingThreads*(usingRamupSeconds/nextAdd_threads)));

            RemaingThreads=RemaingThreads-nextAdd_threads;

        }
        RampDown=((TotalThreads/finallyStopThreads-1)*down_threadsEverySeconds);
        Duration=(int) (holdForSeconds+rampupTime+RampDown);

        System.out.format("RamupTime =%S && HoldForSeconds =%S \n RamDown =%S && Total_Duration=%S", 
                            rampupTime,holdForSeconds,RampDown,Duration);


    }
}

but is it possible to find The Duration In formula Base ?

I implement one Formula but its not working Fine as i expected.

enter image description here

The sample Stepping ThreadGroup Value Images

Image1:

enter image description here

Image2:enter image description here

Raju
  • 459
  • 5
  • 23

0 Answers0