[Toaster] [PATCH 2/5] toaster: elapsed time for a task is calculated in toaster.bbclass

Elliot Smith elliot.smith at intel.com
Fri Feb 19 06:49:10 PST 2016


The elapsed time is now calculated in toaster.bbclass, so there's
no need to do it in BuildInfoHelper any more.

[YOCTO #8842]

Signed-off-by: Elliot Smith <elliot.smith at intel.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 81abede..2b5d312 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -259,14 +259,6 @@ class ORMWrapper(object):
                 task_object.sstate_result = Task.SSTATE_FAILED
                 object_changed = True
 
-        # mark down duration if we have a start time and a current time
-        if 'start_time' in task_information.keys() and 'end_time' in task_information.keys():
-            duration = task_information['end_time'] - task_information['start_time']
-            task_object.elapsed_time = duration
-            object_changed = True
-            del task_information['start_time']
-            del task_information['end_time']
-
         if object_changed:
             task_object.save()
         return task_object
@@ -1091,7 +1083,9 @@ class BuildInfoHelper(object):
 
 
     def store_tasks_stats(self, event):
-        for (taskfile, taskname, taskstats, recipename) in BuildInfoHelper._get_data_from_event(event):
+        task_data = BuildInfoHelper._get_data_from_event(event)
+
+        for (taskfile, taskname, taskstats, recipename) in task_data:
             localfilepath = taskfile.split(":")[-1]
             assert localfilepath.startswith("/")
 
-- 
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



More information about the toaster mailing list