<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems-testing (2010-10-14)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-10-14 Joel Sherrill <joel.sherrilL@OARcorp.com>
* generate_coverage_html: Add progress tracking time/series plots.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/rtems-coverage/ChangeLog.diff?r1=text&tr1=1.291&r2=text&tr2=1.292&diff_format=h">M</a></td><td width='1%'>1.292</td><td width='100%'>rtems-coverage/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/rtems-coverage/generate_coverage_html.diff?r1=text&tr1=1.23&r2=text&tr2=1.24&diff_format=h">M</a></td><td width='1%'>1.24</td><td width='100%'>rtems-coverage/generate_coverage_html</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems-testing/rtems-coverage/ChangeLog:1.291 rtems-testing/rtems-coverage/ChangeLog:1.292
--- rtems-testing/rtems-coverage/ChangeLog:1.291 Thu Aug 26 15:03:49 2010
+++ rtems-testing/rtems-coverage/ChangeLog Thu Oct 14 09:27:49 2010
</font><font color='#997700'>@@ -1,3 +1,7 @@
</font><font color='#000088'>+2010-10-14 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+ * generate_coverage_html: Add progress tracking time/series plots.
+
</font> 2010-08-26 Joel Sherrill <joel.sherrill@oarcorp.com>
* Explanations.txt: Remove cases which are now RTEMS_DEBUG.
<font color='#006600'>diff -u rtems-testing/rtems-coverage/generate_coverage_html:1.23 rtems-testing/rtems-coverage/generate_coverage_html:1.24
--- rtems-testing/rtems-coverage/generate_coverage_html:1.23 Wed Jun 16 13:39:31 2010
+++ rtems-testing/rtems-coverage/generate_coverage_html Thu Oct 14 09:27:49 2010
</font><font color='#997700'>@@ -160,7 +160,7 @@
</font> echo "<th>"${*}"</th>"
}
<font color='#880000'>-doit()
</font><font color='#000088'>+do_perBSPPage()
</font> {
BSP=${1}
cpu=`grep "^Target" ${bsp}-*/configuration.txt | \
<font color='#997700'>@@ -169,16 +169,55 @@
</font> print_doc_top ${cpu}/${BSP}
cat <<EOF
<font color='#000088'>+<table align="center">
+<thead>
+<tr class="heading-title">
+<td width="40%">Result Tables</td>
+<td width="40%">Time Series Graphs</td>
+</thead>
+</tr>
+<td>
</font> <ul>
<font color='#880000'>-<li><a href="#O2pd">Results for -O2, POSIX Disabled, Core Only</a></li>
-<li><a href="#O2pD">Results for -O2, POSIX Disabled, Developmental</a></li>
-<li><a href="#O2Pd">Results for -O2, POSIX Enabled, Core Only</a></li>
-<li><a href="#O2PD">Results for -O2, POSIX Enabled, Developmental</a></li>
-<li><a href="#Ospd">Results for -Os, POSIX Disabled, Core Only</a></li>
-<li><a href="#OspD">Results for -Os, POSIX Disabled, Developmental</a></li>
-<li><a href="#OsPd">Results for -Os, POSIX Enabled, Core Only</a></li>
-<li><a href="#OsPD">Results for -Os, POSIX Enabled, Developmental</a></li>
</font><font color='#000088'>+<li><a href="#O2pd">-O2, POSIX Disabled, Core Only</a></li>
+<li><a href="#O2pD">-O2, POSIX Disabled, Developmental</a></li>
+<li><a href="#O2Pd">-O2, POSIX Enabled, Core Only</a></li>
+<li><a href="#O2PD">-O2, POSIX Enabled, Developmental</a></li>
+<li><a href="#Ospd">-Os, POSIX Disabled, Core Only</a></li>
+<li><a href="#OspD">-Os, POSIX Disabled, Developmental</a></li>
+<li><a href="#OsPd">-Os, POSIX Enabled, Core Only</a></li>
+<li><a href="#OsPD">-Os, POSIX Enabled, Developmental</a></li>
</font> </ul>
<font color='#000088'>+</td>
+<td>
+<ul>
+EOF
+
+echo "<li><a href=\"graphs/${BSP}-uncovered_percent-d.png\">"
+echo " Uncovered Percentage (Core)</a></li>"
+echo "<li><a href=\"graphs/${BSP}-uncovered_percent-D.png\">"
+echo " Uncovered Percentage (Developmental)</a></li>"
+echo "<li><a href=\"graphs/${BSP}-uncovered_bytes-d.png\">"
+echo " Uncovered Bytes (Core)</a></li>"
+
+echo "<li><a href=\"graphs/${BSP}-total_bytes-D.png\">"
+echo " Total Bytes Analyzed (Developmental)</a></li>"
+echo "<li><a href=\"graphs/${BSP}-total_bytes-d.png\">"
+echo " Total Bytes Analyzed (Core)</a></li>"
+echo "<li><a href=\"graphs/${BSP}-total_bytes-D.png\">"
+echo " Total Bytes Analyzed (Developmental)</a></li>"
+
+echo "<li><a href=\"graphs/${BSP}-uncovered_bytes-D.png\">"
+echo " Uncovered Bytes (Developmental)</a></li>"
+echo "<li><a href=\"graphs/${BSP}-uncovered_bytes-d.png\">"
+echo " Uncovered Bytes (Core)</a></li>"
+echo "<li><a href=\"graphs/${BSP}-uncovered_bytes-D.png\">"
+echo " Uncovered Bytes (Developmental)</a></li>"
+
+cat <<EOF
+</ul>
+</td>
+</tr>
+</table>
</font> </br>
EOF
<font color='#997700'>@@ -254,7 +293,8 @@
</font>
genBSPList()
{
<font color='#880000'>- find * -maxdepth 1 -type d | cut -d'-' -f1 | uniq | grep -v rtems | \
</font><font color='#000088'>+ find * -maxdepth 1 -type d | cut -d'-' -f1 | uniq | \
+ sed -e '/rtems/d' -e '/plot_data/d' -e '/graphs/d' | \
</font> while read bsp
do
cpu=`grep ^Target ${bsp}-*/configuration.txt | tail -1 | \
<font color='#997700'>@@ -282,6 +322,132 @@
</font> done
}
<font color='#000088'>+# round up
+round_up()
+{
+ num=$1
+ round=$2
+ echo ${num} ${num} ${round} + ${round} % - ${round} + p | dc
+}
+
+# round down
+round_down()
+{
+ num=$1
+ round=$2
+ echo ${num} ${num} ${round} - ${round} % - ${round} - p| dc
+}
+
+# Generate the GNU Plot script
+gen_plot()
+{
+ # Now merge the data
+ datfiles=`ls -1 ${OUT}/${bsp}-*${DEV}-${FIELD}.dat`
+ first=`cat ${datfiles} | sort -t' ' -k1.3 -n | head -n 1 | cut -d' ' -f1`
+ last=`cat ${datfiles} | sort -t' ' -k1.3 -n | tail -n 1 | cut -d' ' -f1`
+
+ min=`cat ${datfiles} | sort -k2 -n | head -n 1 | cut -d' ' -f2`
+ max=`cat ${datfiles} | sort -k2 -n | tail -n 1 | cut -d' ' -f2`
+ round=
+ case ${FIELD} in
+ covered_percent)
+ max=100.0
+ YLABEL=Covered
+ ;;
+ uncovered_percent)
+ min=0
+ YLABEL=Uncovered
+ ;;
+ uncovered_bytes)
+ round=1000
+ min=`round_down ${min} 1000 0`
+ max=`round_up ${max} 1000 1000000`
+ YLABEL=Uncovered
+ ;;
+ total_bytes)
+ round=5000
+ min=`round_down ${min} 5000 0`
+ max=`round_up ${max} 5000 1000000`
+ YLABEL=Total
+ ;;
+ *)
+ echo "ERROR unknown FIELD ${FIELD}"
+ exit 1
+ ;;
+ esac
+ # No negative numbers. :=D
+ if [ ${min} -lt 0 ] ; then
+ min=0
+ fi
+ if [ "X${round}" != "X" ] ; then # definitely integer
+ if [ ${min} -eq ${max} ] ; then
+ max=`expr ${min} + ${round}`
+ fi
+ fi
+
+ # Is this graph using data for developmental or core configurations?
+ if [ ${DEV} = "D" ] ; then
+ TITLE="${PATTERN} (Developmental)"
+ else
+ TITLE="${PATTERN} (Core)"
+ fi
+
+ Year=`echo ${first} | cut -c1-4`
+ Month=`echo ${first} | cut -c6-7`
+ Day=`echo ${first} | cut -c9-10`
+ Hour=`echo ${first} | cut -c12-13`
+ Minute=`echo ${first} | cut -c15-16`
+ start="${Year}-${Month}-${Day}/${Hour}:${Minute}"
+
+ Year=`echo ${last} | cut -c1-4`
+ Month=`echo ${last} | cut -c6-7`
+ Day=`echo ${last} | cut -c9-10`
+ Hour=`echo ${last} | cut -c12-13`
+ Minute=`echo ${last} | cut -c15-16`
+ end="${Year}-${Month}-${Day}/${Hour}:${Minute}"
+
+ echo "set terminal png size 1200,800"
+ echo "set xdata time"
+ echo "# time range must be in same format as data file"
+ echo "# YYYYMMDD-HHMMSS"
+ echo "set timefmt \"%Y-%m-%d/%H:%M:%S\""
+ echo "set output \"${OUTFIG}/${bsp}-${FIELD}-${DEV}.png\""
+ echo "set xrange [\""${start}"\":\""${end}"\"]"
+ echo "set yrange [${min}:${max}]"
+ echo "set grid"
+ echo "set xlabel \"Date\\nTime\""
+ echo "set ylabel \"${YLABEL}\""
+ echo "set title \"${TITLE}\""
+ echo "set key left box"
+<span style="background-color: #FF0000"> </span>
+ echo "plot \"${OUT}/${bsp}-Osp${DEV}-${FIELD}.dat\" using 1:2 index 0 \\"
+ echo " title \"Osp${DEV}\" with lines, \\"
+ echo " \"${OUT}/${bsp}-OsP${DEV}-${FIELD}.dat\" using 1:2 index 0 \\"
+ echo " title \"OsP${DEV}\" with lines, \\"
+ echo " \"${OUT}/${bsp}-O2p${DEV}-${FIELD}.dat\" using 1:2 index 0 \\"
+ echo " title \"O2p${DEV}\" with lines, \\"
+ echo " \"${OUT}/${bsp}-O2P${DEV}-${FIELD}.dat\" using 1:2 index 0 \\"
+ echo " title \"O2P${DEV}\" with lines"
+}
+
+gen_data()
+{
+ for s in `ls -1 ${bsp}-${CONF}-*/summary.txt | sort `
+ do
+ timestamp=`echo $s | cut -d'-' -f3-4 | cut -d'/' -f1`
+ num=`grep "${PATTERN}" $s | cut -d':' -f2`
+
+ Year=`echo ${timestamp} | cut -c1-4`
+ Month=`echo ${timestamp} | cut -c5-6`
+ Day=`echo ${timestamp} | cut -c7-8`
+ Hour=`echo ${timestamp} | cut -c10-11`
+ Minute=`echo ${timestamp} | cut -c12-13`
+ stamp="${Year}-${Month}-${Day}/${Hour}:${Minute}"
+
+ echo ${stamp} ${num}
+ done<span style="background-color: #FF0000"> </span>
+}
+
</font> #BSPs=`find * -maxdepth 1 -type d | cut -d'-' -f1 | uniq | grep -v rtems`
BSPs=`genBSPList`
<font color='#997700'>@@ -294,7 +460,43 @@
</font> # now generate a page per BSP
for bsp in ${BSPs}<span style="background-color: #FF0000"> </span>
do
<font color='#880000'>- doit ${bsp} >${bsp}.html
</font><font color='#000088'>+ do_perBSPPage ${bsp} >${bsp}.html
</font> done
<font color='#000088'>+# Now generate the plots
+cd $1
+
+OUTFIG=graphs
+OUT=plot_data
+rm -rf ${OUT}
+test -d ${OUT} || mkdir ${OUT}
+test -d ${OUTFIG} || mkdir ${OUTFIG}
+
+for bsp in ${BSPs}
+do
+ for FIELD in total_bytes uncovered_bytes uncovered_percent #covered_percent<span style="background-color: #FF0000"> </span>
+ do
+ # Pattern to find in summary.txt
+ case ${FIELD} in
+ covered_percent) PATTERN="Percentage Executed" ;;
+ uncovered_percent) PATTERN="Percentage Not Executed" ;;
+ total_bytes) PATTERN="Bytes Analyzed" ;;
+ uncovered_bytes) PATTERN="Bytes Not Executed" ;;
+ *) echo "Unknown field (${FIELD})"; exit 1 ;;
+ esac
+
+ for DEV in d D
+ do
+ for CONF in Osp${DEV} OsP${DEV} O2p${DEV} O2P${DEV}
+ do
+ gen_data ${bsp} ${CONF} >${OUT}/${bsp}-${CONF}-${FIELD}.dat
+ done
+
+ pltfile=${OUT}/${bsp}-${FIELD}-${DEV}.plt
+ gen_plot >${pltfile}
+ #echo gnuplot ${pltfile}
+ gnuplot ${pltfile}
+ done
+ done
+done
</font> exit 0
</pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>