Skip to content

Instantly share code, notes, and snippets.

@kyletolle
Created April 2, 2014 17:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyletolle/9939366 to your computer and use it in GitHub Desktop.
Save kyletolle/9939366 to your computer and use it in GitHub Desktop.
RubyProf outline
RubyProf.start
# Code to profile...
result = RubyProf.stop
# Print a graph to an HTML file, sorted by time spend in children.
File.open('profile_output.html', 'w') do |file|
printer = RubyProf::GraphHtmlPrinter.new result
printer.print(file, sort_method: :children_time)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment