Skip to content

Add gc collection time to gc callbacks #140515

Closed as not planned
Closed as not planned

Description

@sergey-miryanov

Feature or enhancement

Proposal:

During the last performance meeting, Brandt requested that the GC collection time be added to the GC callbacks.

I propose to extend the information that GC provides for callbacks as follows:

start {'generation': 2, 'collected': 0, 'uncollectable': 0}
stop {'generation': 2, 'collected': 21, 'uncollectable': 0, 'collection_time': 0.1285373}

We do not change anything for the start event. For the 'stop' event, we add collection_time which is the collection time in seconds.

@brandtbucher Would this work for you?

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Activity

  1. added
    type-feature
    interpreter-core
    on Oct 23, 2025
  2. sergey-miryanov commented on Oct 25, 2025

    @sergey-miryanov
    ContributorAuthor

    Closing this.

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-coretype-feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions