Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id F3EC5E00C1E; Fri, 19 Feb 2016 06:49:25 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.55.52.88 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id BD971E00D34 for ; Fri, 19 Feb 2016 06:49:23 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 19 Feb 2016 06:49:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,470,1449561600"; d="scan'208";a="889608419" Received: from cbyrne3-mobl2.ger.corp.intel.com (HELO lp.ger.corp.intel.com) ([10.252.31.22]) by orsmga001.jf.intel.com with ESMTP; 19 Feb 2016 06:49:22 -0800 From: Elliot Smith To: toaster@yoctoproject.org Date: Fri, 19 Feb 2016 14:49:10 +0000 Message-Id: <1455893353-15024-3-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1455893353-15024-1-git-send-email-elliot.smith@intel.com> References: <1455893353-15024-1-git-send-email-elliot.smith@intel.com> Subject: [PATCH 2/5] toaster: elapsed time for a task is calculated in toaster.bbclass X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2016 14:49:26 -0000 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 --- 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.