diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2019-06-15 06:55:13 +0000 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2019-10-17 17:51:03 +0000 |
commit | f99722d479916e0b253e74a38922c82877487579 (patch) | |
tree | 4153e2eda875bc6584efd66416b350e2e903e35e | |
parent | 13f29239a9b71ee2a714c990d2b86d162bbe6690 (diff) | |
download | openembedded-core-contrib-jansa/thud.tar.gz openembedded-core-contrib-jansa/thud.tar.bz2 openembedded-core-contrib-jansa/thud.zip |
buildhistory: show time spent writting buildhistoryjansa/thud
* 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.bbclass | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 08753339bb..99137d8e02 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -823,11 +823,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'") } |