|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.antcontrib.perf.AntPerformanceListener
public class AntPerformanceListener
This BuildListener keeps track of the total time it takes for each target and
task to execute, then prints out the totals when the build is finished. This
can help pinpoint the areas where a build is taking a lot of time so
optimization efforts can focus where they'll do the most good. Execution times
are grouped by targets and tasks, and are sorted from fastest running to
slowest running.
Output can be saved to a file by setting a property in Ant. Set
"performance.log" to the name of a file. This can be set either on the
command line with the -D option (-Dperformance.log=/tmp/performance.log)
or in the build file itself (
Developed for use with Antelope, migrated to ant-contrib Oct 2003.
Nested Class Summary | |
---|---|
class |
AntPerformanceListener.StopWatch
A stopwatch, useful for 'quick and dirty' performance testing. |
class |
AntPerformanceListener.StopWatchComparator
Compares the total times for two StopWatches. |
Constructor Summary | |
---|---|
AntPerformanceListener()
|
Method Summary | |
---|---|
void |
buildFinished(org.apache.tools.ant.BuildEvent be)
Sorts and prints the results. |
void |
buildStarted(org.apache.tools.ant.BuildEvent be)
Starts a 'running total' stopwatch. |
static void |
main(java.lang.String[] args)
|
void |
messageLogged(org.apache.tools.ant.BuildEvent be)
no-op |
void |
targetFinished(org.apache.tools.ant.BuildEvent be)
Stop timing the given target. |
void |
targetStarted(org.apache.tools.ant.BuildEvent be)
Start timing the given target. |
void |
taskFinished(org.apache.tools.ant.BuildEvent be)
Stop timing the given task. |
void |
taskStarted(org.apache.tools.ant.BuildEvent be)
Start timing the given task. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AntPerformanceListener()
Method Detail |
---|
public void buildStarted(org.apache.tools.ant.BuildEvent be)
buildStarted
in interface org.apache.tools.ant.BuildListener
public void buildFinished(org.apache.tools.ant.BuildEvent be)
buildFinished
in interface org.apache.tools.ant.BuildListener
public void targetStarted(org.apache.tools.ant.BuildEvent be)
targetStarted
in interface org.apache.tools.ant.BuildListener
public void targetFinished(org.apache.tools.ant.BuildEvent be)
targetFinished
in interface org.apache.tools.ant.BuildListener
public void taskStarted(org.apache.tools.ant.BuildEvent be)
taskStarted
in interface org.apache.tools.ant.BuildListener
public void taskFinished(org.apache.tools.ant.BuildEvent be)
taskFinished
in interface org.apache.tools.ant.BuildListener
public void messageLogged(org.apache.tools.ant.BuildEvent be)
messageLogged
in interface org.apache.tools.ant.BuildListener
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |