Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > memory profiler?

Reply
Thread Tools

memory profiler?

 
 
John Reese
Guest
Posts: n/a
 
      04-21-2005
Good afternoon, ha ha ha!

Is there a memory or heap profiler for python programs? So that, for
example, if a program was bloating over time I could see how many of
each object there were and maybe even where the references were?
 
Reply With Quote
 
 
 
 
Peter Hansen
Guest
Posts: n/a
 
      04-21-2005
John Reese wrote:
> Is there a memory or heap profiler for python programs? So that, for
> example, if a program was bloating over time I could see how many of
> each object there were and maybe even where the references were?


The "gc" module has a variety of helpful features
like that.

-Peter
 
Reply With Quote
 
 
 
 
Diez B. Roggisch
Guest
Posts: n/a
 
      04-21-2005
Peter Hansen wrote:

> John Reese wrote:
>> Is there a memory or heap profiler for python programs? So that, for
>> example, if a program was bloating over time I could see how many of
>> each object there were and maybe even where the references were?

>
> The "gc" module has a variety of helpful features
> like that.


I created a qt-based memory analyzer on top of the gc module. I plan to
release it soon - it has been helpful to me for a few projects. Its a
client-server application that collects data through an in-process running
thread that delivers object histograms. The client fetches these and allows
to display the development of objects based various criteria over the time.
It can also record these data for offline-analysis. So far the in-proccess
threads communicate their histograms either by pyro or xmlrpc servers.

Unfortunately debugging ZOPE with the xmlrpc server lead to a mem-leak
itself - so currently I'm no confident enough to release it.
--
Regards,

Diez B. Roggisch
 
Reply With Quote
 
John Reese
Guest
Posts: n/a
 
      04-23-2005
On Wed, 20 Apr 2005 23:06:51 -0400, Peter Hansen <(E-Mail Removed)> wrote:
> John Reese wrote:
>> Is there a memory or heap profiler for python programs? So that, for
>> example, if a program was bloating over time I could see how many of
>> each object there were and maybe even where the references were?

>
> The "gc" module has a variety of helpful features
> like that.
>
> -Peter


In particular, get_objects() and get_referrers(). Good point.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Patriot Memory PDC1G5600ELK Memory Review Silverstrand Front Page News 0 09-07-2005 02:24 AM
Differences between Sony Memory Stick & memory Stick Pro vs Memory Stick Duo? zxcvar Digital Photography 3 11-28-2004 10:48 PM
RAM Memory or virual memory Julián Sanz García ASP .Net 4 11-12-2004 06:25 PM
GC does not release memory...memory keeps growing!!! Mahesh Prasad ASP .Net 1 02-22-2004 08:40 AM
AspNet Process Memory Issue on Win2k Server - Peformance is fine - Memory usuage doesn't stop growing Cy Huckaba ASP .Net 1 06-26-2003 04:00 AM



Advertisments