Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / orbsvcs / tests / EC_Multiple / run_dynamic
blob8669e5b9b1d87153f06a54d8ef854b0b701185c2
1 #!/bin/sh
3 # The number of messages to send.
4 MSG_COUNT=100
6 # The number of high-priority consumers.
7 HP_CONSUMERS="1"
9 # The number of high-priority suppliers
10 HP_SUPPLIERS="1"
12 # The number of low-priority consumers
13 # LP_CONSUMERS="1 5 10 20"
14 LP_CONSUMERS="1 10 100 200 300 500 1000"
16 HP_INTERVAL=250000
17 LP_INTERVAL=250000
19 ########
20 ######## Enable signal handler.
21 ########
22 done=0
23 trap 'done=1; \
24 if [ "$NameServicePID" ]; then \
25 kill -1 $NameServicePID; NameServicePID=; \
26 fi; \
27 /bin/rm -f NameService.ior' 0 1 2 3 15
30 for s in $HP_SUPPLIERS; do
31 for c in $LP_CONSUMERS; do
32 ../../Naming_Service/Naming_Service \
33 -ORBobjrefstyle url -o NameService.ior >/dev/null 2>&1 &
34 NameServicePID=$!
35 sleep 2
36 while [ ! -f NameService.ior -a $done -eq 0 ]; do
37 echo waiting for NameService.ior; sleep 2
38 done
39 NameService=`cat NameService.ior`
40 export NameService
42 echo Consumers = $c Suppliers = $s
43 # ./EC_Multiple -l ECM3 -s local -d sched \
44 # -h ${s},${s},0,${HP_INTERVAL},${MSG_COUNT},1,2,1,2 \
45 # -w 1,${c},0,${LP_INTERVAL},${MSG_COUNT},3,4,3,4 > \
46 # DYN.LCL.S${s}.C${c}.log 2>&1
47 ./EC_Multiple -l ECM3 -s runtime \
48 -h ${s},${s},0,${HP_INTERVAL},${MSG_COUNT},1,2,1,2 \
49 -w 1,${c},0,${LP_INTERVAL},${MSG_COUNT},3,4,3,4 > \
50 DYN.LCL.S${s}.C${c}.log 2>&1
52 if [ $done -eq 1 ]; then exit 1; fi
54 kill -1 $NameServicePID; NameServicePID=
55 done
56 done