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

[3.9] bpo-40630: Add tracemalloc.reset_peak (GH-20102) #20545

Merged
merged 2 commits into from
Jun 1, 2020

Conversation

huonw
Copy link
Contributor

@huonw huonw commented May 31, 2020

This is a backporting cherrypick of GH-20102 (8b62644 specifically) per #20102 (comment).

The reset_peak function sets the peak memory size to the current size,
representing a resetting of that metric. This allows for recording the
peak of specific sections of code, ignoring other code that may have
had a higher peak (since the most recent tracemalloc.start() or
tracemalloc.clear_traces() call).

https://bugs.python.org/issue40630

huonw added 2 commits May 31, 2020 09:43
…2644)

The reset_peak function sets the peak memory size to the current size,
representing a resetting of that metric. This allows for recording the
peak of specific sections of code, ignoring other code that may have
had a higher peak (since the most recent `tracemalloc.start()` or
tracemalloc.clear_traces()` call).
@huonw
Copy link
Contributor Author

huonw commented May 31, 2020

Hi @vstinner, this PR backports #20102 to the 3.9 branch (and #20546 (hopefully) updates the master documentation correctly). I'd appreciate if you could help me with the right process here. 😄

@vstinner
Copy link
Member

vstinner commented Jun 1, 2020

Thanks, merged.

@huonw huonw deleted the issue40630-tracemalloc-reset-peak-3.9 branch June 1, 2020 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants