diff options
Diffstat (limited to 'TAO/performance-tests/Cubit/TAO/MT_Cubit/summarize')
-rwxr-xr-x | TAO/performance-tests/Cubit/TAO/MT_Cubit/summarize | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/summarize b/TAO/performance-tests/Cubit/TAO/MT_Cubit/summarize new file mode 100755 index 00000000000..3fb8cf24cc8 --- /dev/null +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/summarize @@ -0,0 +1,63 @@ +eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' + & eval 'exec perl -w -S $0 $argv:q' + if 0; + +# $Id$ +# +# Summarizes results from a series of runs of MT_Cubit_Test, with +# different numbers of clients. Example usage: +# +# $ for i in 0 1 2 5 10 15 20 25 30 35 40 45 50; do ./MT_Cubit_Test $i; done +# $ ./summarize +# +# The first three lines above let this script run without specifying the +# full path to perl, as long as it is in the user's PATH. +# Taken from perlrun man page. + +@files = glob 'client-*.log'; +@total_threads = (); + +foreach $file (@files) { + my ($i); + ($i = $file) =~ s/client-(\d+).log/$1/; + push @total_threads, $i; +} + +print " Round-trip, usec\n"; +print "Low-priority High-priority Low-priority\n"; +print " threads Latency Jitter Latency Jitter\n"; + +foreach $total_threads (sort {$a <=> $b} @total_threads) { + undef $high_latency; + undef $high_jitter; + undef $low_latency; + undef $low_jitter; + + open (FILE, "client-${total_threads}.log") || + die "$0: unable to open \"client-${total_threads}.log\"\n"; + while (<FILE>) { + #### Add 0.5 to round instead of truncate. + + if (/^High priority client latency : ([\d\.]+) msec, jitter: ([\d\.]+)/) { + #### For old versions of client.cpp that printed out in msec. + $high_latency = ($1 + 0.5) * 1000; + $high_jitter = ($2 + 0.5) * 1000; + } elsif (/^High priority client latency : ([\d\.]+) usec, jitter: ([\d\.]+)/) { + $high_latency = $1 + 0.5; + $high_jitter = $2 + 0.5; + } elsif (/^Low priority client latency : ([\d\.]+) msec, jitter: ([\d\.]+)/) { + #### For old versions of client.cpp that printed out in msec. + $low_latency = ($1 + 0.5) * 1000; + $low_jitter = ($2 + 0.5) * 1000; + last; + } elsif (/^Low priority client latency : ([\d\.]+) usec, jitter: ([\d\.]+)/) { + $low_latency = $1 + 0.5;; + $low_jitter = $2 + 0.5;; + last; + } + } + close FILE; + + printf " %3d %8d %8d %8d %8d\n", + $total_threads - 1, $high_latency, $high_jitter, $low_latency, $low_jitter; +} |