Brockc wrote:Explain again how WaitModMM works?
This command is usually used to synchronize between eValid processes, by having all of them wait until the same instant to start an action.
You would want this to happen in server loading, when you want to see the effect of having 100's or 1,000's of users all trying the SAME page at the SAME time.
This command uses "modular arithmetic" based on the number of minutes in the current hour on the system clock. [There are also commands that do the same thing on the basis of hours, but these are less often used except in some kinds of monitoring situations.]
Here's how it works:
Suppose you have
WaitModMM 3 in your script.
This says, "Wait at this point until the remainder of the number of minutes divided by 3 is equal to 0." So if it is 19 minutes past the hour, the remainder of 19 / 3 = 1 so the command will continue to wait. When the number of minutes on the clock is an exact multiple of 3, then the command releases.
So if it was 19 minutes past the hour and the command continued to wait, then the command will "go" at 21 minutes past the hour. 21 / 3 = 7 even, with no remainder. If there were other eValid scripts playing back and doing the same
WaitModMM command they would ALL start at that instant.
In mathematical terms, the
WaitModMM N command waits until the arithmetic residue (remainder) of the minutes modulo
N is zero.
Returning to the example, 21 mod 3 = 0, for example.
_______________________
eValid Monitoring Support