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 differentCounter
and 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.collect
first.