...
 
Commits (6)
......@@ -10,72 +10,107 @@ before_script:
- echo "jdk9home=/usr/lib/jvm/java-9-openjdk-amd64" >> local.properties
- cat local.properties
cache:
key: anu-gitlab-local
untracked: true
avrora:
script:
- ant -Dbuild.target-jar=dacapo.jar avrora
- java -jar dacapo.jar avrora
- java -jar dacapo.jar avrora -s small
after_script:
- git clean -df -e "downloads"
batik:
script:
- ant -Dbuild.target-jar=dacapo.jar batik
- java -jar dacapo.jar batik
- java -jar dacapo.jar batik -s small
after_script:
- git clean -df -e "downloads"
eclipse:
script:
- ant -Dbuild.target-jar=dacapo.jar eclipse
- java -jar dacapo.jar eclipse
- java -jar dacapo.jar eclipse -s small
after_script:
- git clean -df -e "downloads"
fop:
script:
- ant -Dbuild.target-jar=dacapo.jar fop
- java -jar dacapo.jar fop
- java -jar dacapo.jar fop -s small
after_script:
- git clean -df -e "downloads"
h2:
script:
- ant -Dbuild.target-jar=dacapo.jar h2
- java -jar dacapo.jar h2
- java -jar dacapo.jar h2 -s small
after_script:
- git clean -df -e "downloads"
jython:
script:
- ant -Dbuild.target-jar=dacapo.jar jython
- java -jar dacapo.jar jython
- java -jar dacapo.jar jython -s small
after_script:
- git clean -df -e "downloads"
luindex:
script:
- ant -Dbuild.target-jar=dacapo.jar luindex
- java -jar dacapo.jar luindex
- java -jar dacapo.jar luindex -s small
after_script:
- git clean -df -e "downloads"
lusearch:
script:
- ant -Dbuild.target-jar=dacapo.jar lusearch
- java -jar dacapo.jar lusearch
- java -jar dacapo.jar lusearch -s small
after_script:
- git clean -df -e "downloads"
pmd:
script:
- ant -Dbuild.target-jar=dacapo.jar pmd
- java -jar dacapo.jar pmd
- java -jar dacapo.jar pmd -s small
after_script:
- git clean -df -e "downloads"
sunflow:
script:
- ant -Dbuild.target-jar=dacapo.jar sunflow
- java -jar dacapo.jar sunflow
- java -jar dacapo.jar sunflow -s small
after_script:
- git clean -df -e "downloads"
tomcat:
script:
- ant -Dbuild.target-jar=dacapo.jar tomcat
- java -jar dacapo.jar tomcat
- java -jar dacapo.jar tomcat -s small
after_script:
- git clean -df -e "downloads"
- git clean -df -e "downloads"
tradebeans:
script:
- script -q -c "ant -Dbuild.target-jar=dacapo.jar tradebeans" script.out
- sleep 120 | script -q -c "java -jar dacapo.jar tradebeans" script.out
- sleep 120 | script -q -c "java -jar dacapo.jar tradebeans -s small" script.out
after_script:
- git clean -df -e "downloads"
- git clean -df -e "downloads"
tradesoap:
script:
- script -q -c "ant -Dbuild.target-jar=dacapo.jar tradesoap" script.out
- sleep 120 | script -q -c "java -jar dacapo.jar tradesoap" script.out
- sleep 120 | script -q -c "java -jar dacapo.jar tradesoap -s small" script.out
after_script:
- git clean -df -e "downloads"
- git clean -df -e "downloads"
xalan:
script:
- ant -Dbuild.target-jar=dacapo.jar xalan
- java -jar dacapo.jar xalan
- java -jar dacapo.jar xalan -s small
after_script:
- git clean -df -e "downloads"
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
click = "*"
[dev-packages]
[requires]
python_version = "2.7"
......@@ -39,7 +39,7 @@
<property name="harness-classpath" value="harness/dist/"/>
<target name="all" depends="source,svn-source,cvs-source,hg-source,pre-build,build,complete"/>
<target name="all" depends="source,svn-source,cvs-source,hg-source,git-source,pre-build,build,complete"/>
<target name="incremental">
<property name="incremental-build" value="true"/>
......@@ -93,6 +93,19 @@
</antcall>
</target>
<target name="git-source" if="bm-git-url">
<condition property="fail-on-error" value="no" else="yes">
<isset property="bm-ignore-failure"/>
</condition>
<antcall target="check-git-source">
<param name="target-dir" value="${bm-downloads}"/>
<param name="git-url" value="${bm-git-url}"/>
<param name="git-commit" value="${bm-git-commit}"/>
<param name="target-file" value="${bm-src}"/>
<param name="fail-on-error" value="${bm-fail-on-error}"/>
</antcall>
</target>
<target name="pre-build" depends="clean, init, unpack"/>
<target name="clean">
......
--- apache-tomcat-9.0.2-src/build.properties.default.orig 2018-03-27 11:56:29.000000000 +1100
+++ apache-tomcat-9.0.2-src/build.properties.default 2018-03-27 11:56:36.000000000 +1100
@@ -96,9 +96,9 @@
base-tomcat.loc.1=${base-apache.loc.1}/tomcat
base-tomcat.loc.2=${base-apache.loc.2}/tomcat
--- apache-tomcat-9.0.2-src/build.properties.default.orig 2018-06-26 12:32:27.000000000 +1000
+++ apache-tomcat-9.0.2-src/build.properties.default 2018-06-26 12:32:33.000000000 +1000
@@ -144,7 +144,7 @@
nsis.nsisdl.dll=${nsis.home}/Plugins/${nsis.arch.dir}NSISdl.dll
nsis.system.dll=${nsis.home}/Plugins/${nsis.arch.dir}System.dll
nsis.nsdialogs.dll=${nsis.home}/Plugins/${nsis.arch.dir}nsDialogs.dll
-nsis.loc=${base-sf.loc}/nsis/nsis-${nsis.version}.zip
+nsis.loc=https://jaist.dl.sourceforge.net/project/nsis/NSIS%203/${nsis.version}/nsis-${nsis.version}.zip
-base-sf.loc=http://downloads.sourceforge.net
+base-sf.loc=https://downloads.sourceforge.net
# repo.maven.apache.org is the same as repo2.maven.org
-base-maven.loc=http://repo.maven.apache.org/maven2
+base-maven.loc=https://repo.maven.apache.org/maven2
# Mirror, was used when there were problems with the main SF downloads site
# base-sf.loc=http://sunet.dl.sourceforge.net
# ----- Commons Daemon, version 1.1.0 or later -----
commons-daemon.version=1.1.0
import click
import os
import subprocess as subp
@click.command()
@click.option("--build/--no-build", help="whether to build", default=True, show_default=True)
@click.option("--flags", "-f", help="flags to pass to DaCapo", default="")
@click.option("--verbose", "-v", help="show output from build and run", is_flag=True)
@click.argument("bench", type=click.Choice(['batik', 'eclipse', 'fop', 'h2', 'tomcat', 'tradebeans',
'luindex', 'sunflow', 'avrora', 'xalan', 'tradesoap',
'jython', 'lusearch','pmd', 'all']))
@click.argument("iterations", type=click.INT)
def main(build, flags, verbose, bench, iterations):
if build:
task = ("dist" if bench == 'all' else bench)
print "Building %s..." % task
subp.check_call(("ant %s" % task).split(), stdout=None if verbose else subp.PIPE)
dacapo_jar = filter(lambda s: s.startswith('dacapo') and s.endswith('.jar'), os.listdir('.'))[0]
benchmarks = subp.check_output(('java -jar %s -l' % dacapo_jar).split(' ')).strip().split()
total = { b: 0 for b in benchmarks }
first = {}
last = {}
for i in range(iterations):
print "Running iteration %d..." % i
for b in benchmarks:
print ("%s:" % b),
output = subp.check_output(("java -jar %s %s %s 2>&1 > /dev/null | grep \"PASSED\" | sed -E 's/.* in ([[:digit:]]+) msec .*/\\1/g'" % (dacapo_jar, b, flags)), shell=True)
msec = int(output)
print msec
total[b] += msec
if i == 0:
first[b] = msec
if i == iterations - 1:
last[b] = msec
for b in benchmarks:
avg = total[b] / iterations
print "---- Stats for %s ----" % b
print "Average: %d msec" % avg
print "First: %d msec" % first[b]
print "Last: %d msec" % last[b]
print "--------------------------"
if __name__ == "__main__":
main()
\ No newline at end of file
#!/bin/zsh
# NOTE: MUST USE BASH 4+, OTHERWISE USE ZSH
# BENCHMARK=$1
# SIZE=$2
# ITERATIONS=$3
# FLAGS=$4
function parse_args () {
POS=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
--no-build)
BUILD=false
shift # past argument
;;
*) # unknown option
POS+=("$1") # save it in an array for later
shift # past argument
;;
esac
done
BENCHMARK=$POS[1]
SIZE=$POS[2]
ITERATIONS=$POS[3]
FLAGS=$POS[4]
# set -- "${POS[@]}" # restore positional parameters
}
parse_args $*
if [ "$BENCHMARK" = "all" ]; then
BUILD_TASK="dist"
else
BUILD_TASK=$BENCHMARK
fi
# Building
if [ ! "$BUILD" = false ]; then
echo "Building $BUILD_TASK..."
ant $BUILD_TASK > /dev/null
fi
DACAPO_JAR=$(find . -maxdepth 1 -name '*.jar')
IFS=' ' BENCHMARKS=($(java -jar $DACAPO_JAR -l))
# Running
declare -A TOTAL
declare -A FIRST
declare -A LAST
for BENCH in $BENCHMARKS; do
TOTAL[$BENCH]=0
done
IFS=$'\n' ITER_IDX=($(seq 1 $ITERATIONS))
for ITER in $ITER_IDX; do
echo "Running iteration $ITER of size $SIZE..."
for BENCH in $BENCHMARKS; do
echo -n "$BENCH: "
MSEC=$(java -jar $DACAPO_JAR $BENCH -s $SIZE 2>&1 > /dev/null | grep "PASSED" | sed -E 's/.* in ([[:digit:]]+) msec .*/\1/g')
echo $MSEC
TOTAL[$BENCH]=$(expr $TOTAL[$BENCH] + $MSEC)
if [ $ITER -eq 1 ]; then
FIRST[$BENCH]=$MSEC
fi
if [ $ITER -eq $ITERATIONS ]; then
LAST[$BENCH]=$MSEC
fi
done
done
for BENCH in $BENCHMARKS; do
AVG=$(expr $TOTAL[$BENCH] / $ITERATIONS)
echo "---- Stats for $BENCH ----"
echo "Average: $AVG msec"
echo "First: $FIRST[$BENCH] msec"
echo "Last: $LAST[$BENCH] msec"
echo "--------------------------"
done
\ No newline at end of file
......@@ -82,6 +82,15 @@ public class TestHarness {
System.setProperty("java.awt.headless", "true");
setBuildInfo(); // set BuildVersion and BuildNickName.
if (BuildVersion.contains("git")) {
System.err.println(
"----------------------------------------------------------------\n" +
"WARNING: This is NOT a release build of the DaCapo suite.\n" +
"It has not been calibrated and must be used with great care.\n" +
"If you do use this build, be sure to cite the relevant git hash.\n" +
"----------------------------------------------------------------\n"
);
}
try {
commandLineArgs = new CommandLineArgs(args);
......
......@@ -18,7 +18,7 @@
<property name="lib-src-dir" location="libs/${lib-name}/src"/>
<property name="lib-data" location="libs/${lib-name}/data"/>
<target name="all" depends="url-source, svn-source, pre-build, build, jar, complete"/>
<target name="all" depends="url-source, svn-source, hg-source, git-source, pre-build, build, jar, complete"/>
<target name="url-source" if="lib-url">
<antcall target="check-source">
......@@ -37,6 +37,24 @@
</antcall>
</target>
<target name="hg-source" if="lib-hg-url">
<antcall target="check-hg-source">
<param name="target-dir" value="${lib-downloads}"/>
<param name="hg-url" value="${lib-hg-url}"/>
<param name="hg-revision" value="${lib-hg-revision}"/>
<param name="target-file" value="${lib-src}"/>
</antcall>
</target>
<target name="git-source" if="lib-git-url">
<antcall target="check-git-source">
<param name="target-dir" value="${lib-downloads}"/>
<param name="git-url" value="${lib-git-url}"/>
<param name="git-commit" value="${lib-git-commit}"/>
<param name="target-file" value="${lib-src}"/>
</antcall>
</target>
<target name="pre-build" depends="clean, init, unpack"/>
<target name="clean">
......
......@@ -30,7 +30,6 @@
<target name="build">
<exec executable="${mvn-exe}" dir="${lib-build-top}">
<env key="MAVEN_OPTS" value="-Xms256m -Xmx512m"/>
<arg value="clean"/>
<arg value="install"/>
</exec>
......
......@@ -318,6 +318,65 @@
</antcall>
</target>
<!-- get source from git repository -->
<target name="check-git-source" if="target-filename" depends="scm-init">
<antcall target="check-git-source.checkandupdate">
<param name="git-url" value="${git-url}"/>
<param name="git-commit" value="${git-commit}"/>
<param name="target-filename" value="${target-filename}"/>
<param name="fail-on-error" value="${fail-on-error}"/>
</antcall>
<antcall target="check-git-source.update">
<param name="git-url" value="${git-url}"/>
<param name="git-commit" value="${git-commit}"/>
<param name="target-filename" value="${target-filename}"/>
<param name="fail-on-error" value="${fail-on-error}"/>
</antcall>
<antcall target="check-source.checksum.update">
<param name="target-filename" value="${target-filename}"/>
</antcall>
<antcall target="check-source.checksum.verify">
<param name="target-filename" value="${target-filename}"/>
</antcall>
</target>
<!-- get the source from git and tar up if necessary -->
<target name="get-git-source" unless="target-valid-md5">
<property name="git-tmp" value="git-${build.time}"/>
<!-- set the input string to "p" to get around a bug where git asks about unknown certificates -->
<exec executable="git" failonerror="${fail-on-error}">
<arg line="clone ${git-url} ${git-tmp}"/>
</exec>
<exec executable="git" failonerror="${fail-on-error}" dir="${git-tmp}">
<arg line="checkout ${git-commit}"/>
</exec>
<!-- since timestamps are kept in tar balls we force to a date before the dacapo project start -->
<tar destfile="${target-filename}" basedir="${git-tmp}" compression="gzip" excludes=".git/**,**/.git/**"/>
<delete dir="${git-tmp}"/>
</target>
<target name="check-git-source.checkandupdate" if="target-available-for-verify">
<checksum-verify file="${target-filename}" property="target-valid-md5"/>
<antcall target="get-git-source">
<param name="git-url" value="${git-url}"/>
<param name="git-commit" value="${git-commit}"/>
<param name="target-filename" value="${target-filename}"/>
<param name="fail-on-error" value="${fail-on-error}"/>
</antcall>
</target>
<target name="check-git-source.update" unless="target-available">
<antcall target="get-git-source">
<param name="git-url" value="${git-url}"/>
<param name="git-commit" value="${git-commit}"/>
<param name="target-filename" value="${target-filename}"/>
<param name="fail-on-error" value="${fail-on-error}"/>
</antcall>
</target>
<!-- utility targets -->
<target name="check-source.checksum.update" unless="target-available-checksum">
<checksum-write file="${target-filename}"/>
......