Skip to content

gc.DEBUG_STATS reports invalid "elapsed" times #46719

Closed

Description

@exarkun
mannequin
BPO 2467
Nosy @pitrou, @nascheme
Files
  • debug-stats.patch
  • gc_timestat.patch: a more ambitious fix
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2008-12-17.22:51:06.806>
    created_at = <Date 2008-03-23.17:49:34.011>
    labels = ['interpreter-core', 'type-bug']
    title = 'gc.DEBUG_STATS reports invalid "elapsed" times'
    updated_at = <Date 2008-12-17.22:51:06.776>
    user = 'https://bugs.python.org/exarkun'

    bugs.python.org fields:

    activity = <Date 2008-12-17.22:51:06.776>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-12-17.22:51:06.806>
    closer = 'pitrou'
    components = ['Interpreter Core']
    creation = <Date 2008-03-23.17:49:34.011>
    creator = 'exarkun'
    dependencies = []
    files = ['9831', '9843']
    hgrepos = []
    issue_num = 2467
    keywords = ['patch']
    message_count = 3.0
    messages = ['64372', '64455', '77991']
    nosy_count = 3.0
    nosy_names = ['exarkun', 'pitrou', 'nas']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue2467'
    versions = ['Python 2.7']

    Activity

    1. exarkun commented on Mar 23, 2008

      exarkunmannequin
      MannequinAuthor

      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.

    2. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      type-bugAn unexpected behavior, bug, or error
      on Mar 23, 2008
    3. nascheme commented on Mar 25, 2008

      @nascheme
      Member

      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.

    4. pitrou commented on Dec 17, 2008

      @pitrou
      Member

      Fixed in r67832, thanks!

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions