aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2019-06-15 06:55:13 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2020-09-16 15:25:19 +0200
commita6dae3c2cf8100cdd8efb109a8623c7ff943e677 (patch)
tree2ce0fd6d97c21e997fa6ebff3b17e96ca273513b
parent08bfe76f0b0c3dad82e539f700c75e1d1a728b2a (diff)
downloadopenembedded-core-contrib-jansa/warrior.tar.gz
openembedded-core-contrib-jansa/warrior.tar.bz2
openembedded-core-contrib-jansa/warrior.zip
buildhistory: show time spent writting buildhistoryjansa/warrior
* especially when pushing longer history to slow remote git server or when it timeouts during the push, it's useful to see where the time was actually spent Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta/classes/buildhistory.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 19d434fa06..8829030ef8 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -839,11 +839,15 @@ python buildhistory_eventhandler() {
if e.data.getVar("BUILDHISTORY_COMMIT") == "1":
bb.note("Writing buildhistory")
bb.build.exec_func("buildhistory_write_sigs", d)
+ import time
+ start=time.time()
localdata = bb.data.createCopy(e.data)
localdata.setVar('BUILDHISTORY_BUILD_FAILURES', str(e._failures))
interrupted = getattr(e, '_interrupted', 0)
localdata.setVar('BUILDHISTORY_BUILD_INTERRUPTED', str(interrupted))
bb.build.exec_func("buildhistory_commit", localdata)
+ stop=time.time()
+ bb.note("Writing buildhistory took: %s seconds" % round(stop-start))
else:
bb.note("No commit since BUILDHISTORY_COMMIT != '1'")
}