[or-cvs] clean up tor-stress a bit, for posterity

Roger Dingledine arma at seul.org
Mon Nov 22 00:10:37 UTC 2004


Update of /home2/or/cvsroot/tor/contrib
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/contrib

Modified Files:
	tor-stress 
Log Message:
clean up tor-stress a bit, for posterity


Index: tor-stress
===================================================================
RCS file: /home2/or/cvsroot/tor/contrib/tor-stress,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- tor-stress	21 Nov 2004 06:35:22 -0000	1.1
+++ tor-stress	22 Nov 2004 00:10:35 -0000	1.2
@@ -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);



More information about the tor-commits mailing list