Quantcast
Channel: Silk Performer
Viewing all articles
Browse latest Browse all 4084

Forum Post: RE: insert delay between requests

$
0
0
I would do it by creating a global variable for the vuser. Say you create a global variable called "gnIter: number". Then you can initialize it to 1 in TInit. Then within TWork transaction, check the value of the global variable and decide how many milliseconds you want to delay using the Wait statement. Then increment the global variable before leaving your transaction (gnIter := gnIter + 1;) For example, dcltrans  transaction TWork  var  begin    if gnIter = 1 then Wait 0.5;    elseif (gnIter 2) and (gnIter 5) then Wait 0.6;    elseif (gnIter 5) and (gnIter 10) then Wait 0.7;    else Wait 0.3; end;    // your transaction code    ...    gnIter := gnIter + 1;  end;

Viewing all articles
Browse latest Browse all 4084

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>