Dear All,

I've spent the last 2 days by trying to find a working memory profiling
solution for either 1.9.x or 2.0 that can show the memory usage by
methods. Similar to the process time output.

As I read, ruby-prof needs a patched MRI to do memory profiling. But
I couldn't set it up like this:

rvm install 1.9.3-p125 --patch gcdata --name gcdata
gem-ruby-1.9.3-p125-gcdata install ruby-prof

require "ruby-prof"

RubyProf.measure_mode = RubyProf::MEMORY
RubyProf.start
        # code to profile
        10000.times { "hello".chars.to_a.shuffle.join }
r = RubyProf.stop
RubyProf::FlatPrinter.new(r).print

I've read that 1.9.2 and above there's a bug in ruby-prof that keeps it
from doing a memory or allocation profiling. Can't come up with the link
though.

I've checked memprof, but it's still 1.8.x only.

Tested memory-profiler gem too, but it doesn't give a good output:
https://github.com/phluid61/memory-profiler-gem

Could you be kind to direct me to a working solution?


Thanks.

-- 
Posted via http://www.ruby-forum.com/.