Changeset 3d24cc9 for core


Ignore:
Timestamp:
Sep 8, 2017 11:16:40 AM (3 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
1a49309
Parents:
7346ce1
Message:

Move benchmarks into core

Location:
core/java
Files:
1 edited
3 moved

Legend:

Unmodified
Added
Removed
  • core/java/build.xml

    r7346ce1 r3d24cc9  
    383383    <!-- end unit tests -->
    384384
     385    <!-- benchmarks -->
     386    <target name="jmhLibCheck">
     387        <!-- override to Ant home if not set -->
     388        <property name="jmh.home" value="${ant.home}/lib" />
     389        <fail message="Please set jmh.home to a directory containing the necessary JMH libraries. See build.properties for details.">
     390            <condition>
     391                <not>
     392                    <and>
     393                        <available file="${jmh.home}/jmh-core.jar" />
     394                        <available file="${jmh.home}/jmh-generator-annprocess.jar" />
     395                        <available file="${jmh.home}/jopt-simple.jar" />
     396                        <available file="${jmh.home}/commons-math3.jar" />
     397                    </and>
     398                </not>
     399            </condition>
     400        </fail>
     401    </target>
     402
     403    <target name="bench.compile" depends="compile, jmhLibCheck">
     404        <mkdir dir="./build" />
     405        <mkdir dir="./build/obj_bench" />
     406        <javac srcdir="./bench" debug="true" source="${javac.version}" target="${javac.version}" deprecation="on"
     407               debuglevel="lines,vars,source"
     408               includeAntRuntime="false"
     409               destdir="./build/obj_bench" >
     410            <classpath>
     411                <pathelement location="${jmh.home}/jmh-core.jar" />
     412                <pathelement location="${jmh.home}/jmh-generator-annprocess.jar" />
     413                <pathelement location="./build/obj" />
     414            </classpath>
     415            <compilerarg line="${javac.compilerargs}" />
     416        </javac>
     417    </target>
     418
     419    <target name="bench.jar" depends="bench.compile, bench.jarUpToDate, listChangedFiles" unless="bench.jar.uptodate" >
     420        <!-- set if unset -->
     421        <property name="workspace.changes.tr" value="" />
     422        <jar destfile="./build/i2p-benchmarks.jar" basedir="./build/obj_bench" >
     423            <manifest>
     424                <attribute name="Built-By" value="${build.built-by}" />
     425                <attribute name="Build-Date" value="${build.timestamp}" />
     426                <attribute name="Base-Revision" value="${workspace.version}" />
     427                <attribute name="Main-Class" value="org.openjdk.jmh.Main" />
     428                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
     429                <attribute name="X-Compile-Source-JDK" value="${javac.version}" />
     430                <attribute name="X-Compile-Target-JDK" value="${javac.version}" />
     431            </manifest>
     432            <zipfileset src="${jmh.home}/jmh-core.jar" excludes="**/META-INF/services/**" />
     433            <zipfileset src="${jmh.home}/jopt-simple.jar" />
     434            <zipfileset src="${jmh.home}/commons-math3.jar" />
     435            <fileset dir="./build/obj" includes="**/*.class" />
     436        </jar>
     437    </target>
     438
     439    <target name="bench.jarUpToDate">
     440        <uptodate property="bench.jar.uptodate" targetfile="build/i2p-benchmarks.jar" >
     441            <srcfiles dir= "." includes="build/obj_bench/**/*.class" />
     442        </uptodate>
     443    </target>
     444
    385445    <target name="clean">
    386446        <delete dir="./build" />
Note: See TracChangeset for help on using the changeset viewer.