Some statistics
authorColin Walters <walters@src.gnome.org>
Mon, 25 Aug 2008 01:51:46 +0000 (01:51 +0000)
committerColin Walters <walters@src.gnome.org>
Mon, 25 Aug 2008 01:51:46 +0000 (01:51 +0000)
svn path=/trunk/; revision=489

giscanner/glibtransformer.py

index 6da2790dba71f8c28712b54bb3965a01380f0acd..ca5296e7f96aa09f8ab7a5b63c2351fdcd4c17fa 100644 (file)
@@ -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: