How to use Memory Profiler



I’m looking to do some profiling of my app using the MemoryProfiler
class at
which I know is a popular choice for this kind of thing.

I’m having a bit of a blank moment in getting this working. The blog
post says to just load the code and then run MemoryProfiler.start, but
I’m not sure of how to actually load the code, should it be in /lib or
somewhere like that, or do I explicitly need to load it using irb? The
comments on the blog post say that MemoryProfiler.start should be
placed at the very bottom of environment.rb, is that correct?

Any help from anyone who’s used this script before will be