build.xml 4 KB
Newer Older
David BAELDE's avatar
David BAELDE committed
1 2 3 4 5 6 7 8 9 10
<?xml version="1.0"?>
<project name="xpath-benchmark" default="all" basedir="."
         xmlns:unless="ant:unless">

  <description>Extract data from benchmark results.</description>
  
  <property name="xml" value="xpathmark"/>
  <property name="project.root" value="../.."/>
  <property name="lib.dir" value="${project.root}/lib"/>

David BAELDE's avatar
David BAELDE committed
11
  <target name="all" depends="saxon">
12
    <!-- matrices -->
13
    <!--antcall target="matrix">
14 15 16 17 18 19
      <param name="fragments" value="orig" />
      <param name="benchmarks" value="all-full" />
    </antcall>
    <antcall target="matrix">
      <param name="fragments" value="basic" />
      <param name="benchmarks" value="all-full" />
20
    </antcall-->
21 22 23 24
    <antcall target="matrix">
      <param name="fragments" value="full" />
      <param name="benchmarks" value="all-full" />
    </antcall>
25
    <!--antcall target="matrix">
26
      <param name="fragments" value="core-1.0" />
27
      <param name="benchmarks" value="all-full" />
28
    </antcall>
29
    <antcall target="matrix">
30
      <param name="fragments" value="core-2.0" />
31
      <param name="benchmarks" value="all-full" />
32 33 34
    </antcall>
    <antcall target="matrix">
      <param name="fragments" value="vertical" />
35
      <param name="benchmarks" value="all-full" />
36 37 38
    </antcall>
    <antcall target="matrix">
      <param name="fragments" value="forward" />
39
      <param name="benchmarks" value="all-full" />
40 41 42
    </antcall>
    <antcall target="matrix">
      <param name="fragments" value="downward" />
43
      <param name="benchmarks" value="all-full" />
44 45 46
    </antcall>
    <antcall target="matrix">
      <param name="fragments" value="non-mixing" />
47
      <param name="benchmarks" value="all-full" />
48 49 50
    </antcall>
    <antcall target="matrix">
      <param name="fragments" value="emso2" />
51
      <param name="benchmarks" value="all-full" />
52
    </antcall-->
53
    <!-- totals -->
David BAELDE's avatar
David BAELDE committed
54 55
    <antcall target="totals">
      <param name="fragments" value="full" />
56
      <param name="benchmarks" value="all-full" />
David BAELDE's avatar
David BAELDE committed
57
    </antcall>
58
    <!--antcall target="totals">
59
      <param name="fragments" value="orig" />
60
      <param name="benchmarks" value="all-full" />
61 62 63
    </antcall>
    <antcall target="totals">
      <param name="fragments" value="basic" />
64
      <param name="benchmarks" value="all-full" />
65
    </antcall-->
66
  </target>
David BAELDE's avatar
David BAELDE committed
67

68
  <!-- extract TeX matrix from benchmark data
69 70 71 72 73 74 75
       parameters:
         - fragments: name of fragment list
         - benchmarks: name of benchmark list
       respectively pointing to files
           ../../relaxng/fragments-${fragments}.xml
       and ./benchmarks-${benchmarks}.xml
  -->
David BAELDE's avatar
David BAELDE committed
76 77
  <target name="matrix">
    <xslt style="${project.root}/xslt/tex_matrix.xsl"
78
          in="benchmarks-${benchmarks}.xml"
79
          out="matrix_${benchmarks}_${fragments}.tex">
David BAELDE's avatar
David BAELDE committed
80 81 82 83 84 85 86 87 88 89 90 91 92
      <param
        name="xml_fragments"
        expression="../relaxng/fragments-${fragments}.xml" />
      <classpath>
        <pathelement path="${lib.dir}/saxon9he.jar"/>
      </classpath>
    </xslt>
  </target>

  <!-- same as "matrix" but for "totals" array -->
  <target name="totals">
    <xslt style="${project.root}/xslt/tex_totals.xsl"
          in="benchmarks-${benchmarks}.xml"
93
          out="totals_${benchmarks}_${fragments}.tex">
David BAELDE's avatar
David BAELDE committed
94 95
      <param
        name="xml_fragments"
96
        expression="../relaxng/fragments-${fragments}.xml" />
David BAELDE's avatar
David BAELDE committed
97 98 99 100 101 102
      <classpath>
        <pathelement path="${lib.dir}/saxon9he.jar"/>
      </classpath>
    </xslt>
  </target>

David BAELDE's avatar
David BAELDE committed
103 104 105 106 107 108 109 110 111 112 113
  <!-- download saxon if needed -->
  <target name="saxon">
    <local name="offline"/>
    <available file="../../lib/saxon9he.jar" property="offline"/>
    <mkdir unless:set="offline" dir="../lib"/>
    <get unless:set="offline"
         src="https://downloads.sourceforge.net/project/saxon/Saxon-HE/9.7/SaxonHE9-7-0-14J.zip?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fsaxon%2Ffiles%2FSaxon-HE%2F9.7%2F&amp;ts=1485885576&amp;use_mirror=vorboss"
         dest="../../lib" usetimestamp="true"/>
       <unzip unless:set="offline" src="../../lib/SaxonHE9-7-0-14J.zip" dest="../../lib"
           overwrite="no"/>
  </target>
David BAELDE's avatar
David BAELDE committed
114
</project>