take_object_census#

lsst.utils.introspection.take_object_census() Counter[type]#

Count the number of existing objects, by type.

The census is returned as a Counter object. Expected usage involves taking the difference with a different Counter and examining any changes.

Returns#

censuscollections.Counter [type]

The number of objects found of each type.

Notes#

This function counts all Python objects in memory. To count only reachable objects, run gc.collect first.