Skip to content

Instantly share code, notes, and snippets.

@seancaffery
Created February 26, 2014 04:51
Show Gist options
  • Save seancaffery/9223748 to your computer and use it in GitHub Desktop.
Save seancaffery/9223748 to your computer and use it in GitHub Desktop.
ruby prof set up
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