From: Leonardo Sandoval Date: Tue, 15 Nov 2016 21:19:51 +0000 (-0600) Subject: buildstats: Place 'Elapsed Time' stat into a single line X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~23559 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47dfd172754440a7ab28eb1b59d9bd484cdad22a;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git buildstats: Place 'Elapsed Time' stat into a single line All lines except one (the one containing the 'Elapsed Time') follows the format 'stat: value'. Fix that so post parsing the stats is simpler. Signed-off-by: Leonardo Sandoval Signed-off-by: Ross Burton --- diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass index 599a2199846..57ecc8fee87 100644 --- a/meta/classes/buildstats.bbclass +++ b/meta/classes/buildstats.bbclass @@ -80,8 +80,8 @@ def write_task_data(status, logfile, e, d): with open(os.path.join(logfile), "a") as f: elapsedtime = get_timedata("__timedata_task", d, e.time) if elapsedtime: - f.write(d.expand("${PF}: %s: Elapsed time: %0.2f seconds \n" % - (e.task, elapsedtime))) + f.write(d.expand("${PF}: %s\n" % e.task)) + f.write(d.expand("Elapsed time: %0.2f seconds\n" % elapsedtime)) cpu, iostats, resources, childres = get_process_cputime(os.getpid()) if cpu: f.write("utime: %s\n" % cpu['utime'])