* [PATCH V2 0/1] buildstats-summary: add eventmask
@ 2015-05-20 2:21 Chen Qi
2015-05-20 2:21 ` [PATCH V2 1/1] " Chen Qi
0 siblings, 1 reply; 2+ messages in thread
From: Chen Qi @ 2015-05-20 2:21 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 7ffe10df73cc20d10fcd41b121074445273bd60e:
license_class: license_create_manifest improvment (2015-05-09 22:26:02 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib ChenQi/buildstats-summary
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/buildstats-summary
Chen Qi (1):
buildstats-summary: add eventmask
meta/classes/buildstats-summary.bbclass | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH V2 1/1] buildstats-summary: add eventmask
2015-05-20 2:21 [PATCH V2 0/1] buildstats-summary: add eventmask Chen Qi
@ 2015-05-20 2:21 ` Chen Qi
0 siblings, 0 replies; 2+ messages in thread
From: Chen Qi @ 2015-05-20 2:21 UTC (permalink / raw)
To: openembedded-core
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>
---
meta/classes/buildstats-summary.bbclass | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/meta/classes/buildstats-summary.bbclass b/meta/classes/buildstats-summary.bbclass
index c8fbb2f..05ead9f 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"
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-20 2:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-20 2:21 [PATCH V2 0/1] buildstats-summary: add eventmask Chen Qi
2015-05-20 2:21 ` [PATCH V2 1/1] " Chen Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox