Skip to content

Instantly share code, notes, and snippets.

@webgago
Created May 2, 2017 21:05
Show Gist options
  • Save webgago/dc71490c2b170bf736e9f3077a2614f8 to your computer and use it in GitHub Desktop.
Save webgago/dc71490c2b170bf736e9f3077a2614f8 to your computer and use it in GitHub Desktop.
RubyProf.start
result = RubyProf.stop
printer = RubyProf::GraphHtmlPrinter.new(result)
File.open(Rails.root.join('tmp/profile_refactoring.html'), 'w+') { |f| printer.print(f, :min_percent => 2) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment