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