Created
November 14, 2011 10:04
-
-
Save josevalim/1363651 to your computer and use it in GitHub Desktop.
Ruby-Prof
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
source :rubygems | |
gem "ruby-prof" |
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 "rubygems" | |
require "bundler/setup" | |
require "ruby-prof" | |
RubyProf.start | |
# Code to profile | |
result = RubyProf.stop | |
printer = RubyProf::CallStackPrinter.new(result) | |
printer.print(Rails.root.join("tmp/profiler_#{Time.now.to_f}.html", "w")) | |
puts :DONE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment