buildstats.bbclass: Remove useless variables
PATCH 1/2 buildstats.bbclass: Remove useless variables
Remove useless variables bn and bsdir in write_task_data().
Signed-off-by Junling Zheng <[email protected]>
--- meta/classes/buildstats.bbclass | 2 -- 1 file changed, 2 deletions(-)
meta/classes/buildstats.bbclass +0 -2
@@ -80,8 +80,6 @@ def get_buildtimedata(var, d): return timediff, cpuperc def write_task_data(status, logfile, e, d): - bn = d.getVar('BUILDNAME') - bsdir = os.path.join(d.getVar('BUILDSTATS_BASE'), bn) with open(os.path.join(logfile), "a") as f: elapsedtime = get_timedata("__timedata_task", d, e.time) if elapsedtime:
Signature · 1 line
2.17.1
PATCH 2/2 buildstats.bbclass: Do not recalculate build start time
The build start time is recorded in __timedata_build, which we should use rather than recalculating it.
Signed-off-by Junling Zheng <[email protected]>
--- meta/classes/buildstats.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/buildstats.bbclass +1 -1
@@ -136,7 +136,7 @@ python run_buildstats () { if x: f.write(x + " ") f.write("\n") - f.write("Build Started: %0.2f \n" % time.time()) + f.write("Build Started: %0.2f \n" % d.getVar('__timedata_build', False)[0]) elif isinstance(e, bb.event.BuildCompleted): build_time = os.path.join(bsdir, "build_stats")
Signature · 1 line
2.17.1