In that case, how about adding a client/server feature?
If you standardize the format, a minimal tracing client could write a log, or 
send it to a socket, in a way that can be turned into a snapshot by a 
corresponsing utility reading from a file or listenting to a socket.
Just a though.  Could be a future addition…

From: Python-Dev [mailto:python-dev-bounces+kristjan=ccpgames....@python.org] 
On Behalf Of Victor Stinner
Sent: 24. október 2013 16:45
To: python-dev
Subject: Re: [Python-Dev] Updated PEP 454 (tracemalloc): no more metrics!


> When I was looking for memory leaks in the regex module I simply wrote all of 
> the allocations, reallocations and deallocations to a log file and then 
> parsed it afterwards using a Python script. Simple, but effective.

He he, it's funny because you described exactly my first implementation of 
tracemalloc! I wrote output using fprintf() into a text file. The parser was 
written in Python but too slow to be used it in practice. When running on the 
slow set top box, it took minutes (5 maybe 10) to analyze the file. Transfering 
the file to a PC took also minutes: the file was very large (maybe 1 GB, I 
don't remember) and SimpleHTTPServer too slow for the transfer.

Victor
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to