…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).
|
Thanks, merged. |
This is a backporting cherrypick of GH-20102 (8b62644 specifically) per #20102 (comment).
The
reset_peakfunction 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()ortracemalloc.clear_traces()call).https://bugs.python.org/issue40630