Created
October 15, 2015 17:15
-
-
Save lukeasrodgers/1f63c3beb878007540af to your computer and use it in GitHub Desktop.
quick ruby profiling
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
# Gemfile | |
gem 'ruby-prof' | |
# code to profile | |
require 'ruby-prof' | |
RubyProf.start | |
# run code | |
result = RubyProf.stop | |
printer = RubyProf::CallStackPrinter.new(result) | |
f = File.open('/somehwere/public/prof.html', 'w+') | |
printer.print(f) | |
f.close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment