summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildstats-summary.bbclass
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2015-05-20 10:21:48 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-24 07:19:18 +0100
commit9da81df30e78005a076f6644dbe3fd6ab7dbc1ca (patch)
tree8168dfd28f96dc1069d55cc0046f8dcdffeb294b /meta/classes/buildstats-summary.bbclass
parent65c0027940c39c983d595e72b8aa9902570b4afc (diff)
downloadpoky-9da81df30e78005a076f6644dbe3fd6ab7dbc1ca.tar.gz
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>
Diffstat (limited to 'meta/classes/buildstats-summary.bbclass')
-rw-r--r--meta/classes/buildstats-summary.bbclass4
1 files changed, 1 insertions, 3 deletions
diff --git a/meta/classes/buildstats-summary.bbclass b/meta/classes/buildstats-summary.bbclass
index c8fbb2f1a1..05ead9fdbf 100644
--- a/meta/classes/buildstats-summary.bbclass
+++ b/meta/classes/buildstats-summary.bbclass
@@ -1,8 +1,5 @@
1# Summarize sstate usage at the end of the build 1# Summarize sstate usage at the end of the build
2python buildstats_summary () { 2python buildstats_summary () {
3 if not isinstance(e, bb.event.BuildCompleted):
4 return
5
6 import collections 3 import collections
7 import os.path 4 import os.path
8 5
@@ -37,3 +34,4 @@ python buildstats_summary () {
37 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))) 34 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)))
38} 35}
39addhandler buildstats_summary 36addhandler buildstats_summary
37buildstats_summary[eventmask] = "bb.event.BuildCompleted"