summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-11-22 00:10:35 +0000
committerRoger Dingledine <arma@torproject.org>2004-11-22 00:10:35 +0000
commit604be3ae448c8e3d79ddbc80bbc483365110d272 (patch)
tree2ce9d6362d504ef682bbbbc41d9f91f64fa374d6
parent4f2c2c99488d53294d1e0445055c8fdcde4ccb06 (diff)
downloadtor-604be3ae448c8e3d79ddbc80bbc483365110d272.tar.gz
tor-604be3ae448c8e3d79ddbc80bbc483365110d272.zip
clean up tor-stress a bit, for posterity
svn:r2933
-rwxr-xr-xcontrib/tor-stress9
1 files changed, 3 insertions, 6 deletions
diff --git a/contrib/tor-stress b/contrib/tor-stress
index ac82973aa3..e59a968af4 100755
--- a/contrib/tor-stress
+++ b/contrib/tor-stress
@@ -1,28 +1,25 @@
#!/usr/bin/perl
require 'sys/syscall.ph';
-use POSIX qw(strftime);
$|=1;
$total = 1;
+$target = "http://www.cnn.com/";
for($i=0;$i<$total;$i++) {
print "Starting client $i\n";
$pid = fork();
if(!$pid) {
- open(FD,"wget -q -O - http://www.cnn.com/|");
+ open(FD,"wget -q -O - $target|");
$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";
+ print "Client $i exiting ($c chars).\n";
exit(0);
}
# sleep(1);