pcl2004_27 发表于 2006-10-25 13:41:11

LoadRunner:Staggering Vuser start times

Description

      The following method is a quick way to stagger Vuser start times.


Solution

      I often use the Controller to start Vusers rather than the scheduler (personal preference, I guess). If you want to stagger your Vusers so they don't all start at the moment you hit "Play," here's a quick and easy method to space them out.

Put this code into the first action they run:
if(atoi(lr_eval_string("{Iteration}")) == 1)
lr_think_time(atoi(lr_eval_string("{Vuser}")) % 10);

Also, add a parameter called Vuser that's the Vuser ID, and a parameter Iteration that's the iteration number.

This basically pauses 1 second * the last digit of their user number; ex. user 101 would wait 1 second before starting, user 106 would wait 6 seconds, etc. It only pauses during the first iteration; after that, there's no pause.
页: [1]
查看完整版本: LoadRunner:Staggering Vuser start times