On Feb 14, 3:32 pm, [EMAIL PROTECTED] wrote: > On Feb 14, 7:53 am, "amadain" <[EMAIL PROTECTED]> wrote: > > > Hi > > Heres a poser. I want to start a program 4 times at exactly the same > > time (emulating 4 separate users starting up the same program). I am > > using pexpect to run the program from 4 separate locations accross the > > network. How do I start the programs running at exactly the same time? > > I want to time how long it takes each program to complete and to show > > if any of the program initiations failed. I also want to check for > > race conditions. The program that I am running is immaterial for this > > question - it could be mysql running queries on the same database for > > example. Using threading, you call start() to start each thread but if > > I call start on each instance in turn I am not starting > > simultaneously. > > A > > Standard answers about starting anything at *exactly* the same time > aside, I would expect that the easiest answer would be to have a fifth > controlling program in communication with all four, which can then > send a start message over sockets to each of the agents at the same > time. > > There are several programs out there which can already do this. One > example, Grinder, is designed for this very use (creating concurrent > users for a test). It's free, uses Jython as it's scripting language, > and even is capable of keeping track of your times for you. IMO, it's > worth checking out. > > http://grinder.sourceforge.net
Thank you. I'll check that out. -- http://mail.python.org/mailman/listinfo/python-list