In my build.xml
I have a main build target which is composed of several targets.
I need to check how much time takes to run those targets.
Currently in my output console, I only see TOTAL TIME
for the build.
Is there a way to show times for internal targets?
Asked
Active
Viewed 258 times
-1

Dhanuka
- 2,826
- 5
- 27
- 38

Jakub Filipczyk
- 1,141
- 8
- 18
2 Answers
1
If you want to print execution times of subtargets just use:
$phing <target> -logger phing.listener.TargetLogger

Grzegorz Krauze
- 1,130
- 12
- 26
0
It's quite straight forward.
- Create your logger class which extends phings
DefaultLogger
- Use event listener method
targetStarted
to store start timestamp - Use event listener method
targetFinished
to calculate elapsed time and print it to output stream - Use the logger by using command line attribute
-logger
f.e. to uselib/loggers/MyLogger.php
call:phing -logger lib.loggers.MyLogger

Jakub Filipczyk
- 1,141
- 8
- 18