Skip to content

Instantly share code, notes, and snippets.

@revans
Created March 18, 2010 22:45
Show Gist options
  • Save revans/337008 to your computer and use it in GitHub Desktop.
Save revans/337008 to your computer and use it in GitHub Desktop.
# Profile
result = RubyProf.profile do
Twitter::API::User.show('revans')
end
# Print a graph profile to text
printer = RubyProf::GraphHtmlPrinter.new(result)
printer.print(File.open(File.join(File.dirname(__FILE__), 'benchmarks/marks.html'), 'w+'), :min_percent=>0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment