Skip to contentSkip to conversation

buildman: Show the build rate at the end

PATCH New Simon Glass 1 participant 2 messages Jul 19, 2020 – Jul 28, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

 tools/buildman/README     | 13 +++++++++++++
 tools/buildman/builder.py |  3 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)
tools/buildman/README +13 -0
index b2f983c715..b7442a95e5 100644
@@ -1129,6 +1129,19 @@ The -y option is provided (for use with -s) to ignore the bountiful device-tree
 warnings. Similarly, -Y tells buildman to ignore the migration warnings.
 
 
+Build summary
+=============
+
+When buildman finishes it shows a summary, something like this:
+
+    Completed: 5 total built, duration 0:00:21, rate 0.24
+
+This shows that a total of 5 builds were done across all selected boards, it
+took 21 seconds and the builds happened at the rate of 0.24 per second. The
+latter number depends on the speed of your machine and the efficiency of the
+U-Boot build.
+
+
 How to change from MAKEALL
 ==========================
 
tools/buildman/builder.py +2 -1
index f2756ea666..dbb75b35c1 100644
@@ -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)
Signature · 1 line
2.28.0.rc0.105.gf9edc3c819-goog
#1 lore raw

PATCH 1/1 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.

---

 tools/buildman/README     | 13 +++++++++++++
 tools/buildman/builder.py |  3 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)

Applied to u-boot-dm, thanks!