Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / examples / IPC_SAP / SOCK_SAP / summarize.pl
blobaea2285cbb406dd77f9df55e615ca01faad303b3
1 #!/usr/bin/env perl
2 eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
3 & eval 'exec perl -w -S $0 $argv:q'
4 if 0;
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
11 # $ ./summarize
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';
18 @total_threads = ();
20 foreach $file (@files) {
21 my ($i);
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) {
29 undef $high_latency;
31 $high_latency = 0;
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\.]+)/)
37 $high_latency += $1 ;
38 $number++;
41 close FILE;
43 printf "%3d\t\t\t%8f\n",
44 $total_threads, $high_latency/$number;