ruby memory visualizer

| | Comments (3)

I never ever (hardly ever) do graphics, much less GUI apps. So when I do, it is always a chore. But for fun I just whipped up a simple memory visualizer for ruby in less than 100 lines:

ruby memory visualizer [movie]

(key: String = gray, Array = green, Numeric = black (no fixnums), Class = purple, Hash = blue, everything else = red)

This has zero actual value to finding things out, so I will probably not release it.

3 Comments

You tease!

Can I see that in 3D?

I love things like this. I would be very interested to see how you get the object/memory distribution information.

Are you doing this from inside a Ruby program or via a C extension?

If C, could it be RubyInlined and provide running memory snapshots?

Geoff could probably hook it up to Gruff Graphs too!

This one uses ObjectSpace.each_object to build the movie. I have a more advanced visualizer that uses RubyInline and a hack to the GC to get a more detailed view of the heaps.

Leave a comment

About this Entry

This page contains a single entry by zenspider published on August 29, 2006 2:52 AM.

as seen on IRC was the previous entry in this blog.

RubyInline Myths is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.32-en