change log for rtems-testing (2010-10-14)
rtems-vc at rtems.org
rtems-vc at rtems.org
Thu Oct 14 15:10:06 UTC 2010
*joel*:
2010-10-14 Joel Sherrill <joel.sherrilL at OARcorp.com>
* generate_coverage_html: Add progress tracking time/series plots.
M 1.292 rtems-coverage/ChangeLog
M 1.24 rtems-coverage/generate_coverage_html
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
@@ -1,3 +1,7 @@
+2010-10-14 Joel Sherrill <joel.sherrilL at OARcorp.com>
+
+ * generate_coverage_html: Add progress tracking time/series plots.
+
2010-08-26 Joel Sherrill <joel.sherrill at oarcorp.com>
* Explanations.txt: Remove cases which are now RTEMS_DEBUG.
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
@@ -160,7 +160,7 @@
echo "<th>"${*}"</th>"
}
-doit()
+do_perBSPPage()
{
BSP=${1}
cpu=`grep "^Target" ${bsp}-*/configuration.txt | \
@@ -169,16 +169,55 @@
print_doc_top ${cpu}/${BSP}
cat <<EOF
+<table align="center">
+<thead>
+<tr class="heading-title">
+<td width="40%">Result Tables</td>
+<td width="40%">Time Series Graphs</td>
+</thead>
+</tr>
+<td>
<ul>
-<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>
+<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>
</ul>
+</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>
</br>
EOF
@@ -254,7 +293,8 @@
genBSPList()
{
- find * -maxdepth 1 -type d | cut -d'-' -f1 | uniq | grep -v rtems | \
+ find * -maxdepth 1 -type d | cut -d'-' -f1 | uniq | \
+ sed -e '/rtems/d' -e '/plot_data/d' -e '/graphs/d' | \
while read bsp
do
cpu=`grep ^Target ${bsp}-*/configuration.txt | tail -1 | \
@@ -282,6 +322,132 @@
done
}
+# 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"
+
+ 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
+}
+
#BSPs=`find * -maxdepth 1 -type d | cut -d'-' -f1 | uniq | grep -v rtems`
BSPs=`genBSPList`
@@ -294,7 +460,43 @@
# now generate a page per BSP
for bsp in ${BSPs}
do
- doit ${bsp} >${bsp}.html
+ do_perBSPPage ${bsp} >${bsp}.html
done
+# 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
+ 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
exit 0
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20101014/f5c73fe0/attachment.html>
More information about the vc
mailing list