Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / orbsvcs / tests / EC_Multiple / gen_latency
blob07456dcefe321126a727dd3bd0d892705b797099
1 #!/bin/sh
3 HP_SUPPLIERS="1 2 10"
4 HP_CONSUMERS="1 5 10 20"
6 for s in $HP_SUPPLIERS; do
7 echo Supplier = $s
8 ./histo.pl -k 'Latency\[LCL' LTC.ECM1.S${s}.*.log LTC.ECM2.S${s}.*.log >LTC.LCL.S${s}.histo
9 ./histo.pl -k 'Latency\[RMT' LTC.ECM1.S${s}.*.log LTC.ECM2.S${s}.*.log >LTC.RMT.S${s}.histo
11 for c in $HP_CONSUMERS; do
12 x=`expr $c - 1`
13 l=`printf %02.2d $x`
14 echo Consumer = $c, LAST = $l
15 ./histo.pl -k 'Latency\[LCL,HP00' LTC.ECM1.S${s}.C${c}.log LTC.ECM2.S${s}.C${c}.log >LTC.LCL.S${s}.C${c}.FIRST.histo
16 ./histo.pl -k 'Latency\[RMT,HP00' LTC.ECM1.S${s}.C${c}.log LTC.ECM2.S${s}.C${c}.log >LTC.RMT.S${s}.C${c}.FIRST.histo
17 ./histo.pl -k "Latency\[LCL,HP${l}" LTC.ECM1.S${s}.C${c}.log LTC.ECM2.S${s}.C${c}.log >LTC.LCL.S${s}.C${c}.LAST.histo
18 ./histo.pl -k "Latency\[RMT,HP${l}" LTC.ECM1.S${s}.C${c}.log LTC.ECM2.S${s}.C${c}.log >LTC.RMT.S${s}.C${c}.LAST.histo
20 ./histo.pl -k "Latency\[LCL,HP" LTC.ECM1.S${s}.C${c}.log LTC.ECM2.S${s}.C${c}.log >LTC.LCL.S${s}.C${c}.histo
21 ./histo.pl -k "Latency\[RMT,HP" LTC.ECM1.S${s}.C${c}.log LTC.ECM2.S${s}.C${c}.log >LTC.RMT.S${s}.C${c}.histo
23 ./histo.pl -k 'Latency\[LCL,HP00' LTC.LCL.S${s}.C${c}.log >LTC.XLCL.S${s}.C${c}.FIRST.histo
24 ./histo.pl -k "Latency\[LCL,HP${l}" LTC.LCL.S${s}.C${c}.log >LTC.XLCL.S${s}.C${c}.LAST.histo
25 ./histo.pl -k "Latency\[LCL,HP" LTC.LCL.S${s}.C${c}.log >LTC.XLCL.S${s}.C${c}.histo
26 done
27 done
29 for f in LTC.*.histo; do
30 b=`basename $f .histo`
31 tail +3 $f | sort -n > ${b}.data
32 done
34 for i in XLCL; do
35 grep Min LTC.${i}.*.FIRST.histo |
36 sed -e "s/LTC.$i.S//" -e 's/\.C/ /' -e 's/.FIRST.histo:/ /' -e 's/\,/ /g' |
37 awk '{print $1, $2, $4, $6, $8, $10}' |
38 sort -k 1n -k 2n > LTC.${i}.FIRST.tbl
39 grep Min LTC.${i}.*.LAST.histo |
40 sed -e "s/LTC.$i.S//" -e 's/\.C/ /' -e 's/.LAST.histo:/ /' -e 's/\,/ /g' |
41 awk '{print $1, $2, $4, $6, $8, $10}' |
42 sort -k 1n -k 2n > LTC.${i}.LAST.tbl
43 paste LTC.${i}.FIRST.tbl LTC.${i}.LAST.tbl |
44 awk '{print $1, $2, $3, $4, $5, $6, $9, $10, $11, $12}' > LTC.${i}.tbl
45 done
47 for i in LCL RMT; do
48 grep Min `ls LTC.${i}.*.histo | grep -v FIRST | grep -v LAST` |
49 sed -e "s/LTC.$i.S//" -e 's/\.C/ /' -e 's/.histo:/ /' -e 's/\,/ /g' |
50 awk '{print $1, $2, $4, $6, $8, $10}' |
51 sort -k 1n -k 2n > LTC.${i}.tbl
52 done
54 paste LTC.LCL.tbl LTC.RMT.tbl |
55 awk '{print $1, $2, $3, $4, $5, $6, $9, $10, $11, $12}' > LTC.LCLRMT.tbl
57 exit 0
59 for s in $HP_SUPPLIERS; do
60 gnuplot <<_EOF_
61 set grid xtics ytics
62 set ylabel "Relative frequency"
64 set xlabel "Latency (usecs) [$s suppliers, local events]"
65 set terminal postscript eps color
66 set output "LTC.LCL.S${s}.eps"
67 plot 'LTC.LCL.S${s}.data' w i
68 #set terminal x11
69 #plot 'LTC.LCL.S${s}.data' w i
70 #pause 2
72 set xlabel "Time (usecs) [$s suppliers, remote events]"
73 set terminal postscript eps
74 set output "LTC.RMT.S${s}.eps"
75 plot 'LTC.RMT.S${s}.data' w i
76 #set terminal x11
77 #plot 'LTC.RMT.S${s}.data' w i
78 #pause 2
80 _EOF_
81 done
83 for i in LTC.*.eps; do
84 b=`basename $i .eps`
85 gs -sDEVICE=jpeg -g640x480 -r110x110 -sNOPAUSE \
86 -sOutputFile="${b}.jpg" ${b}.eps quit.ps
87 done