Calculate assembly build time in SCons

I have a project consisting of a binary and a set of static libraries on which it depends. I am trying to get the elapsed time to create each library without success.

I tried using AddPreAction()/AddPostAction() to calculate the elapsed time, but AddPreAction() is called as soon as all the source files that the library depends on have been compiled (which makes sense).

There is a message related to this problem:

How to measure build time for each scons build component?

But I would rather look for a more elegant solution, instead of overriding some environment variables, and then have to parse the output to calculate the time.

Thanks in advance.

+4
source share
1 answer

You can get timing information on various aspects of the build using the command line option --debug=time SCons, as described in the SCons user pages

Here's an excerpt, you can read the rest in the link above:

 --debug=time Prints various time profiling information: the time spent executing each individual build command; the total build time (time SCons ran from beginning to end); the total time spent reading and executing SConscript files; the total time spent SCons itself spend running (that is, not counting reading and executing SConscript files); and both the total time spent executing all build commands and the elapsed wall-clock time spent executing those build commands... 
+2
source

All Articles