Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracemalloc: allow resetting peak memory metric without touching other traces #84810

Closed
huonw mannequin opened this issue May 15, 2020 · 6 comments
Closed

tracemalloc: allow resetting peak memory metric without touching other traces #84810

huonw mannequin opened this issue May 15, 2020 · 6 comments
Labels
3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@huonw
Copy link
Mannequin

huonw mannequin commented May 15, 2020

BPO 40630
Nosy @vstinner, @huonw
PRs
  • bpo-40630: add tracemalloc.reset_peak #20102
  • [3.9] bpo-40630: Add tracemalloc.reset_peak (GH-20102) #20545
  • bpo-40630: adjust tracemalloc.reset_peak docs for backport to 3.9 #20546
  • 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 2020-05-22.14:20:06.099>
    created_at = <Date 2020-05-15.02:12:35.989>
    labels = ['type-feature', 'library', '3.9']
    title = 'tracemalloc: allow resetting peak memory metric without touching other traces'
    updated_at = <Date 2020-06-01.17:27:29.441>
    user = 'https://github.com/huonw'

    bugs.python.org fields:

    activity = <Date 2020-06-01.17:27:29.441>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-05-22.14:20:06.099>
    closer = 'vstinner'
    components = ['Library (Lib)']
    creation = <Date 2020-05-15.02:12:35.989>
    creator = 'huonw'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40630
    keywords = ['patch']
    message_count = 6.0
    messages = ['368916', '369604', '369605', '370566', '370567', '370568']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'huonw']
    pr_nums = ['20102', '20545', '20546']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue40630'
    versions = ['Python 3.9']

    @huonw
    Copy link
    Mannequin Author

    huonw mannequin commented May 15, 2020

    Per https://mail.python.org/archives/list/python-ideas@python.org/thread/QDWI37A4TJXOYUKULGPY2GKD7IG2JNDC/ , it would be helpful to have a function that resets the peak memory usage of the tracemalloc module, without changing all the traces.

    This allows for recording the peak memory usage of a specific region of code, rather than only the peak since the last tracemalloc.start() or tracemalloc.clear_traces() call.

    @huonw huonw mannequin added 3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels May 15, 2020
    @vstinner
    Copy link
    Member

    New changeset 8b62644 by Huon Wilson in branch 'master':
    bpo-40630: Add tracemalloc.reset_peak (GH-20102)
    8b62644

    @vstinner
    Copy link
    Member

    Thanks Huon Wilson!

    @vstinner vstinner added 3.10 only security fixes and removed 3.9 only security fixes labels May 22, 2020
    @vstinner vstinner added 3.10 only security fixes and removed 3.9 only security fixes labels May 22, 2020
    @vstinner
    Copy link
    Member

    vstinner commented Jun 1, 2020

    New changeset 3c7609a by Huon Wilson in branch '3.9':
    [3.9] bpo-40630: Add tracemalloc.reset_peak (GH-20102) (GH-20545)
    3c7609a

    @vstinner
    Copy link
    Member

    vstinner commented Jun 1, 2020

    New changeset 39de8e4 by Huon Wilson in branch 'master':
    bpo-40630: adjust tracemalloc.reset_peak docs for backport to 3.9 (GH-20546)
    39de8e4

    @vstinner
    Copy link
    Member

    vstinner commented Jun 1, 2020

    Feature added to Python 3.9. Lukasz allowed to add the feature to Python 3.9 beta2:
    #20102 (comment)

    @vstinner vstinner added 3.9 only security fixes and removed 3.10 only security fixes labels Jun 1, 2020
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant