1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00
haml--haml/test/benchmark.rb
hcatlin 26360e28d3 Benchmark stuff.
git-svn-id: svn://hamptoncatlin.com/haml/trunk@24 7063305b-7217-0410-af8c-cdc13e5119b9
2006-08-21 03:33:30 +00:00

17 lines
504 B
Ruby

require File.dirname(__FILE__) + '/../lib/haml/engine'
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
require 'rubygems'
require 'action_view'
include HAMLHelpers
#require 'benchmark'
ActionView::Base.register_template_handler("haml", HAML::Engine)
@base = ActionView::Base.new(File.dirname(__FILE__))
RUNS = 2
Benchmark.bm do |x|
x.report("haml: ") { RUNS.times { @base.render("templates/standard"); } }
x.report("rhtml:") { RUNS.times { @base.render( "rhtml/standard"); } }
end