summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McDermott <andrew.mcdermott@linaro.org>2014-05-16 16:43:12 +0100
committerAndrew McDermott <andrew.mcdermott@linaro.org>2014-05-16 16:43:12 +0100
commit4caebe651ce8b44edbab2b26bbb6eb1b348e9119 (patch)
tree6d14e2f747eee986c6b5bbd0469b51178638092b
parentd5bbc47b08fe8823c8827f0aec2fafd32174145a (diff)
Initial versions
-rwxr-xr-xbenchmark-terasort66
-rw-r--r--common.sh27
-rw-r--r--htmltags.py219
-rwxr-xr-xprint-historic-results25
-rwxr-xr-xprint-historic-results.py70
-rwxr-xr-xprint-speedup23
-rwxr-xr-xprint-speedup.py55
-rwxr-xr-xprint-trend23
-rwxr-xr-xpublish40
-rwxr-xr-xreport85
-rw-r--r--style.css31
-rw-r--r--summary.css19
-rw-r--r--trend.sql12
-rwxr-xr-xupdate-results-db37
14 files changed, 732 insertions, 0 deletions
diff --git a/benchmark-terasort b/benchmark-terasort
new file mode 100755
index 0000000..e8ff263
--- /dev/null
+++ b/benchmark-terasort
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Andrew McDermott <andrew.mcdermott@linaro.org>
+
+THIS_BENCHMARK_DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd -P)"
+
+source $THIS_BENCHMARK_DIR/common.sh
+
+[ -d $THIS_BENCHMARK_DIR/${NGIGABYTES}GB ] || echo "error: ${NGIGABYTES}GB baseline directory is missing!"
+[ -d $THIS_BENCHMARK_DIR/openjdk8-hadoop-LCA14 ] || echo "error: openjdk8-hadoop-LCA14 directory is missing; run: git submodule update --init"
+
+export JAVA_HOME=/usr
+
+cd $THIS_BENCHMARK_DIR/openjdk8-hadoop-LCA14
+. env.sh
+
+which hadoop
+which java
+java -version
+which hdfs
+
+set -eu
+
+stop-all.sh
+rm -rf $HOME/hadoop-tmp
+hdfs namenode -format -force
+start-all.sh
+# Need time for the datanodes to materialise.
+sleep 30
+jps
+hadoop fs -mkdir -p /user/$USER
+hadoop fs -copyFromLocal $THIS_BENCHMARK_DIR/${NGIGABYTES}GB /user/$USER
+
+mkdir -p $BENCHMARK_RESULTS_DIR
+
+function benchmark_terasort() {
+ local jvm_type=$1
+ local elapsed_time_file=/tmp/benchmark-$USER.$$
+ HADOOP_OPTS=-${jvm_type} /usr/bin/time -o $elapsed_time_file -f "%e" terasort ${NGIGABYTES}GB ${NGIGABYTES}GB-sorted
+ hadoop fs -rm -R ${NGIGABYTES}GB-sorted
+ sed -i 's/\..*//' $elapsed_time_file
+ elapsed_time=$(cat $elapsed_time_file)
+ echo "$(date +'%s'),$jvm_type,$NGIGABYTES,$elapsed_time" >> $BENCHMARK_RESULTS_DIR/results.csv
+ rm -f $elapsed_time_file
+}
+
+benchmark_terasort "server"
+benchmark_terasort "client"
+
+stop-all.sh
diff --git a/common.sh b/common.sh
new file mode 100644
index 0000000..1cc933f
--- /dev/null
+++ b/common.sh
@@ -0,0 +1,27 @@
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Andrew McDermott <andrew.mcdermott@linaro.org>
+
+: ${NGIGABYTES:=1}
+: ${BENCHMARK_RESULTS_DIR:=$HOME/hadoop-terasort-benchmark-results}
+: ${SERVER_BASELINE:=71}
+: ${CLIENT_BASELINE:=43}
+: ${BASEDATE="2014/04/01"}
+: ${ZERO_BASELINE:=1}
+
+results_file=$BENCHMARK_RESULTS_DIR/results.csv
+results_db=$BENCHMARK_RESULTS_DIR/results.db
diff --git a/htmltags.py b/htmltags.py
new file mode 100644
index 0000000..d8957fc
--- /dev/null
+++ b/htmltags.py
@@ -0,0 +1,219 @@
+# Copied from: http://code.activestate.com/recipes/366000/
+# Licensed under the PSF License
+
+"""Classes to generate HTML in Python
+
+The HTMLTags module defines a class for all the valid HTML tags, written in
+uppercase letters. To create a piece of HTML, the general syntax is :
+ t = TAG(inner_HTML, key1=val1,key2=val2,...)
+
+so that "print t" results in :
+ <TAG key1="val1" key2="val2" ...>inner_HTML</TAG>
+
+For instance :
+ print A('bar', href="foo") ==> <A href="foo">bar</A>
+
+To generate HTML attributes without value, give them the value True :
+ print OPTION('foo',SELECTED=True,value=5) ==>
+ <OPTION value="5" SELECTED>
+
+The inner_HTML argument can be an instance of an HTML class, so that
+you can nest tags, like this :
+ print B(I('foo')) ==> <B><I>foo</I></B>
+
+TAG instances support addition :
+ print B('bar')+INPUT(name="bar") ==> <B>bar</B><INPUT name="bar">
+
+and repetition :
+ print TH('&nbsp')*3 ==> <TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD>
+
+For complex expressions, a tag can be nested in another using the operator <=
+Considering the HTML document as a tree, this means "add child" :
+
+ form = FORM(action="foo")
+ form <= INPUT(name="bar")
+ form <= INPUT(Type="submit",value="Ok")
+
+If you have a list (or any iterable) of instances, you can't concatenate the
+items with sum(instance_list) because sum takes only numbers as arguments. So
+there is a function called Sum() which will do the same :
+
+ Sum( TR(TD(i)+TD(i*i)) for i in range(100) )
+
+generates the rows of a table showing the squares of integers from 0 to 99
+
+A simple document can be produced by :
+ print HTML( HEAD(TITLE('Test document')) +
+ BODY(H1('This is a test document')+
+ 'First line'+BR()+
+ 'Second line'))
+
+This will be rendered as :
+ <HTML>
+ <HEAD>
+ <TITLE>Test document</TITLE>
+ </HEAD>
+ <BODY>
+ <H1>This is a test document</H1>
+ First line
+ <BR>
+ Second line
+ </BODY>
+ </HTML>
+
+If the document is more complex it is more readable to create the elements
+first, then to print the whole result in one instruction. For example :
+
+head = HEAD()
+head <= TITLE('Record collection')
+head <= LINK(rel="Stylesheet",href="doc.css")
+
+title = H1('My record collection')
+table = TABLE()
+table <= TR(TH('Title')+TH('Artist'))
+for rec in records:
+ row = TR()
+ # note the attribute key Class with leading uppercase
+ # because "class" is a Python keyword
+ row <= TD(rec.title,Class="title")+TD(rec.artist,Class="artist")
+ table <= row
+
+print HTML(head+BODY(title+table))
+"""
+
+import cStringIO
+
+class TAG:
+ """Generic class for tags"""
+ def __init__(self, inner_HTML="", **attrs):
+ self.tag = self.__class__.__name__
+ self.inner_HTML = inner_HTML
+ self.attrs = attrs
+ self.children = []
+ self.brothers = []
+
+ def __str__(self):
+ res=cStringIO.StringIO()
+ w=res.write
+ if self.tag != "TEXT":
+ w("<%s" %self.tag)
+ # attributes which will produce arg = "val"
+ attr1 = [ k for k in self.attrs
+ if not isinstance(self.attrs[k],bool) ]
+ w("".join([' %s="%s"'
+ %(k.replace('_','-'),self.attrs[k]) for k in attr1]))
+ # attributes with no argument
+ # if value is False, don't generate anything
+ attr2 = [ k for k in self.attrs if self.attrs[k] is True ]
+ w("".join([' %s' %k for k in attr2]))
+ w(">")
+ if self.tag in ONE_LINE:
+ w('\n')
+ w(str(self.inner_HTML))
+ for child in self.children:
+ w(str(child))
+ if self.tag in CLOSING_TAGS:
+ w("</%s>" %self.tag)
+ if self.tag in LINE_BREAK_AFTER:
+ w('\n')
+ if hasattr(self,"brothers"):
+ for brother in self.brothers:
+ w(str(brother))
+ return res.getvalue()
+
+ def __le__(self,other):
+ """Add a child"""
+ if isinstance(other,str):
+ other = TEXT(other)
+ self.children.append(other)
+ other.parent = self
+ return self
+
+ def __add__(self,other):
+ """Return a new instance : concatenation of self and another tag"""
+ res = TAG()
+ res.tag = self.tag
+ res.inner_HTML = self.inner_HTML
+ res.attrs = self.attrs
+ res.children = self.children
+ res.brothers = self.brothers + [other]
+ return res
+
+ def __radd__(self,other):
+ """Used to add a tag to a string"""
+ if isinstance(other,str):
+ return TEXT(other)+self
+ else:
+ raise ValueError,"Can't concatenate %s and instance" %other
+
+ def __mul__(self,n):
+ """Replicate self n times, with tag first : TAG * n"""
+ res = TAG()
+ res.tag = self.tag
+ res.inner_HTML = self.inner_HTML
+ res.attrs = self.attrs
+ for i in range(n-1):
+ res += self
+ return res
+
+ def __rmul__(self,n):
+ """Replicate self n times, with n first : n * TAG"""
+ return self*n
+
+# list of tags, from the HTML 4.01 specification
+
+CLOSING_TAGS = ['A', 'ABBR', 'ACRONYM', 'ADDRESS', 'APPLET',
+ 'B', 'BDO', 'BIG', 'BLOCKQUOTE', 'BUTTON',
+ 'CAPTION', 'CENTER', 'CITE', 'CODE',
+ 'DEL', 'DFN', 'DIR', 'DIV', 'DL',
+ 'EM', 'FIELDSET', 'FONT', 'FORM', 'FRAMESET',
+ 'H1', 'H2', 'H3', 'H4', 'H5', 'H6',
+ 'I', 'IFRAME', 'INS', 'KBD', 'LABEL', 'LEGEND',
+ 'MAP', 'MENU', 'NOFRAMES', 'NOSCRIPT', 'OBJECT',
+ 'OL', 'OPTGROUP', 'PRE', 'Q', 'S', 'SAMP',
+ 'SCRIPT', 'SELECT', 'SMALL', 'SPAN', 'STRIKE',
+ 'STRONG', 'STYLE', 'SUB', 'SUP', 'TABLE',
+ 'TEXTAREA', 'TITLE', 'TT', 'U', 'UL',
+ 'VAR', 'BODY', 'COLGROUP', 'DD', 'DT', 'HEAD',
+ 'HTML', 'LI', 'P', 'TBODY','OPTION',
+ 'TD', 'TFOOT', 'TH', 'THEAD', 'TR']
+
+NON_CLOSING_TAGS = ['AREA', 'BASE', 'BASEFONT', 'BR', 'COL', 'FRAME',
+ 'HR', 'IMG', 'INPUT', 'ISINDEX', 'LINK',
+ 'META', 'PARAM']
+
+# create the classes
+for tag in CLOSING_TAGS + NON_CLOSING_TAGS + ['TEXT']:
+ exec("class %s(TAG): pass" %tag)
+
+def Sum(iterable):
+ """Return the concatenation of the instances in the iterable
+ Can't use the built-in sum() on non-integers"""
+ it = [ item for item in iterable ]
+ if it:
+ return reduce(lambda x,y:x+y, it)
+ else:
+ return ''
+
+# whitespace-insensitive tags, determines pretty-print rendering
+LINE_BREAK_AFTER = NON_CLOSING_TAGS + ['HTML','HEAD','BODY',
+ 'FRAMESET','FRAME',
+ 'TITLE','SCRIPT',
+ 'TABLE','TR','TD','TH','SELECT','OPTION',
+ 'FORM',
+ 'H1', 'H2', 'H3', 'H4', 'H5', 'H6',
+ ]
+# tags whose opening tag should be alone in its line
+ONE_LINE = ['HTML','HEAD','BODY',
+ 'FRAMESET'
+ 'SCRIPT',
+ 'TABLE','TR','TD','TH','SELECT','OPTION',
+ 'FORM',
+ ]
+
+if __name__ == '__main__':
+ head = HEAD(TITLE('Test document'))
+ body = BODY()
+ body <= H1('This is a test document')
+ body <= 'First line' + BR() + 'Second line'
+ print HTML(head + body)
diff --git a/print-historic-results b/print-historic-results
new file mode 100755
index 0000000..3cb9c1e
--- /dev/null
+++ b/print-historic-results
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Andrew McDermott <andrew.mcdermott@linaro.org>
+
+THIS_BENCHMARK_DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd -P)"
+set -a
+source $THIS_BENCHMARK_DIR/common.sh
+set +a
+$THIS_BENCHMARK_DIR/print-historic-results.py $results_db "$@"
diff --git a/print-historic-results.py b/print-historic-results.py
new file mode 100755
index 0000000..bd0686b
--- /dev/null
+++ b/print-historic-results.py
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Andrew McDermott <andrew.mcdermott@linaro.org>
+
+from htmltags import *
+
+import os
+import platform
+import sqlite3
+import sys
+
+if len(sys.argv) < 1:
+ print "usage: {} <filename>"
+ sys.exit(1)
+
+if not os.path.exists(sys.argv[1]):
+ print "error: database {} was not found".format(sys.argv[1])
+ sys.exit(1)
+
+client_baseline = int(os.getenv('CLIENT_BASELINE'))
+server_baseline = int(os.getenv('SERVER_BASELINE'))
+zero_baseline = int(os.getenv('ZERO_BASELINE'))
+
+head = HEAD(TITLE('Hadoop/Terasort Result Archive (' + platform.machine() + ')'))
+head <= LINK(rel="stylesheet", href="style.css")
+body = BODY()
+
+body <= H2("Historic Results")
+
+body <= P("\
+This test measures the performance of the server and client compilers \
+running Hadoop sorting a {}GB file using Terasort and compares \
+the performance against the baseline performance of the Zero interpreter \
+and against the baseline performance of the client and server compilers \
+on {}.".format(os.getenv('NGIGABYTES'), os.getenv('BASEDATE')))
+
+body <= P("\
+Relative performance: Zero: 1.0, Client: {}, Server: {}".format(os.getenv('CLIENT_BASELINE'), os.getenv('SERVER_BASELINE')))
+
+table = TABLE(border=1)
+table <= TR(TH('Date') + TH('JVM Variant') + TH('Relative performance'))
+
+conn = sqlite3.connect(sys.argv[1])
+cursor = conn.cursor()
+
+for row in cursor.execute("select date(datetime(timestamp, 'unixepoch')) as 'Date', jvm_type, elapsed_time from results order by date DESC"):
+ html_row = TR()
+ html_row <= TD(row[0])
+ html_row <= TD(row[1])
+ html_row <= TD(zero_baseline / row[2], align="right")
+ table <= html_row
+
+body <= table
+print HTML(head + body)
diff --git a/print-speedup b/print-speedup
new file mode 100755
index 0000000..1b48038
--- /dev/null
+++ b/print-speedup
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Andrew McDermott <andrew.mcdermott@linaro.org>
+
+THIS_BENCHMARK_DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd -P)"
+source $THIS_BENCHMARK_DIR/common.sh
+$THIS_BENCHMARK_DIR/print-speedup.py $results_db "$@"
diff --git a/print-speedup.py b/print-speedup.py
new file mode 100755
index 0000000..87bb531
--- /dev/null
+++ b/print-speedup.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Andrew McDermott <andrew.mcdermott@linaro.org>
+
+import os
+import sqlite3
+import sys
+
+baseline = os.getenv("ZERO_BASELINE")
+
+if baseline is None or len(baseline) == 0:
+ print 1
+ sys.exit(0)
+
+if len(sys.argv) < 2:
+ print "usage: {} <filename> <jvm-type>".format(sys.argv[0])
+ sys.exit(1)
+
+if not os.path.exists(sys.argv[1]):
+ print "error: database {} was not found".format(sys.argv[1])
+ sys.exit(1)
+
+conn = sqlite3.connect(sys.argv[1])
+
+query = "select date(datetime(timestamp, 'unixepoch')) as date, \
+ jvm_type, \
+ elapsed_time \
+ from results where jvm_type = ? \
+ order by date DESC LIMIT 1;"
+
+cur = conn.cursor()
+cur.execute(query, [sys.argv[2]])
+row = cur.fetchone()
+
+if row is None:
+ print "error: no result from query: {}".format(query)
+ sys.exit(1)
+
+print int(baseline) / row[2]
diff --git a/print-trend b/print-trend
new file mode 100755
index 0000000..0fd9a9b
--- /dev/null
+++ b/print-trend
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Andrew McDermott <andrew.mcdermott@linaro.org>
+
+THIS_BENCHMARK_DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd -P)"
+source $THIS_BENCHMARK_DIR/common.sh
+sqlite3 $results_db < $THIS_BENCHMARK_DIR/trend.sql
diff --git a/publish b/publish
new file mode 100755
index 0000000..a9ad638
--- /dev/null
+++ b/publish
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Andrew McDermott <andrew.mcdermott@linaro.org>
+
+progname=$(basename $0)
+THIS_BENCHMARK_DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd -P)"
+PATH=$THIS_BENCHMARK_DIR:$PATH
+source $THIS_BENCHMARK_DIR/common.sh
+
+set -eu
+
+if [ $# -lt 1 ]; then
+ echo "usage: $progname /remote/path/to/publish/to"
+ exit 1
+fi
+
+source ${THIS_BENCHMARK_DIR}/common.sh
+
+d=$1/$(basename $BENCHMARK_RESULTS_DIR)
+ssh publish-host mkdir -p $d
+update-results-db
+print-historic-results > historic-results.html
+scp historic-results.html publish-host:$d/index.html
+scp *.css publish-host:$d
diff --git a/report b/report
new file mode 100755
index 0000000..c96a1bb
--- /dev/null
+++ b/report
@@ -0,0 +1,85 @@
+#!/bin/bash
+
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Andrew McDermott <andrew.mcdermott@linaro.org>
+
+set -eu
+
+THIS_BENCHMARK_DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd -P)"
+PATH=$THIS_BENCHMARK_DIR:$PATH
+source $THIS_BENCHMARK_DIR/common.sh
+
+ZERO_BASELINE=${ZERO_BASELINE:=1} client_today=$(print-speedup client)
+ZERO_BASELINE=${ZERO_BASELINE:=1} server_today=$(print-speedup server)
+
+x=$(echo "scale=10; $client_today / ${CLIENT_BASELINE}" | bc)
+y=$(echo "scale=10; $server_today / ${SERVER_BASELINE}" | bc)
+
+client_today_vs_client_baseline=$(printf "%.1f" $x)
+server_today_vs_server_baseline=$(printf "%.1f" $y)
+
+email_subject=
+email_to=
+
+while getopts ":s:t:" arg; do
+ case $arg in
+ s)
+ email_subject=$OPTARG
+ ;;
+ t)
+ email_to=$OPTARG
+ ;;
+ \?)
+ echo "error: '-$OPTARG' invalid option; use -h for options" >&2
+ exit 1
+ ;;
+ *)
+ echo "error: unknown option" >&2
+ exit 1
+ ;;
+ esac
+done
+
+shift $((OPTIND - 1))
+
+if [[ -n $email_to ]]; then
+ echo "To: $email_to"
+fi
+
+if [[ -n $email_subject ]]; then
+ echo "Subject: $email_subject"
+fi
+
+people_link="http://openjdk.linaro.org/hadoop-terasort-benchmark-results/"
+
+echo "Regression test Hadoop-Terasort completed"
+echo "-----------------------------------------"
+echo ""
+echo "This test measures the performance of the server and client compilers"
+echo "running Hadoop sorting a ${NGIGABYTES}GB file using Terasort and compares"
+echo "the performance against the baseline performance of the Zero interpreter"
+echo "and against the baseline performance of the client and server compilers"
+echo "on $BASEDATE."
+echo ""
+echo "Relative performance: Zero: 1.0, Client: ${CLIENT_BASELINE}, Server: ${SERVER_BASELINE}"
+echo ""
+echo "Client $client_today / Client $BASEDATE: ${client_today_vs_client_baseline}x"
+echo "Server $server_today / Server $BASEDATE: ${server_today_vs_server_baseline}x"
+echo ""
+echo "Details of the test setup and historical results may be found here:"
+echo " $people_link"
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..71bd1cd
--- /dev/null
+++ b/style.css
@@ -0,0 +1,31 @@
+tr:nth-child(odd) {
+ background-color:#fff;
+}
+
+tr:nth-child(even) {
+ background-color:#eee;
+}
+
+a:link {
+ text-decoration:none;
+}
+
+a:visited {
+ text-decoration:none;
+}
+
+a:hover {
+ text-decoration:underline;
+}
+
+a:active {
+ text-decoration:underline;
+}
+
+li.historic_results {
+ font-family: monospace;
+}
+
+li.image_filename {
+ font-family: monospace;
+}
diff --git a/summary.css b/summary.css
new file mode 100644
index 0000000..4e49b60
--- /dev/null
+++ b/summary.css
@@ -0,0 +1,19 @@
+tr:nth-child(odd) {
+ background-color:#fff;
+}
+
+tr:nth-child(even) {
+ background-color:#eee;
+}
+
+th {
+ padding:5px; border 5px #00ff00;
+}
+
+td {
+ padding:3px; border:1px solid;
+}
+
+table {
+ border-collapse:collapse;
+}
diff --git a/trend.sql b/trend.sql
new file mode 100644
index 0000000..ec53e40
--- /dev/null
+++ b/trend.sql
@@ -0,0 +1,12 @@
+.mode column
+.header on
+.nullvalue NULL
+.separator "|"
+.width 6 -10 -10 -10 -10
+
+select jvm_type as JVM,
+ min(elapsed_time) as 'Min(s)',
+ max(elapsed_time) as 'Max(s)',
+ avg(elapsed_time) as 'Avg(s)'
+ from results
+ group by JVM;
diff --git a/update-results-db b/update-results-db
new file mode 100755
index 0000000..5c36be0
--- /dev/null
+++ b/update-results-db
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Andrew McDermott <andrew.mcdermott@linaro.org>
+
+set -eu
+
+THIS_BENCHMARK_DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd -P)"
+source $THIS_BENCHMARK_DIR/common.sh
+
+if [ ! -s $results_file ]; then
+ echo "error: missing or empty $results_file"
+ exit 1
+fi
+
+rm -f $results_db
+sqlite3 $results_db <<EOF
+drop table if exists results;
+create table results (timestamp integer, jvm_type text, ngigabytes integer, elapsed_time integer);
+.separator ","
+.import ${BENCHMARK_RESULTS_DIR}/results.csv results
+EOF