[Python-Dev] RFC: PEP 454: Add a new tracemalloc module (original) (raw)
Alexander Belopolsky alexander.belopolsky at gmail.com
Thu Sep 5 02:46:21 CEST 2013
- Previous message: [Python-Dev] RFC: PEP 454: Add a new tracemalloc module
- Next message: [Python-Dev] RFC: PEP 454: Add a new tracemalloc module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Sep 3, 2013 at 7:27 PM, Victor Stinner <victor.stinner at gmail.com>wrote:
API ===
To trace the most Python memory allocations, the module should be enabled as early as possible in your application by calling
tracemalloc.enable()
function, by setting thePYTHONTRACEMALLOC
environment variable to1
, or by using-X tracemalloc
command line option.Functions ---------
enable()
function: Start tracing Python memory allocations.disable()
function: Stop tracing Python memory allocations and stop the timer started bystarttimer()
.isenabled()
function: Get the status of the module:True
if it is enabled,False
otherwise.
Please mention that this API is similar to that of faulthandler and add a link to faulthandler docs. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130904/311e3a96/attachment.html>
- Previous message: [Python-Dev] RFC: PEP 454: Add a new tracemalloc module
- Next message: [Python-Dev] RFC: PEP 454: Add a new tracemalloc module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]