Skip to content
Snippets Groups Projects
Commit 37e5436e authored by Martin Jansa's avatar Martin Jansa Committed by Richard Purdie
Browse files

buildhistory: show time spent writting buildhistory


* 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

(From OE-Core rev: 96f1225d47985d94d9ed91eb5e7affdd70671c79)

Signed-off-by: default avatarMartin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
parent d4b60732
No related branches found
No related tags found
No related merge requests found
......@@ -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'")
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment