JMSLab / Template

Template for research repository using scons.
9 stars 1 forks source link

Modify builders to routinely output more granular timestamps #96

Closed zhizhongpu closed 5 months ago

zhizhongpu commented 5 months ago

We would like to record each code file's run time, which we hope to be reflected in sconscript.log.

Currently, sconscript.log only documents the starting time when the entire SCons process starts, and the ending time when the specific source folder finishes running. For example, under output/dir1 we may have a log file that begins with:

Builder log created: {2099-03-28 17:35:28} Builder log completed: {2099-03-28 23:51:54}

while under output/dir2 we have a log file that begins with:

Builder log created: {2099-03-28 17:35:28} Builder log completed: {2099-03-29 00:22:35}

zhizhongpu commented 5 months ago

Update: the observed identical starting time was in fact due to parallelization So the existing log does document run time at the level of each directory / SConscript The only possible improvement is to refine it further to each script level. @jmshapir I'll put this to slow track. Feel free to close the issue if you don't think further improvement is necessary.

jmshapir commented 5 months ago

@zhizhongpu do you think it would be very valuable for us to have timestamps for each script?

If so, please feel free to keep this open and work on it when you can. If not, please close.

Thanks!

zhizhongpu commented 5 months ago

@jmshapir I don't see high value yet, although I've only seen few code folders. I'll close it for now and may reopen later if I find it important.

jmshapir commented 5 months ago

Summary: In this issue we considered modifying builders to output more granular timestamp information at the level of the individual process rather than the individual SConscript. We decided not to pursue this now but may pick it back up again in future if we find use cases where the value would be very high.