summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorEdoardo Bezzeccheri <edoardo.bezzeccheri@ch.abb.com>2019-10-01 11:47:32 (GMT)
committerEdoardo Bezzeccheri <edoardo.bezzeccheri@ch.abb.com>2019-10-01 11:47:32 (GMT)
commit0d2a82fe128c403bf4fa4f5deec23ead8fd24a91 (patch)
treef091bafad55a6ab8ef8e08eda774c52e13962c8e /src/engine
parent8173acb3d3b69144ba90d931e110ee5b8e2801d0 (diff)
downloadSCons-0d2a82fe128c403bf4fa4f5deec23ead8fd24a91.zip
SCons-0d2a82fe128c403bf4fa4f5deec23ead8fd24a91.tar.gz
SCons-0d2a82fe128c403bf4fa4f5deec23ead8fd24a91.tar.bz2
Added debug option "timestamp", implementation
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Script/Main.py10
-rw-r--r--src/engine/SCons/Script/SConsOptions.py2
2 files changed, 10 insertions, 2 deletions
diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py
index acc8678..e5b7f94 100644
--- a/src/engine/SCons/Script/Main.py
+++ b/src/engine/SCons/Script/Main.py
@@ -75,6 +75,7 @@ print_objects = 0
print_memoizer = 0
print_stacktrace = 0
print_time = 0
+print_timestamp = 0
sconscript_time = 0
cumulative_command_time = 0
exit_status = 0 # final exit status, assume success by default
@@ -209,7 +210,11 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
finish_time = time.time()
last_command_end = finish_time
cumulative_command_time = cumulative_command_time+finish_time-start_time
+ if print_timestamp:
+ sys.stdout.write("Command execution start time: %s: %f seconds\n"%(str(self.node), start_time))
sys.stdout.write("Command execution time: %s: %f seconds\n"%(str(self.node), finish_time-start_time))
+ if print_timestamp:
+ sys.stdout.write("Command execution stop time: %s: %f seconds\n"%(str(self.node), finish_time))
def do_failed(self, status=2):
_BuildFailures.append(self.exception[1])
@@ -636,7 +641,7 @@ def _SConstruct_exists(dirname='', repositories=[], filelist=None):
return None
def _set_debug_values(options):
- global print_memoizer, print_objects, print_stacktrace, print_time
+ global print_memoizer, print_objects, print_stacktrace, print_time, print_timestamp
debug_values = options.debug
@@ -674,6 +679,9 @@ def _set_debug_values(options):
options.tree_printers.append(TreePrinter(status=True))
if "time" in debug_values:
print_time = 1
+ if "timestamp" in debug_values:
+ print_time = 1
+ print_timestamp = 1
if "tree" in debug_values:
options.tree_printers.append(TreePrinter())
if "prepare" in debug_values:
diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py
index add1150..6baccc3 100644
--- a/src/engine/SCons/Script/SConsOptions.py
+++ b/src/engine/SCons/Script/SConsOptions.py
@@ -622,7 +622,7 @@ def Parser(version):
debug_options = ["count", "duplicate", "explain", "findlibs",
"includes", "memoizer", "memory", "objects",
"pdb", "prepare", "presub", "stacktrace",
- "time"]
+ "time", "timestamp"]
def opt_debug(option, opt, value__, parser,
debug_options=debug_options,