GH-140638: Add a GC "candidates" stat (GH-141814)

This commit is contained in:
Brandt Bucher 2025-11-22 13:59:14 -08:00 committed by GitHub
parent 425fd85ca3
commit 227b9d326e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 50 additions and 20 deletions

View file

@ -358,10 +358,11 @@ gc_get_stats_impl(PyObject *module)
for (i = 0; i < NUM_GENERATIONS; i++) {
PyObject *dict;
st = &stats[i];
dict = Py_BuildValue("{snsnsnsd}",
dict = Py_BuildValue("{snsnsnsnsd}",
"collections", st->collections,
"collected", st->collected,
"uncollectable", st->uncollectable,
"candidates", st->candidates,
"duration", st->duration
);
if (dict == NULL)