[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] commit a short script to do lots of fetches through tor at ...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] commit a short script to do lots of fetches through tor at ...
- From: arma@seul.org (Roger Dingledine)
- Date: Sun, 21 Nov 2004 01:35:24 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sun, 21 Nov 2004 01:35:46 -0500
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home2/or/cvsroot/tor/contrib
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/contrib
Added Files:
tor-stress
Log Message:
commit a short script to do lots of fetches through tor at once
when you do 20 or so at once, things start going odd.
might be privoxy, might be tor.
--- NEW FILE: tor-stress ---
#!/usr/bin/perl
require 'sys/syscall.ph';
use POSIX qw(strftime);
$|=1;
$total = 1;
for($i=0;$i<$total;$i++) {
print "Starting client $i\n";
$pid = fork();
if(!$pid) {
open(FD,"wget -q -O - http://www.cnn.com/|");
$c = 0;
while(<FD>) {
$c += length($_);
}
($s, $usec) = gettimeofday;
$TIMEVAL_T = "LL";
$now = pack($TIMEVAL_T, ());
syscall(&SYS_gettimeofday, $now, 0) != -1 or die "gettimeofday: $!";
@now = unpack($TIMEVAL_T, $now);
# $now_string = strftime "%b %d %H:%M:%S", gmtime;
# $now_string .= $now[1]/1000;
print "Client $i exiting ($c chars: $now[1]).\n";
exit(0);
}
# sleep(1);
}