summaryrefslogtreecommitdiff
path: root/meta/classes/buildstats.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-15 19:34:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-15 19:34:13 +0000
commit770f832a0db4eb438ed94d6690d3674aae655e6a (patch)
tree6a004fdebc08cbbeade587de862c67314d789838 /meta/classes/buildstats.bbclass
parent58e878c554378b0c1023d509ccc2a46b3c525602 (diff)
downloadopenembedded-core-770f832a0db4eb438ed94d6690d3674aae655e6a.tar.gz
openembedded-core-770f832a0db4eb438ed94d6690d3674aae655e6a.tar.bz2
openembedded-core-770f832a0db4eb438ed94d6690d3674aae655e6a.tar.xz
openembedded-core-770f832a0db4eb438ed94d6690d3674aae655e6a.zip
buildstats.bbclass: Save ended time in TaskFinished events
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildstats.bbclass')
-rw-r--r--meta/classes/buildstats.bbclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index 9061b1150..0a29cfd5e 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -133,12 +133,13 @@ python run_buildstats () {
timedata = get_timedata("__timedata_task", e.data)
if not timedata:
return
- time, cpu = timedata
+ elapsedtime, cpu = timedata
bsdir = os.path.join(bb.data.getVar('BUILDSTATS_BASE', e.data, True), bn)
taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data))
file = open(os.path.join(taskdir, e.task), "a")
file.write(bb.data.expand("${PF}: %s: Elapsed time: %0.2f seconds \n" %
- (e.task, time), e.data))
+ (e.task, elapsedtime), e.data))
+ file.write("Ended: %0.2f \n" % time.time())
if cpu:
file.write("CPU usage: %0.1f%% \n" % cpu)