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
Counterobject. Expected usage involves taking the difference with a differentCounterand examining any changes.Returns#
- census
collections.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.collectfirst.- census