[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Measure time spent in each target of a Makefile
From: |
Eric Melski |
Subject: |
Re: Measure time spent in each target of a Makefile |
Date: |
Mon, 8 Aug 2011 14:39:37 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 |
On 08/08/2011 09:29 AM, Matthias Puech wrote:
Dear Greg,
Thank you for your quick reply. I am sorry, my question was not clear
enough. I am aware of the SHELL trick but it doesn't quite fit my needs.
I need to be able to know the time taken by each *target*, not just the
commands launched. For example if I have:
ElectricMake (emake) can do this for you. emake is a drop-in
replacement for gmake (3.80 and 3.81) that can generate an XML annotated
version of the build output log, including information like time spent
on each target. Here's a snippet of such a log:
<job id="J09629460" thread="f56b1b70" type="rule" name="foo.o"
file="Makefile" line="3" neededby="J09629490">
<command line="4">
<argv>echo foo.o</argv>
<output src="prog">foo.o
</output>
</command>
<command line="5">
<argv>touch foo.o</argv>
</command>
<timing invoked="0.604963" completed="0.651096" node="linbuild2-1"/>
</job>
The target name is given as the name attribute of the <job> tag; the
timing information is given in the <timing> tag.
You can get a free evaluation copy here:
http://www.electric-cloud.com/products/eval-electricaccelerator-dev.php?s=make-help
And there's more information about the product here:
http://www.electric-cloud.com/products/electricaccelerator-dev.php
br,
Eric Melski
Architect, ElectricAccelerator
Electric Cloud, Inc.