Rearrange presubmit timing message for easier scanning

Some presubmits can be take orders of magnitude longer than others, but
finding these presubmits is difficult if the time is printed at the end
of the output lines. Moving the time to the start, with enough alignment
for all plausible times, makes scanning the output easy.

Bug: 1309977
Change-Id: I9ba1a599e9825801e1128844a39c7ccafe046f91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3744130
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
changes/30/3744130/2
Bruce Dawson 3 years ago committed by LUCI CQ
parent c3ac73ebfa
commit 6757d46962

@ -1655,8 +1655,8 @@ class PresubmitExecuter(object):
elapsed_time = time_time() - start_time
if elapsed_time > 10.0:
sys.stdout.write('%s from %s took %.1fs to run.\n' %
(function_name, presubmit_path, elapsed_time))
sys.stdout.write('%6.1fs to run %s from %s.\n' %
(elapsed_time, function_name, presubmit_path))
if sink:
status = rdb_wrapper.STATUS_PASS
if any(r.fatal for r in result):

Loading…
Cancel
Save