Changeset d6dd05b in lab.git for misc/httpbench.pl
- Timestamp:
- Nov 2, 2013 11:58:01 PM (11 years ago)
- Branches:
- master
- Children:
- 257952a
- Parents:
- 512faed
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
misc/httpbench.pl
r512faed rd6dd05b 35 35 36 36 my $pm = Parallel::ForkManager->new($concurrency); 37 for (my $i = 0; $i < $loops; $i++) { 38 for (my $child = 0; $child < $concurrency; $child++) { 39 $pm->start and next; 37 for (my $child = 0; $child < $concurrency; $child++) { 38 if ($pm->start) { 39 warn "forks $child/$concurrency child ...\n"; 40 next; 41 } 42 for (my $i = 0; $i < $loops; $i++) { 43 print STDERR "processing $i/$loops loop\r"; 40 44 foreach my $url (@urls) { 41 45 get($url) or warn "fail: $url\n"; 42 46 sleep($wait); 43 47 } 44 $pm->finish; 45 } 46 print STDERR " ... ", $num * $concurrency * ($i + 1), " requesting\r"; 48 } 49 $pm->finish; 47 50 } 48 51 $pm->wait_all_children;
Note: See TracChangeset
for help on using the changeset viewer.