]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.9] bpo-40630: Add tracemalloc.reset_peak (GH-20102) (GH-20545)
authorHuon Wilson <wilson.huon@gmail.com>
Mon, 1 Jun 2020 17:26:22 +0000 (03:26 +1000)
committerGitHub <noreply@github.com>
Mon, 1 Jun 2020 17:26:22 +0000 (19:26 +0200)
commit3c7609a23cf6e011f2cd411e28d9dcb1b087929c
tree57e4c7324a9b926594a71db7a53830ba070eab2d
parent410b730c205133315c604350f4bdc2345588b397
[3.9] bpo-40630: Add tracemalloc.reset_peak (GH-20102) (GH-20545)

* bpo-40630: Add tracemalloc.reset_peak (GH-20102, cherrypick 8b62644)

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).

* Adjust docs to point to 3.9
Doc/library/tracemalloc.rst
Doc/whatsnew/3.9.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