Explain again how WaitModMM works?

General discussion about eValid, its characteristis and applications.

Explain again how WaitModMM works?

Postby Brockc » Wed Oct 17, 2012 4:37 pm

Explain again how WaitModMM works?
Brockc
 
Posts: 1
Joined: Wed Oct 17, 2012 4:30 pm

Re: Explain again how WaitModMM works?

Postby eValid » Thu Nov 01, 2012 10:38 am

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
eValid
 
Posts: 2395
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to General Solution Topics

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons