aboutsummaryrefslogtreecommitdiffstats
path: root/tools/buildman/builder.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-19 12:40:26 -0600
committerSimon Glass <sjg@chromium.org>2020-07-28 19:30:39 -0600
commit38f159c05b3cdbc6f4701acd139b6577260081a9 (patch)
tree4cda4957c75203a91768f3f077c6d97d6bac7418 /tools/buildman/builder.py
parent3918dfaa910e35a753b91e0124e13c6c80c8d0d2 (diff)
downloadu-boot-38f159c05b3cdbc6f4701acd139b6577260081a9.tar.gz
buildman: Show the build rate at the end
It is interesting to note the number of builds completed per second to track machine performance and build speed. Add a 'rate' value at the end of the build to show this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/builder.py')
-rw-r--r--tools/buildman/builder.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index f2756ea6665..dbb75b35c17 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -1677,7 +1677,8 @@ class Builder:
if duration.microseconds >= 500000:
duration = duration + timedelta(seconds=1)
duration = duration - timedelta(microseconds=duration.microseconds)
- msg += ', duration %s' % duration
+ rate = float(self.count) / duration.total_seconds()
+ msg += ', duration %s, rate %1.2f' % (duration, rate)
Print(msg)
return (self.fail, self.warned)