2 eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
3 & eval 'exec perl -w -S $0 $argv:q'
7 # Summarizes results from a series of runs of run_test, with
8 # different numbers of clients. Example usage:
10 # $ for i in 1 2 5 10 15 20 25 30 35 40 45 50; do ./run_test $i; done
13 # The first three lines above let this script run without specifying the
14 # full path to perl, as long as it is in the user's PATH.
15 # Taken from perlrun man page.
17 @files = glob 'client-*.log';
20 foreach $file (@files) {
22 ($i = $file) =~ s/client-(\d+).log/$1/;
23 push @total_threads, $i;
26 print "No.of threads\t\tAverage Latency\n\n";
28 foreach $total_threads (sort {$a <=> $b} @total_threads) {
32 open (FILE
, "client-${total_threads}.log") ||
33 die "$0: unable to open \"client-${total_threads}.log\"\n";
34 while ($line = <FILE
>) {
35 if ($line =~ /.*usec-per-message = ([\d\.]+)/)
43 printf "%3d\t\t\t%8f\n",
44 $total_threads, $high_latency/$number;