Created
February 26, 2014 04:51
-
-
Save seancaffery/9223748 to your computer and use it in GitHub Desktop.
ruby prof set up
This file contains 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
require 'ruby-prof' | |
RubyProf.measure_mode = RubyProf::WALL_TIME | |
RubyProf.start | |
# DO SOME WORK | |
results = RubyProf.stop | |
profile_location = 'tmp/zomg_profile.html' | |
File.open profile_location, 'w' do |file| | |
RubyProf::GraphHtmlPrinter.new(results).print(file) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment