The time command's output is merely informational and less relevant
now that performance is better than it used to be. Calling it
unconditional is problematic because some build hosts might not have
it.

By default the command is no longer used, but can still be enabled
locally by setting SWUPD_TIMING_CMD = "time" in local.conf or
site.conf.

Signed-off-by: Patrick Ohly <patrick.o...@intel.com>
---
 classes/swupd-image.bbclass | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/classes/swupd-image.bbclass b/classes/swupd-image.bbclass
index 78a26ac..771a416 100644
--- a/classes/swupd-image.bbclass
+++ b/classes/swupd-image.bbclass
@@ -338,6 +338,12 @@ python do_fetch_swupd_inputs () {
 do_fetch_swupd_inputs[dirs] = "${SWUPDIMAGEDIR}"
 addtask do_fetch_swupd_inputs before do_swupd_update
 
+# Change this to SWUPD_TIMING_CMD = "time" in local.conf
+# to enable timing the individual swupd server command invocations.
+# Relies on a build host which has "time" as a shell or system
+# command.
+SWUPD_TIMING_CMD ?= ""
+
 # do_swupd_update uses its own pseudo database, for several reasons:
 # - Performance is better when the pseudo instance is not shared
 #   with other tasks that run in parallel (for example, meta-isafw's 
do_analyse_image).
@@ -504,7 +510,7 @@ END
 
     invoke_swupd () {
         echo $PSEUDO "$@"
-        time env $PSEUDO "$@"
+        ${SWUPD_TIMING_CMD} env $PSEUDO "$@"
     }
 
     waitall () {
-- 
2.11.0

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to