Debian Codegraph @

docs/manual/tasks/performance_monitor.html

raw symbols SCIP
1 <html>
2 <head>
3 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4 <title>
5 Performance Monitoring</title>
6 <meta content="DocBook XSL Stylesheets V1.60.1" name="generator">
7 <link rel="home" href="index.html" title="Antelope Users Guide">
8 <link rel="up" href="bk03.html" title="Additional Ant Tasks">
9 <link rel="previous" href="bk03ch16.html" title="Chapter&nbsp;16.&nbsp;Call Task">
10 <link rel="next" href="bk03ch18.html" title="Chapter&nbsp;18.&nbsp;Feedback">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <div class="chapter" lang="en">
14 <div class="titlepage">
15 <div>
16 <div>
17 <h2 class="title">
18 <a name="performance">
19 </a>
20 Performance Monitoring</h2>
21 </div>
22 </div>
23 <div>
24 </div>
25 </div>
26 <p>
27
28 The "Performance Monitor" is
29 a special Ant listener than can keep track of the amount of time that each target
30 and task takes to execute. At the end of the build, these times will be sorted
31 from fastest to slowest and displayed following the build output. This can be
32 useful to pinpoint slow and/or inefficient spots in the build process and
33 identify those areas that could benefit from optimization.
34 </p>
35 <p>
36
37 The performance listener can be used by passing a parameter
38 to the command line for Ant:
39 </p>
40 <p>
41
42 <table border="0" bgcolor="#E0E0E0">
43 <tr>
44 <td>
45 <pre class="programlisting">
46
47
48 ant -listener net.sf.antcontrib.perf.AntPerformanceListener target
49
50 </pre>
51 </td>
52 </tr>
53 </table>
54
55 </p>
56 <p>
57
58 Following is an example of the results from using the listener. The result format is projectname.targetname for targets and projectname.targetname.taskname for tasks. All times are shown to the nearest millisecond.
59 <table border="0" bgcolor="#E0E0E0">
60 <tr>
61 <td>
62 <pre class="programlisting">
63
64
65 [danson@blackdog antelope]$ ant -listener net.sf.antcontrib.perf.AntPerformanceListener dist
66 Buildfile: build.xml
67
68 init:
69
70 clean:
71 [delete] Deleting 170 files from /home/danson/apps/antelope/build
72
73 compile:
74 [javac] Compiling 61 source files to /home/danson/apps/antelope/build
75
76 all:
77
78 -build_number:
79
80 prep_files:
81 [delete] Deleting 3 files from /home/danson/apps/antelope/config
82 [copy] Copying 3 files to /home/danson/apps/antelope/config
83
84 combined:
85 [echo] basedir = /home/danson/apps/antelope
86 [jar] Building jar: /home/danson/apps/antelope/Antelope_1.208.jar
87
88 dist:
89 [delete] Deleting 4 files from /home/danson/apps/antelope/dist
90 [zip] Building zip: /home/danson/apps/antelope/dist/Antelope_1.208.zip
91 [echo] Created zip file.
92
93 -zip_docs:
94 [zip] Building zip: /home/danson/apps/antelope/dist/Antelope_docs_1.208.zip
95 [echo] Zipped docs to Antelope_docs_1.208.zip.
96
97 -zip_tasks:
98 [jar] Building jar: /tmp/Antelope_tasks_1.208.jar
99 [zip] Building zip: /home/danson/apps/antelope/dist/Antelope_tasks_1.208.zip
100 [delete] Deleting: /tmp/Antelope_tasks_1.208.jar
101 [echo] Zipped tasks to Antelope_tasks_1.208.zip.
102 [copy] Copying 1 file to /home/danson/apps/antelope/dist
103
104 BUILD SUCCESSFUL
105 Total time: 8 seconds
106
107 -------------- Target Results -----------------------
108 Antelope.all: 0.000 sec
109 Antelope.init: 0.011 sec
110 Antelope.-build_number: 0.014 sec
111 Antelope.clean: 0.233 sec
112 Antelope.-zip_tasks: 0.297 sec
113 Antelope.prep_files: 0.311 sec
114 Antelope.-zip_docs: 0.546 sec
115 Antelope.combined: 1.290 sec
116 Antelope.compile: 1.724 sec
117 Antelope.dist: 2.162 sec
118
119 -------------- Task Results -----------------------
120 Antelope.init.mkdir: 0.000 sec
121 Antelope.init.mkdir: 0.001 sec
122 Antelope.dist.echo: 0.002 sec
123 Antelope.prep_files.delete: 0.004 sec
124 Antelope.combined.echo: 0.005 sec
125 Antelope.dist.delete: 0.006 sec
126 Antelope.-zip_tasks.echo: 0.007 sec
127 Antelope.dist.copy: 0.011 sec
128 Antelope.-build_number.buildnumber: 0.014 sec
129 Antelope.compile.copy: 0.016 sec
130 Antelope.prep_files.copy: 0.020 sec
131 Antelope.prep_files.replace: 0.071 sec
132 Antelope.-zip_tasks.zip: 0.122 sec
133 Antelope.-zip_tasks.jar: 0.161 sec
134 Antelope.prep_files.replace: 0.216 sec
135 Antelope.clean.delete: 0.233 sec
136 Antelope.dist.antcall: 0.421 sec
137 Antelope.-zip_docs.zip: 0.540 sec
138 Antelope.dist.antcall: 0.685 sec
139 Antelope.dist.zip: 1.036 sec
140 Antelope.combined.jar: 1.284 sec
141 Antelope.compile.javac: 1.708 sec
142
143 -------------- Totals -----------------------
144 Start time: Thu, 5 Dec 2002 17:18:30
145 Stop time: Thu, 5 Dec 2002 17:18:39
146 Total time: 8.476 sec
147
148 </pre>
149 </td>
150 </tr>
151 </table>
152
153 </p>
154 </div>
155 <hr>
156 <p align="center">Copyright &copy; 2003 Ant-Contrib Project. All
157 rights Reserved.</p>
158 </body>
159 </html>