[issue16351] Add a function to get GC statistics

2013-12-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 17bd04fbf3d3 by R David Murray in branch 'default': whatsnew for gc.get_stats, plus doc tweaks. http://hg.python.org/cpython/rev/17bd04fbf3d3 -- ___ Python tracker rep...@bugs.python.org

[issue16351] Add a function to get GC statistics

2012-10-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 43d87cdf9457 by Antoine Pitrou in branch 'default': Issue #16351: New function gc.get_stats() returns per-generation collection statistics. http://hg.python.org/cpython/rev/43d87cdf9457 -- nosy: +python-dev

[issue16351] Add a function to get GC statistics

2012-10-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Now committed. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16351

[issue16351] Add a function to get GC statistics

2012-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Because it's much simpler like that. Well, I wrote a patch with structure sequences, it is really much more expansive. I have some comments. 1. You can allocate list of NUM_GENERATIONS elements and then use PyList_SET_ITEM(result, i, stat). This is 4

[issue16351] Add a function to get GC statistics

2012-10-28 Thread Antoine Pitrou
New submission from Antoine Pitrou: This patch adds a function named gc.get_stats() which returns a list of dictionaries containing per-generation statistics: import pprint, gc pprint.pprint(gc.get_stats()) [{'collected': 0, 'collections': 12, 'uncollectable': 0}, {'collected': 0,

[issue16351] Add a function to get GC statistics

2012-10-28 Thread Christian Heimes
Christian Heimes added the comment: What are the possible performance implications of the statistics? -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16351 ___

[issue16351] Add a function to get GC statistics

2012-10-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: You mean negative implications? None :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16351 ___ ___

[issue16351] Add a function to get GC statistics

2012-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why dictionaries and not struct sequences? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16351 ___

[issue16351] Add a function to get GC statistics

2012-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I understand. GC callbacks receive a dict. For avoid confusion with gc.DEBUG_STATS and to conform with callbacks argument name, may be better to name this function as gc.get_infos([generation])? -- ___ Python

[issue16351] Add a function to get GC statistics

2012-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I.e. gc.get_info([generation]). Returns the info for specified generation or total if the parameter omitted. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16351

[issue16351] Add a function to get GC statistics

2012-10-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why dictionaries and not struct sequences? Because it's much simpler like that. For avoid confusion with gc.DEBUG_STATS and to conform with callbacks argument name, may be better to name this function as gc.get_infos([generation])? Well, this is really

[issue16351] Add a function to get GC statistics

2012-10-28 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16351 ___ ___ Python-bugs-list mailing list