Printing Ant target execution time

后端 未结 4 512
广开言路
广开言路 2020-12-14 08:13

I want to print the execution time taken for each individual Ant target and its dependent targets.



        
4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-14 08:44

    Since Ant 1.8.0 you can use a profilelogger to do this.

    ant -logger org.apache.tools.ant.listener.ProfileLogger target
    

    Produces output like

    Target aTarget: started Thu Jan 22 09:01:00 CET 2009

    echo: started Thu Jan 22 09:01:00 CET 2009 [echo] echo-task

    echo: finishedThu Jan 22 09:01:00 CET 2009 (250ms)

    zip: started Thu Jan 22 09:01:00 CET 2009 [zip] Building zip: ...\my.zip

    zip: finishedThu Jan 22 09:01:01 CET 2009 (1313ms)

    Target aTarget: finishedThu Jan 22 09:01:01 CET 2009 (1719ms)

提交回复
热议问题