buildstats-summary: add eventmask
Add eventmask 'bb.event.BuildCompleted' for buildstats_summary handler to avoid running the codes in the handler everytime there's an event. The codes in buildstats_summary only need to run for bb.event.BuildCompleted. So add this event mask. Also, we remove the redundant isinstance() statement in the handler. (From OE-Core rev: 3b635d34d44ee65f8cf93bc180f1ccc1095f2174) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
65c0027940
commit
9da81df30e
|
@ -1,8 +1,5 @@
|
|||
# Summarize sstate usage at the end of the build
|
||||
python buildstats_summary () {
|
||||
if not isinstance(e, bb.event.BuildCompleted):
|
||||
return
|
||||
|
||||
import collections
|
||||
import os.path
|
||||
|
||||
|
@ -37,3 +34,4 @@ python buildstats_summary () {
|
|||
bb.note(" {0}: {1}% sstate reuse ({2} setscene, {3} scratch)".format(t, 100*len(sstate)/(len(sstate)+len(no_sstate)), len(sstate), len(no_sstate)))
|
||||
}
|
||||
addhandler buildstats_summary
|
||||
buildstats_summary[eventmask] = "bb.event.BuildCompleted"
|
||||
|
|
Loading…
Reference in New Issue