]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40630: Add tracemalloc.reset_peak (GH-20102)
authorHuon Wilson <wilson.huon@gmail.com>
Fri, 22 May 2020 14:18:51 +0000 (00:18 +1000)
committerGitHub <noreply@github.com>
Fri, 22 May 2020 14:18:51 +0000 (16:18 +0200)
commit8b62644831443e400215eeb822c921f4f06c8977
tree82fe45a062677d792c2868ad72ecf75539c71c37
parentbfaf5275ad9c0e8fa3935e6d651628c50e3c5c2d
bpo-40630: Add tracemalloc.reset_peak (GH-20102)

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).
Doc/library/tracemalloc.rst
Doc/whatsnew/3.10.rst
Lib/test/test_tracemalloc.py
Misc/ACKS
Misc/NEWS.d/next/Library/2020-05-15-13-40-15.bpo-40630.YXEX_M.rst [new file with mode: 0644]
Modules/_tracemalloc.c
Modules/clinic/_tracemalloc.c.h