[Scons-users] time profile

Dirk Bächle tshortik at gmx.de
Sat Jun 8 15:39:34 EDT 2013


Hi Phil,

On 08.06.2013 18:26, Philipp Kraus wrote:

> Hello,

>

> can I get some "profile information" of the building steps? I have got a project with different build targets (resources, dlls, ...) and I would like to get the compile & linking time of each source.

> My idea is to implementate a pseudo builder, that starts the time before the builder is called and stop it after that and stores the difference in a global data structure. I would like to

> push the profiling information at the end into a database.

>

> Do you have an idea to create this profiling information?


you could try to override the "spawn" function that gets used internally
whenever a command action is executed. Note, that this approach will
miss out on builders/actions that are defined as Python functions, but
you probably don't have many of those.
Check out

http://scons.org/wiki/LongCmdLinesOnWin32

to get an idea of how to proceed. To my knowledge there is no per
target/source information collected by default when SCons is run. So
you'll have to invent your own routines for tracking the times and file
paths.

I hope this gets you started.

Best regards,

Dirk




More information about the Scons-users mailing list