Skip to content

Instantly share code, notes, and snippets.

@callumj
Created February 24, 2012 03:06
Show Gist options
  • Select an option

  • Save callumj/1896926 to your computer and use it in GitHub Desktop.

Select an option

Save callumj/1896926 to your computer and use it in GitHub Desktop.
Benchmark HAML templates
-RubyProf.start
### SO MUCH HAML CODE ###
-result = RubyProf.stop
-printer = RubyProf::GraphHtmlPrinter.new(result)
-File.open "#{Rails.root}/tmp/view-#{Random.rand(11)}-#{Time.now.to_i}.html", 'w' do |file|
-printer.print(file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment