Yes, first all all you can specify a minimum thinktime by using a random variable which generates floating-point values following a uniform distribution. Please ensure to uncheck the "Random Thinking time" checkbox in order to use your thinktime range only. This setting can be found in SETTINGS | ACTIVE PROFILE | SIMULATION. benchmark BenchmarkName use "kernel.bdh" // Declare a random float between 5.0 and 10.0 dclrand rthinktime : RndUniF ( 5.0..10.0 ); dcluser user VirtUser transactions TmyTrans1 : 1 ; transaction TmyTrans1 begin //Insert random float into thinktime function and also write it to vUsers output file writeln (Thinktime(rthinktime)); WebPageUrl ("http://www.demo.com" , "Home Page" ); end TmyTrans1; You can specify a limit to the maximum think time by using the SetThinkTimeLimit function. Using the above example you could specify a maximum limit of 8.0 seconds which would result in no think times exceeding this limit even though the random variable has a limit of 10.0. The SetThinkTimeLimit is used in the following syntax: benchmark BenchmarkName use "kernel.bdh" // Declare a random float between 5.0 and 10.0 dclrand rthinktime : RndUniF ( 5.0..10.0 ); dcluser user VirtUser transactions TmyTrans1 : 1 ; transaction TmyTrans1 begin SetThinkTimeLimit ( true , 8.0 ) //sets a max thinktime of 8.0 seconds //Insert random float into thinktime function and also write it to vUsers output file writeln (Thinktime(rthinktime)); WebPageUrl ("http://www.demo.com" , "Home Page" ); end TmyTrans1;
↧