Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / orbsvcs / tests / EC_Multiple / run_overhead
blobc8fe5e11b2b7d429c0808e0489a3868469350ec1
1 #!/bin/sh
3 MSG_INTERVAL=5000 # 50000
4 # The interval between the messages, in usecs
6 UTL_COUNT=50000 # 500000
7 # The number of iterations in the scavenger thread; each iteration is
8 # (roughly) 20 usecs (On a Sparc Ultra 30); and the number of
9 # iterations must be high enough so all the messages are sent while
10 # the scavenger is still running.
12 MSG_COUNTS="1 50 100 150 200 250 300 350 400 450 500 550 600 650 700 "
13 "750 800 850 900 950 1000"
14 # The number of messages sent on each test...
16 RPT_ITER="01 02 03 04 05 06 07 08 09 10"
17 # The iterations for the final test.
19 RPT_MSGS=1000
20 # The number of messages in the final test.
22 /bin/rm -f NameService.ior NameService.pid EC1.pid EC2.pid EC.pid
24 for i in $RPT_ITER; do
25 echo Short circuit RPT test $i
26 sleep 1
27 ./EC_Multiple -l EC1 -s RUNTIME1 \
28 -a 1 -b 2 -c 2 -p EC1.pid -m $RPT_MSGS -u $UTL_COUNT \
29 -i $MSG_INTERVAL -x > OVH.RPT.X.${i}.log 2>&1
31 echo Local RPT EC test $i
32 ../../Naming_Service/Naming_Service \
33 -o NameService.ior -p NameService.pid >/dev/null 2>&1 &
34 sleep 2
35 NameService=`cat NameService.ior`
36 export NameService
37 ./EC_Multiple -l EC1 -s RUNTIME1 \
38 -a 1 -b 2 -c 2 -p EC1.pid -m $RPT_MSGS -u $UTL_COUNT \
39 -i $MSG_INTERVAL > OVH.RPT.LCL.${i}.log 2>&1
40 kill `cat NameService.pid`
42 echo Remote RPT EC test $i
43 ../../Naming_Service/Naming_Service \
44 -o NameService.ior -p NameService.pid >/dev/null 2>&1 &
45 sleep 2
46 NameService=`cat NameService.ior`
47 export NameService
48 ./EC_Multiple -l EC1 -r EC2 -s RUNTIME1 -o RUNTIME2 \
49 -a 1 -b 2 -c 3 -p EC1.pid -m $RPT_MSGS -u $UTL_COUNT \
50 -i $MSG_INTERVAL > OVH.RPT.RMT1.${i}.log 2>&1 &
51 ./EC_Multiple -l EC2 -r EC1 -s RUNTIME2 -o RUNTIME1 \
52 -a 4 -b 3 -c 2 -p EC2.pid -m $RPT_MSGS -u $UTL_COUNT \
53 -i $MSG_INTERVAL > OVH.RPT.RMT2.${i}.log 2>&1 &
54 sleep 2
55 wait `cat EC1.pid`
56 wait `cat EC2.pid`
57 kill `cat NameService.pid`
58 wait
59 done
61 exit 0
63 # This tests prove that the overhead is linear on the number of
64 # messages...
66 # Generate the baseline data, i.e. shortcircuit the EC.
68 for i in $MSG_COUNTS; do
69 echo Short circuit test $i
70 sleep 1
71 ./EC_Multiple -l EC1 -s RUNTIME1 \
72 -a 1 -b 2 -c 2 -m $i -u $UTL_COUNT \
73 -i $MSG_INTERVAL -x > OVH.X.${i}.log 2>&1
74 done
76 # Generate the local data, i.e. what is the overhead of using the local EC.
77 for i in $MSG_COUNTS; do
78 echo Local EC test $i
79 ../../Naming_Service/Naming_Service \
80 -o NameService.ior -p NameService.pid >/dev/null 2>&1 &
81 sleep 2
82 NameService=`cat NameService.ior`
83 export NameService
84 ./EC_Multiple -ORBport 0 -l EC1 -s RUNTIME1 \
85 -a 1 -b 2 -c 2 -m $i -u $UTL_COUNT \
86 -i $MSG_INTERVAL -p EC1.pid > OVH.LCL.${i}.log 2>&1
87 kill `cat NameService.pid`
88 done
90 # Generate the remote data, this test is much slower since the latency
91 # can be as high as 2 msec
92 for i in $MSG_COUNTS; do
93 echo Remote EC test $i
94 ../../Naming_Service/Naming_Service \
95 -o NameService.ior -p NameService.pid >/dev/null 2>&1 &
96 sleep 2
97 NameService=`cat NameService.ior`
98 export NameService
99 ./EC_Multiple -l EC1 -r EC2 -s RUNTIME1 -o RUNTIME2 \
100 -a 1 -b 2 -c 3 -p EC1.pid -m $i -u $UTL_COUNT \
101 -i $MSG_INTERVAL > OVH.RMT1.${i}.log 2>&1 &
102 ./EC_Multiple -l EC2 -r EC1 -s RUNTIME2 -o RUNTIME1 \
103 -a 4 -b 3 -c 2 -p EC2.pid -m $i -u $UTL_COUNT \
104 -i $MSG_INTERVAL > OVH.RMT2.${i}.log 2>&1 &
105 sleep 2
106 wait `cat EC1.pid`
107 wait `cat EC2.pid`
108 kill `cat NameService.pid`
109 wait
110 done