You can integrate the command line comparison with your ant script (read about ant at
ant.apache.org) by using
the compare task
that is provided in {JProfiler installation directory}/bin/ant.jar.
To make the compare task available to ant, you
must first insert a taskdef element that tells
ant where to find the task definition. Here is an example of using the
task in an ant build file:
<taskdef name="compare"
classname="com.jprofiler.ant.CompareTask"
classpath="C:\Program Files\jprofiler6\bin\ant.jar"/>
<target name="compare">
<compare sortbytime="true">
<fileset dir=".">
<include name="*.jps" />
</fileset>
<comparison name="TelemetryHeap" file="heap.html"/>
<comparison name="TelemetryThreads" file="threads.html">
<option name="measurements" value="inactive,active"/>
<option name="valuetype" value="bookmark"/>
<option name="bookmarkname" value="test"/>
</comparison>
</compare>
</target>
The taskdef definition must occur only once per
ant-build file and can appear anywhere on the top level below the
project element.
Note: it is not possible to copy the ant.jar archive to
the lib folder of your ant distribution. You have to reference a full
installation of JProfiler in the task definition.
|