Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

Commit

Permalink
oelite/oven.py: print times with millisecond accuracy
Browse files Browse the repository at this point in the history
There's just a tad too many digits in "native:bzip2_1.0.6:do_package
finished - 1.51460909843 s". Print all time deltas with "%.3f".
  • Loading branch information
Rasmus Villemoes committed Nov 4, 2016
1 parent b4368be commit 43a3af6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/oelite/oven.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ def wait_task(self, poll, task):

task.recipe.remaining_tasks -= 1
if result:
info("%s finished - %s s" % (task, delta))
info("%s finished - %.3f s" % (task, delta))
task.build_done(self.baker.runq.get_task_buildhash(task))
self.baker.runq.mark_done(task)
self.completed_tasks.append(task)
else:
err("%s failed - %s s" % (task, delta))
err("%s failed - %.3f s" % (task, delta))
self.failed_tasks.append(task)
task.build_failed()

Expand All @@ -127,7 +127,7 @@ def wait_any(self, poll):
t = tasks[0]
if self.stdout_isatty:
now = oelite.util.now()
info("waiting for %s (started %6.2f ago) to finish" % (t, now-self.starttime[t]))
info("waiting for %s (started %.3f seconds ago) to finish" % (t, now-self.starttime[t]))
return self.wait_task(False, t)
tasks.sort(key=lambda t: self.starttime[t])
i = 0
Expand All @@ -143,7 +143,7 @@ def wait_any(self, poll):
info("waiting for any of these to finish:")
now = oelite.util.now()
for t in tasks:
info(" %-40s started %6.2f s ago" % (t, now-self.starttime[t]))
info(" %-40s started %.3f seconds ago" % (t, now-self.starttime[t]))
time.sleep(0.1)
return None

Expand Down

0 comments on commit 43a3af6

Please sign in to comment.