<?xml version="1.0"?>
<project name="benchmark" default="default">
<description>
Lucene Benchmarking Contributions
</description>
<import file="/contrib-build.xml"/>
<!-- the tests have some parallel problems -->
<target name="check-files">
<available file="temp/${top.100k.words.archive.filename}"
property="top.100k.words.archive.present"/>
<available file="${working.dir}/top100k-out"
property="top.100k.word.files.expanded"/>
</target>
<target name="enwiki-files" depends="check-files">
<mkdir dir="temp"/>
<antcall target="get-enwiki"/>
<antcall target="expand-enwiki"/>
</target>
</target>
</target>
dest="temp/news20.tar.gz"/>
</target>
dest="temp/reuters21578.tar.gz"/>
</target>
</target>
<mkdir dir="${working.dir}/reuters"/>
<delete >
<fileset dir="${working.dir}/reuters">
<include name="*.txt"/>
</fileset>
</delete>
</target>
<classpath refid="run.classpath"/>
<arg file="${working.dir}/reuters"/>
<arg file="${working.dir}/reuters-out"/>
</java>
</target>
dest="temp/20news-18828.tar.gz"/>
</target>
</target>
dest="temp/mini_newsgroups.tar.gz"/>
</target>
</target>
<property name="top.100k.words.archive.filename"
<property name="top.100k.words.archive.base.url"
<mkdir dir="temp"/>
<get src="${top.100k.words.archive.base.url}/${top.100k.words.archive.filename}"
dest="temp/${top.100k.words.archive.filename}"/>
</target>
<mkdir dir="${working.dir}/top100k-out"/>
<untar src="temp/${top.100k.words.archive.filename}"
</target>
<target name="top-100k-wiki-word-files" depends="check-files">
<mkdir dir="${working.dir}"/>
<antcall target="get-top-100k-words-archive"/>
<antcall target="expand-top-100k-word-files"/>
</target>
<target name="get-files" depends="check-files">
<mkdir dir="temp"/>
<antcall target="get-reuters"/>
<antcall target="expand-reuters"/>
<antcall target="extract-reuters"/>
</target>
<path id="classpath">
<pathelement path="${memory.jar}"/>
<pathelement path="${highlighter.jar}"/>
<pathelement path="${analyzers-common.jar}"/>
<pathelement path="${facet.jar}"/>
<path refid="base.classpath"/>
<fileset dir="lib">
<include name="commons-compress-1.2.jar"/>
<include name="xercesImpl-2.9.1.jar"/>
</fileset>
</path>
<path id="run.classpath">
<path refid="classpath"/>
<pathelement path="${benchmark.ext.classpath}"/>
</path>
<target name="run-task" depends="compile,check-files,get-files"
description="Run compound penalty perf test (optional: -Dtask.alg=your-algorithm-file -Dtask.mem=java-max-mem)">
<classpath refid="run.classpath"/>
<arg file="${task.alg}"/>
</java>
</target>
<target name="enwiki" depends="compile,check-files,enwiki-files">
<assertions>
<enable/>
</assertions>
<classpath refid="run.classpath"/>
<arg file="conf/extractWikipedia.alg"/>
</java>
</target>
<property name="collation.output.file"
value="${working.dir}/collation.benchmark.output.txt"/>
<property name="collation.jira.output.file"
value="${working.dir}/collation.bm2jira.output.txt"/>
<path id="collation.runtime.classpath">
<path refid="run.classpath"/>
<pathelement path="${icu.jar}"/>
</path>
<target name="collation" depends="compile,jar-icu,top-100k-wiki-word-files">
maxmemory="${task.mem}" output="${collation.output.file}">
<classpath refid="collation.runtime.classpath"/>
<arg file="${collation.alg.file}"/>
</java>
<echo>Converting to JIRA table format...</echo>
<arg value="scripts/collation.bm2jira.pl"/>
<arg value="${collation.output.file}"/>
</exec>
</target>
<property name="shingle.output.file"
value="${working.dir}/shingle.benchmark.output.txt"/>
<property name="shingle.jira.output.file"
value="${working.dir}/shingle.bm2jira.output.txt"/>
<path id="shingle.runtime.classpath">
<path refid="run.classpath"/>
</path>
<target name="shingle" depends="compile,get-files">
maxmemory="${task.mem}" output="${shingle.output.file}">
<classpath refid="run.classpath"/>
<arg file="${shingle.alg.file}"/>
</java>
<echo>Converting to JIRA table format...</echo>
<arg value="scripts/shingle.bm2jira.pl"/>
<arg value="${shingle.output.file}"/>
</exec>
</target>
<!-- we don't actually need to compile this thing, we just want its lib -->
<target name="resolve-icu">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
<target name="init" depends="contrib-build.init,resolve-icu,jar-memory,jar-highlighter,jar-analyzers-common,jar-facet"/>
<target name="clean-javacc">
<containsregexp expression="Generated.*By.*JavaCC"/>
</fileset>
</target>
/>
</target>
<target name="copy-alg-files-for-testing" description="copy .alg files as resources for testing">
<fileset dir="conf"/>
</copy>
</target>
</project>