Skip to content

Instantly share code, notes, and snippets.

@sonalkr132
Created August 26, 2016 17:31
Show Gist options
  • Save sonalkr132/8f5b9210d8337408ca7c82bae0f4e44f to your computer and use it in GitHub Desktop.
Save sonalkr132/8f5b9210d8337408ca7c82bae0f4e44f to your computer and use it in GitHub Desktop.
RubyProf.start
# code to profile
result = RubyProf.stop
printer = RubyProf::CallStackPrinter.new(result)
# to save results to tmp/profile_data.html
File.open("/home/addie/some/profile_data.html", 'w') { |file| printer.print(file) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment