summaryrefslogtreecommitdiff
path: root/TAO/performance-tests
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-04-28 02:58:51 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-04-28 02:58:51 +0000
commit1fb2f25b9f58d5ad0e7540d17634b8b351fa5907 (patch)
tree60ad46d0e5bd5bab321c2c8233ad7675ed8fe9ca /TAO/performance-tests
parent8954f0d3fa666407cb1e4c9ee109df4bac25fd66 (diff)
downloadATCD-1fb2f25b9f58d5ad0e7540d17634b8b351fa5907.tar.gz
added
Diffstat (limited to 'TAO/performance-tests')
-rwxr-xr-xTAO/performance-tests/Cubit/TAO/MT_Cubit/MT_Cubit_Test49
1 files changed, 49 insertions, 0 deletions
diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/MT_Cubit_Test b/TAO/performance-tests/Cubit/TAO/MT_Cubit/MT_Cubit_Test
new file mode 100755
index 00000000000..9c2f3659683
--- /dev/null
+++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/MT_Cubit_Test
@@ -0,0 +1,49 @@
+#! /bin/sh
+# $Id$
+#
+# Spawns MT_Cubit server and client executables on a single host.
+
+usage="usage: $0 [-n <iterations>] <number of low priority threads>"
+
+user=`whoami`
+ior_file=/var/tmp/MT_Cubit-ior.${user}
+iterations=100
+
+
+########
+######## Interpret command arguments.
+########
+while getopts ?n: arg; do
+ case $arg in
+ '?' ) echo $usage; exit 0 ;;
+ n ) iterations=$OPTARG ;;
+ esac
+done
+shift `expr $OPTIND - 1`
+
+if [ $# -ne 1 ]; then
+ echo $usage
+ exit 1
+fi
+threads=`expr $1 + 1`
+
+
+########
+######## Enable signal handler.
+########
+trap 'kill -1 $server_pid; /bin/rm -f $ior_file' 0 1 2 15
+
+
+########
+######## Start server and save its pid.
+########
+./server -s -f $ior_file -t $threads > server.log 2>&1 &
+server_pid=$!
+
+sleep 4
+
+
+########
+######## Start client.
+########
+./client -s -f $ior_file -t $threads -n $iterations > client.log 2>&1