I am trying to do some benchmark testing on my server. I'd like to make the test script fork so i can simulate simultaneous HTTP GET requestss. How can I do this effectively?
This is what I have:
use LWP::Simple; use Time::HiRes qw(usleep gettimeofday tv_interval); open(URLS, "URL_LIST.txt") || die "Cannot Open URL_LIST.txt\n$!\n"; $startPounding = [gettimeofday]; while(<URLS>){ chomp; $t0 = [gettimeofday]; get($_); $t1 = [gettimeofday]; print LOG tv_interval($t0, $t1) . "\n"; } $endPounding = [gettimeofday]; close(URLS); print "Total Test Time: " . tv_interval($startPounding, $endPounding);
In reply to Forking in WinNT/2000 by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |