The comparison ant task can be used to generate comparisons from a number of saved snapshots. For more information please consult the overview. |
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\jprofiler10\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. |
The compare task supports the following attributes:
The compare task can contain nested fileset elements to specify the snapshots that should be compared. If no fileset is specified, the listfile attribute of the compare task must be set. The compare task contains a list of comparison elements with the following attributes:
The comparison element can optionally contain a list of option elements with the following attributes:
|