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.
- census
Notes
This function counts _all_ Python objects in memory. To count only reachable objects, run
gc.collectfirst.