multi processes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • amadain

    #1

    multi processes

    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

  • garrickp@gmail.com

    #2
    Re: multi processes

    On Feb 14, 7:53 am, "amadain" <mfmdev...@gmai l.comwrote:
    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.



    Comment

    • amadain

      #3
      Re: multi processes

      On Feb 14, 3:32 pm, garri...@gmail. com wrote:
      On Feb 14, 7:53 am, "amadain" <mfmdev...@gmai l.comwrote:
      >
      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.

      Comment

      Working...