5 # Use our pathname to locate the absolute path for our awk scripts.
7 h=`(cd $t && echo $PWD)`
9 # We need a temporary file, and we need to clean it up after failure.
11 trap 'rm -f $tmp; exit 1' 1 2 3 13 15
12 trap 'rm -f $tmp; exit 0' 0
15 # Output HTML page header.
21 machine=`echo $1 | sed 's/.*\.//'`
22 echo "<title>Berkeley DB test_micro run: $machine</title>"
24 echo "<body bgcolor=white>"
25 echo "<center><h1>Berkeley DB test_micro run: $machine</h1></center>"
26 echo "<p align=right>`date`</p>"
27 test -f UNAME && cat UNAME
31 # Output HTML page footer.
43 title="Test $1: `egrep '^#' $1 | sort -u | sed 's/^#[ ]*//'`"
44 echo "<hr size=1 noshade>"
45 echo "<table cellspacing=0 cellpadding=0 border=0>"
46 echo "<th align=left colspan=2>$title</th>"
48 echo "<th align=right>Release</th>"
49 echo "<th align=center>Operations/second</th>"
52 # You can set the MAJOR and MINOR environment variables to limit
53 # the BDB releases for which a report is created.
55 # Process the output into a single line per release.
56 egrep "^${MAJOR:-[0-9][0-9]*}.${MINOR:-*}" $1 |
57 awk -f $h/report.awk |
60 # Get the release count, and maximum value.
62 max=`sort -k 2 -n -t ":" < $tmp | tail -1 | awk -F: '{print $2}'`
66 cat $tmp | while true; do
67 # release, average, runs, percent, standard deviation
68 read rel avg runs percent rsd
69 if test "X$rel" = "X" ; then
73 # echo "read: rel $rel, avg $avg, runs $runs, percent $percent, rsd $rsd" > /dev/stderr
76 echo "<td align=right width=80><pre>$rel</pre></td>"
80 if [ "$max" = "0.00" ];then
83 t=`echo "400 * ($avg/($max + $max/10))" | bc -l`
86 echo "<td bgcolor='#003366' width=$t> </td>"
87 t=`echo "400 - $t" | bc`
88 echo "<td bgcolor='#CCCCCC' width=$t> </td>"
89 echo "<td> </td>"
90 echo "<td align=right width=100><pre>$avg</pre></td>"
91 if test "X$percent" != "X" -o "X$rsd" != "X"; then
92 echo -n "<td align=right><pre> ("
93 if test "X$percent" = "X"; then
98 if test "X$rsd" != "X"; then
99 echo -n ", $rsd rsd, $runs runs"
111 echo "Building $i..."
112 name=`echo $i | sed 's/RUN.//'`
115 for j in `ls [0-9]* | sort -n`; do
118 footer) > $i/$name.html