Monday, November 15, 2010

Pacing issue with LoadRunner 9.5

One of my collegue discovered an issue with pacing in LoadRunner 9.5. It seems that if there is a pacing applied to the script then the VU waits for sometime after completing vuser_init function before executing Action function.

To confirm the issue he created following script with a randomized pacing between 90-120sec.
vuser_init()
{
 lr_output_message (lr_eval_string("init: {Timestamp}"));

 return 0;
}
 
Action()
{
 
 lr_output_message (lr_eval_string("Iteration: {Iteration} {Timestamp}"));

 return 0;
}
 
vuser_end()
{
 
 lr_output_message (lr_eval_string("end: {Timestamp}"));

 return 0;
}

Following is the output from Replay Log.



Based on the timestamp between vuser_init and iteration 1 we know that 60 seconds of pacing was applied even though the replay log does not show 'Waiting ## seconds for iteration pacing.' at the end of 'vuser_init'.

What this means is that, if you have a long pacing the vu will not generate load for a while eventhough LR scenario say's that the VU is in run state.

One way to overcome this issue is to write your own pacing code and setting pacing in run-time setting as "As soon as the previous iteration ends". See the Replay log after adding pacing code and changing the runtime setting. In this case, the iteration is expected to finish in 105seconds.



I haven't tested this issue in LR11. Let me know if this issue still exists in LR11.

No comments: