diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2015-05-19 15:31:29 +0800 |
---|---|---|
committer | Chen Qi <Qi.Chen@windriver.com> | 2015-05-20 10:15:03 +0800 |
commit | 2ec9d6e9df15ecea7011cf1d9e9e452b56150846 (patch) | |
tree | 7d70274af8d67c99664fe08ebad59f9b3c889615 /meta | |
parent | 7ffe10df73cc20d10fcd41b121074445273bd60e (diff) | |
download | openembedded-core-contrib-2ec9d6e9df15ecea7011cf1d9e9e452b56150846.tar.gz |
buildstats-summary: add eventmaskChenQi/buildstats-summary
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.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/buildstats-summary.bbclass | 4 |
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 @@ # 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" |