Created
April 2, 2014 17:51
-
-
Save kyletolle/9939366 to your computer and use it in GitHub Desktop.
RubyProf outline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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