summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-09-23 04:05:50 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-09-23 04:05:50 +0000
commit8f15c7f08e403a7850641cd1514977f87183ac82 (patch)
tree7e7322f54f79468d30dfc3828ad5ff3797f88b23
parent3fa4c0bae2f49e0d6ed7a06fc7ffc8db01413cae (diff)
downloadATCD-8f15c7f08e403a7850641cd1514977f87183ac82.tar.gz
summarizes results of multiple MT_Cubit_Test runs
-rwxr-xr-xTAO/performance-tests/Cubit/TAO/MT_Cubit/summarize51
1 files changed, 51 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..0163b2226cb
--- /dev/null
+++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/summarize
@@ -0,0 +1,51 @@
+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 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';
+@low_priority_threads = ();
+
+foreach $file (@files) {
+ ($l = $file) =~ s/client-(\d+).log/$1/;
+ push @low_priority_threads, $l - 1;
+}
+
+print " Round-trip, usec\n";
+print "Low-priority High-priority Low-priority\n";
+print " threads Latency Jitter Latency Jitter\n";
+
+foreach $low (sort {$a <=> $b} @low_priority_threads) {
+ undef $high_latency;
+ undef $high_jitter;
+ undef $low_latency;
+ undef $low_jitter;
+
+ open (FILE, "client-${low}.log") ||
+ die "$0: unable to open \"client-${low}.log\"\n";
+ while (<FILE>) {
+ if (/^High priority client latency : ([\d\.]+).*jitter: ([\d\.]+)/) {
+ $high_latency = $1 * 1000;
+ $high_jitter = $2 * 1000;
+ } elsif (/^Low priority client latency : ([\d\.]+).*jitter: ([\d\.]+)/) {
+ $low_latency = $1 * 1000;
+ $low_jitter = $2 * 1000;
+ last;
+ }
+ }
+ close FILE;
+
+ printf " %3d %8d %8d %8d %8d\n",
+ $low, $high_latency, $high_jitter, $low_latency, $low_jitter;
+}