I have a project that consists of a binary and a set of static libraries it depends on. I'm trying to get the elapsed time for building each library without success.
I have tried to use AddPreAction()/AddPostAction()
for calculating the elapsed time but AddPreAction()
is called once all the source files the library depends on have been compiled (which makes sense).
There is a post related to this issue:
How can I measure the build time for each component of a scons build?
But I would prefer to look for a more elegant solution rather than overriding some environment variables and then have to parse the output in order to calculate the times.
Thanks in advance.
You can get timing information on various different aspects of the build using the --debug=time
SCons command line option, as documented in the SCons man pages
Here's an excerpt, you can read the rest in the link provided 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...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With