From: Colin Walters Date: Mon, 25 Aug 2008 01:51:46 +0000 (+0000) Subject: Some statistics X-Git-Tag: GOBJECT_INTROSPECTION_0_5_0~78 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4cca0657fd3b10ffb4921bc39093b8baeee4f380;p=platform%2Fupstream%2Fgobject-introspection.git Some statistics svn path=/trunk/; revision=489 --- diff --git a/giscanner/glibtransformer.py b/giscanner/glibtransformer.py index 6da2790d..ca5296e7 100644 --- a/giscanner/glibtransformer.py +++ b/giscanner/glibtransformer.py @@ -646,7 +646,16 @@ class GLibTransformer(object): self._validating = True while True: initlen = len(nodes) - print "Type resolution; pass=%d (%d nodes)" % (i, initlen) + def count_type(otype): + return len([x for x in nodes + if isinstance(x[1], otype)]) + objectcount = count_type(GLibObject) + ifacecount = count_type(GLibInterface) + enumcount = count_type(GLibEnum) + boxedcount = count_type(GLibBoxed) + print "Type resolution; pass=%d" % (i, ) + print " %d nodes; %d objects, %d interfaces, %d enums, %d boxed" \ + % (initlen, objectcount, ifacecount, enumcount, boxedcount) nodes = list(self._names.names.itervalues()) for node in nodes: try: