Skip to content

Instantly share code, notes, and snippets.

@Phazz
Created January 8, 2014 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Phazz/8314399 to your computer and use it in GitHub Desktop.
Save Phazz/8314399 to your computer and use it in GitHub Desktop.
Poor's man memory profiler
# call this to get the memory size of the process before and after a treatment
def memstats
size = `ps -o size= #{$$}`.strip.to_i
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment