Re: Simultaneus execution
| From: | Marek Kilimajer | Date: | Sun, 29 Aug 2004 14:34:04 +0000 |
| Subject: | Re: Simultaneus execution | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195076@lists.php.net to get a copy of this message | ||
Andrew wrote:
Now look - I want to make a test/debug engine, that will optimize the performance of each machine I make tests on - my idea is to run as many similar processes as possible in the tasklist of the OS. That would be the same as creating multiple child processes of a single script. The results will be - flooding the RAM, decrees CPU performance, that kind of stuff, but in the end I should have stats about how each machine performed in different disciplines - db querying (insert/select), file manipulations, etc. I was thinking to create child script (that I want executed more than once) and additional socket script, that should connect to the child script through HTTP and execute it. In the end the child script would send a message to the socket that would close it. The nice thing about sockets is that they shouldn't wait the previous socket to close, before next is opened, so what I would do is similar to opening, for example, 500 browser windows and load one same page.You can use sockets in nonblocking mode. I hope I got what you want to achieve. See socket_set_nonblock()