mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
15 lines
444 B
Ruby
15 lines
444 B
Ruby
require 'rubygems'
|
|
require 'active_support'
|
|
require 'action_view'
|
|
|
|
require File.dirname(__FILE__) + '/../lib/haml/template'
|
|
|
|
ActionView::Base.register_template_handler("haml", Haml::Template)
|
|
@base = ActionView::Base.new(File.dirname(__FILE__))
|
|
|
|
RUNS = (ARGV[0] || 100).to_i
|
|
|
|
Benchmark.bm do |b|
|
|
b.report("haml: ") { RUNS.times { @base.render "templates/standard" } }
|
|
b.report("erb: ") { RUNS.times { @base.render "rhtml/standard" } }
|
|
end
|