Silk Performer allows you to adjust think times for each user type. With think time adjustment, a user type’s session time can easily be adjusted to your throughput requirements.
Returns the state of the current think time adjustment.
Kernel.bdh
GetThinkTimeAdjustment( out fThinkTimeFactor : float optional, out fSessionTime : float optional ) number;
Can be either:
OPT_TTA_NONE : Adjustment of think times is disabled.
OPT_TTA_STRESSTEST : Think times are ignored.
OPT_TTA_STATIC : Think times are multiplied by a static factor to adjust session time. The parameter fThinkTimeFactor is set.
OPT_TTA_DYNAMIC : Dynamic think time adaptation is used to keep throughput rates constant.
Parameter | Description |
---|---|
fThinkTimeFactor | Think times are multiplied by this static factor to adjust session time. |
fSessionTime | The session time to reach when dynamic think time adjustment is used. |
use "kernel.bdh" var nTrans : number init 0; dcluser user WebUser transactions TWeb : 1; dcltrans transaction TWeb var nTTA : number; begin nTrans := nTrans + 1; ThinkTime(3.0); if nTrans = 5 then SetThinktimeAdjustment(OPT_TTA_DYNAMIC, 3.0, 9.0); end; if nTrans = 9 then SetThinktimeAdjustment(OPT_TTA_NONE); end; nTTA := GetThinkTimeAdjustment(); write("thinktime adjustment: "); if nTTA = OPT_TTA_NONE then write("disabled"); elseif nTTA = OPT_TTA_STRESSTEST then write("stresstest"); elseif nTTA = OPT_TTA_STATIC then write("static"); elseif nTTA = OPT_TTA_DYNAMIC then write("dynamic"); end; end TWeb;