aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/build.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-03-17 15:28:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-21 14:47:41 +0000
commit7a08282c074c264f414cf7665dc873f51245072c (patch)
tree0cad5c702c13e6a0c7fed073fec85d0b16672457 /lib/bb/build.py
parentdf9e22901555b06fef308f7136547f2c47ccec35 (diff)
downloadbitbake-7a08282c074c264f414cf7665dc873f51245072c.tar.gz
toaster: measure task duration with server-side timestamps
The buildstats and toaster use separate time markers to measure the duration of task execution. This causes a mismatch in the time measured by buildstats class and the time measured in toaster. The solution implemented here is to timestamp the creation of every TaskBase event on the bitbake server side and calculate the execution duration as the difference between creation time of TaskSucceeded and TaskStarted events. Based on an original patch by Marius Avram. [YOCTO #5485] Signed-off-by: Marius Avram <marius.avram@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/bb/build.py')
-rw-r--r--lib/bb/build.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 52e41493c..5cb4c06a8 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -30,6 +30,7 @@ import sys
import logging
import shlex
import glob
+import time
import bb
import bb.msg
import bb.process
@@ -75,6 +76,7 @@ class TaskBase(event.Event):
self.taskfile = d.getVar("FILE", True)
self.taskname = self._task
self.logfile = logfile
+ self.time = time.time()
event.Event.__init__(self)
self._message = "recipe %s: task %s: %s" % (d.getVar("PF", True), t, self.getDisplayName())