Merge pull request #2240 from DOCGroup/revert-2239-jwi-pi23
[ACE_TAO.git] / ACE / bin / performance_stats.sh
blob67fe7e8820f59bb28de92275e34c6bcc6d557962
1 #!/bin/sh
4 if [ $# -lt 1 ]; then
5 echo "Usage: $0 <DEST>"
6 exit 0
7 fi
9 DEST=$1
10 DATE=`date +%Y/%m/%d-%H:%M`
12 mkdir -p $DEST/images
13 mkdir -p $DEST/data
14 mkdir -p $DEST/source
15 COMPILER="gcc"
17 COMMON_TESTS="AMI DII DSI Deferred Single_Threaded Thread_Per_Connection Thread_Pool AMH_Single_Threaded"
19 SEQUENCE_TESTS="AMI DII DSI Deferred Single_Threaded Thread_Per_Connection Thread_Pool AMH_Single_Threaded"
21 SEQ_TEST_TYPE="octet long short char double longlong"
23 cd $DEST/source
25 /bin/sync
26 sleep 10
28 cd $ACE_ROOT/performance-tests/TCP;
29 ./run_test.pl
30 ) >tcp_test.log 2>&1
32 if grep -q 'Client throughput: ' tcp_test.log; then
34 echo -n $DATE " ";
35 awk '/^Client throughput:/ {print $3}' tcp_test.log
36 ) >> TCP.txt;
39 /bin/sync
40 sleep 10
42 cd $TAO_ROOT/performance-tests/Latency/Single_Threaded;
43 ./default_configuration.pl > $DEST/source/Default.log 2>&1
45 if grep -q 'Total throughput: ' Default.log; then
47 echo -n $DATE " ";
48 awk '/^Total throughput:/ {print $3}' Default.log
49 ) >> Default.txt
52 /bin/sync
53 sleep 2
55 cd $TAO_ROOT/performance-tests/Sequence_Latency/Single_Threaded;
57 for i in $SEQ_TEST_TYPE; do
59 ./default_configuration.pl -t $i > $DEST/source/Sequence_Default_${i}.log 2>&1
60 if grep -q 'Total throughput: ' $DEST/source/Sequence_Default_${i}.log; then
62 echo -n $DATE " ";
63 awk '/^Total throughput:/ {print $3}' $DEST/source/Sequence_Default_${i}.log
64 ) >> $DEST/source/Sequence_Default_${i}.txt
67 done
71 for i in $COMMON_TESTS; do
72 /bin/sync
73 sleep 10
75 cd $TAO_ROOT/performance-tests/Latency/${i};
76 ./run_test.pl > $DEST/source/${i}.log 2>&1
78 if grep -q 'Total throughput: ' ${i}.log; then
80 echo -n $DATE " ";
81 awk '/^Total throughput:/ {print $3}' $DEST/source/${i}.log
82 ) >> ${i}.txt
84 done
86 for i in $SEQUENCE_TESTS; do
87 /bin/sync
88 sleep 10
90 cd $TAO_ROOT/performance-tests/Sequence_Latency/${i};
91 for j in $SEQ_TEST_TYPE; do
93 ./run_test.pl -t $j > $DEST/source/Sequence_${i}_${j}.log 2>&1
95 if grep -q 'Total throughput: ' $DEST/source/Sequence_${i}_${j}.log; then
97 echo -n $DATE " ";
98 awk '/^Total throughput:/ {print $3}' $DEST/source/Sequence_${i}_${j}.log
99 ) >> $DEST/source/Sequence_${i}_${j}.txt
102 done
105 done
107 for i in $COMMON_TESTS TCP Default; do
108 $ACE_ROOT/bin/generate_performance_chart.sh ${i}.txt ${i}.png "$i" 1024,768
109 /bin/cp ${i}.png $DEST/images/${i}.png
110 /usr/bin/tac ${i}.txt > $DEST/data/${i}.txt
111 /usr/bin/tail -5 ${i}.txt > $DEST/data/LAST_${i}.txt
112 done
114 for i in $SEQ_TEST_TYPE ; do
115 $ACE_ROOT/bin/generate_performance_chart.sh Sequence_Default_${i}.txt Sequence_Default_${i}.png "Default Configuration for $i sequences" 1024,768
116 /bin/cp Sequence_Default_${i}.png $DEST/images/Sequence_Default_${i}.png
117 /usr/bin/tac $DEST/source/Sequence_Default_${i}.txt > $DEST/data/Sequence_Default_${i}.txt
118 /usr/bin/tail -5 $DEST/source/Sequence_Default_${i}.txt > $DEST/data/LAST_Sequence_Default_${i}.txt
119 done
121 for i in $SEQUENCE_TESTS; do
122 for j in $SEQ_TEST_TYPE; do
123 $ACE_ROOT/bin/generate_performance_chart.sh Sequence_${i}_${j}.txt Sequence_${i}_${j}.png "Sequence_$i_$j" 1024,768
124 /bin/cp Sequence_${i}_${j}.png $DEST/images/Sequence_${i}_${j}.png
125 /usr/bin/tac Sequence_${i}_${j}.txt > $DEST/data/Sequence_${i}_${j}.txt
126 /usr/bin/tail -5 Sequence_${i}_${j}.txt > $DEST/data/LAST_Sequence_${i}_${j}.txt
127 done
128 done
130 gnuplot <<_EOF_ >/dev/null 2>&1
131 set xdata time
132 set timefmt '%Y/%m/%d-%H:%M'
133 set xlabel 'Date (YYYYMMDD)'
134 set xtics rotate
135 set ylabel 'Throughput (Requests/Second)'
136 set yrange [0:]
137 set terminal png small size 1024,768 color
138 set output "/dev/null"
139 plot 'AMI.txt' using 1:2 title 'AMI' w l
140 replot 'DII.txt' using 1:2 title 'DII' w l
141 replot 'DSI.txt' using 1:2 title 'DSI' w l
142 replot 'Deferred.txt' using 1:2 title 'Deferred' w l
143 replot 'Single_Threaded.txt' using 1:2 title 'Single_Threaded' w l
144 replot 'Default.txt' using 1:2 title 'Single_Threaded (Defaults)' w l
145 replot 'Thread_Per_Connection.txt' using 1:2 title 'Thread_Per_Connection' w l
146 replot 'Thread_Pool.txt' using 1:2 title 'Thread_Pool' w l
147 replot 'AMH_Single_Threaded.txt' using 1:2 title 'AMH' w l
148 replot 'TCP.txt' using 1:2 title 'TCP/IP' w l
149 set output "All.png"
150 replot
151 exit
152 _EOF_
154 gnuplot <<_EOF_ >/dev/null 2>&1
155 set xdata time
156 set timefmt '%Y/%m/%d-%H:%M'
157 set xlabel 'Date (YYYYMMDD)'
158 set xtics rotate
159 set ylabel 'Throughput (Requests/Second)'
160 set yrange [0:]
161 set terminal png small size 1024,768 color
162 set output "/dev/null"
163 plot 'AMI.txt' using 1:2 title 'AMI' w l
164 replot 'DII.txt' using 1:2 title 'DII' w l
165 replot 'DSI.txt' using 1:2 title 'DSI' w l
166 replot 'Deferred.txt' using 1:2 title 'Deferred' w l
167 replot 'Single_Threaded.txt' using 1:2 title 'Single_Threaded' w l
168 replot 'Default.txt' using 1:2 title 'Single_Threaded (Defaults)' w l
169 replot 'Thread_Per_Connection.txt' using 1:2 title 'Thread_Per_Connection' w l
170 replot 'Thread_Pool.txt' using 1:2 title 'Thread_Pool' w l
171 replot 'AMH_Single_Threaded.txt' using 1:2 title 'AMH' w l
172 set output "CORBA.png"
173 replot
174 exit
175 _EOF_
177 /bin/cp CORBA.png All.png $DEST/images/
179 cd $DEST/data
180 /bin/uname -a > uname.txt
181 $COMPILER -v > gcc.txt 2>&1
182 $COMPILER -dumpversion > gccversion.txt 2>&1
183 /lib/libc.so.6 | sed -e 's/</\&lt;/g' -e 's/>/\&gt;/g' > libc.txt
184 cat /proc/cpuinfo > cpuinfo.txt
185 cat /proc/meminfo > meminfo.txt
186 if [ -e "/etc/SuSE-release" ]; then
187 cat /etc/SuSE-release > linuxversion.txt
189 if [ -e "/etc/redhat-release" ]; then
190 cat /etc/redhat-release > linuxversion.txt
192 if [ -e "/etc/fedora-release" ]; then
193 cat /etc/fedora-release > linuxversion.txt
196 cat $ACE_ROOT/ace/config.h > config.h.txt
197 cat $ACE_ROOT/include/makeinclude/platform_macros.GNU > platform_macros.GNU.txt
198 cat $ACE_ROOT/bin/MakeProjectCreator/config/default.features > default.features.txt
199 cp $ACE_ROOT/html/Stats/* $DEST