diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2019-06-18 07:51:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-19 12:46:43 +0100 |
commit | 37e5436e1e7802347aaed18b9fd5cb4496f6cc1c (patch) | |
tree | ccfa2d0e60b92d02ec11ed73aa49e65c7ddf8af1 /meta | |
parent | d4b6073246a4a21f7fe28b17f75f8df224cf76f8 (diff) | |
download | poky-37e5436e1e7802347aaed18b9fd5cb4496f6cc1c.tar.gz |
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: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 796f68cf8f..2e501df24b 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
@@ -839,11 +839,15 @@ python buildhistory_eventhandler() { | |||
839 | if e.data.getVar("BUILDHISTORY_COMMIT") == "1": | 839 | if e.data.getVar("BUILDHISTORY_COMMIT") == "1": |
840 | bb.note("Writing buildhistory") | 840 | bb.note("Writing buildhistory") |
841 | bb.build.exec_func("buildhistory_write_sigs", d) | 841 | bb.build.exec_func("buildhistory_write_sigs", d) |
842 | import time | ||
843 | start=time.time() | ||
842 | localdata = bb.data.createCopy(e.data) | 844 | localdata = bb.data.createCopy(e.data) |
843 | localdata.setVar('BUILDHISTORY_BUILD_FAILURES', str(e._failures)) | 845 | localdata.setVar('BUILDHISTORY_BUILD_FAILURES', str(e._failures)) |
844 | interrupted = getattr(e, '_interrupted', 0) | 846 | interrupted = getattr(e, '_interrupted', 0) |
845 | localdata.setVar('BUILDHISTORY_BUILD_INTERRUPTED', str(interrupted)) | 847 | localdata.setVar('BUILDHISTORY_BUILD_INTERRUPTED', str(interrupted)) |
846 | bb.build.exec_func("buildhistory_commit", localdata) | 848 | bb.build.exec_func("buildhistory_commit", localdata) |
849 | stop=time.time() | ||
850 | bb.note("Writing buildhistory took: %s seconds" % round(stop-start)) | ||
847 | else: | 851 | else: |
848 | bb.note("No commit since BUILDHISTORY_COMMIT != '1'") | 852 | bb.note("No commit since BUILDHISTORY_COMMIT != '1'") |
849 | } | 853 | } |