Changeset 3d24cc9


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

Files:
1 deleted
2 edited
4 moved

Legend:

Unmodified
Added
Removed
  • build.xml

    r7346ce1 r3d24cc9  
    995995        <ant dir="installer/resources/locale" target="distclean" />
    996996        <ant dir="installer/tools/java" target="distclean" />
    997         <ant dir="benchmarks/java" target="distclean" />
    998997        <!--
    999998                NOTE! We need to turn off the default excludes for these
     
    18471846    <target name="testscripts-all" depends="testscripts,testscripts-net" />
    18481847
    1849     <target name="bench" depends="buildCore, jbigi" >
    1850         <ant dir="benchmarks/java/" target="all" />
     1848    <target name="bench" depends="jbigi" >
     1849        <ant dir="core/java/" target="bench.jar" />
    18511850    </target>
    18521851
  • 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" />
  • tests/scripts/benchmark.sh

    r7346ce1 r3d24cc9  
    99if [ "x$BENCHMARKS" = 'x' ]
    1010then
    11     BENCHMARKS="$CWD/benchmarks.jar"
     11    BENCHMARKS="$CWD/i2p-benchmarks.jar"
    1212    stat "$BENCHMARKS" >/dev/null 2>&1
    1313    if [ "x$?" != 'x0' ]
    1414    then
    15         BENCHMARKS="$CWD/java/build/benchmarks.jar"
     15        BENCHMARKS="$CWD/../../core/java/build/i2p-benchmarks.jar"
    1616    fi
    1717fi
     
    2323    if [ "x$?" != 'x0' ]
    2424    then
    25         JBIGI="$CWD/../build/jbigi.jar"
     25        JBIGI="$CWD/../../build/jbigi.jar"
    2626    fi
    2727fi
     
    3434fi
    3535
    36 $JAVA -cp "$CLASSPATH" "$@"
     36$JAVA -cp "$CLASSPATH" org.openjdk.jmh.Main "$@"
Note: See TracChangeset for help on using the changeset viewer.