classification
Title: gc.DEBUG_STATS reports invalid "elapsed" times
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: exarkun, nas, pitrou
Priority: normal Keywords: patch

Created on 2008-03-23 17:49 by exarkun, last changed 2008-12-17 22:51 by pitrou. This issue is now closed.

Files
File name Uploaded Description Edit
debug-stats.patch exarkun, 2008-03-23 17:49
gc_timestat.patch nas, 2008-03-25 04:23 a more ambitious fix
Messages (3)
msg64372 - (view) Author: Jean-Paul Calderone (exarkun) * (Python committer) Date: 2008-03-23 17:49
If gc.set_debug(gc.DEBUG_STATS) is enabled, collection will report
elapsed time as it progresses through collection.  However, the
reporting code clobbers the value it uses to compute the elapsed time,
so the value alternates between an almost correct valid and a completely
incorrect value.
msg64455 - (view) Author: Neil Schemenauer (nas) Date: 2008-03-25 04:23
The original code is pretty icky.  I'm attaching a patch that improves
it, IMO.  Before the elapsed time was only shown if garbage was found. 
I think it should always be shown if DEBUG_STATS is set.
msg77991 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-12-17 22:51
Fixed in r67832, thanks!
History
Date User Action Args
2008-12-17 22:51:06pitrousetstatus: open -> closed
versions: + Python 2.7, - Python 2.6, Python 2.5
nosy: + pitrou
messages: + msg77991
resolution: fixed
stage: resolved
2008-03-25 04:23:09nassetfiles: + gc_timestat.patch
nosy: + nas
messages: + msg64455
2008-03-23 17:49:34exarkuncreate