Sass testing no longer interferes with Haml/ERB times.
git-svn-id: svn://hamptoncatlin.com/haml/trunk@220 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
parent
addce2f8d7
commit
0165623325
|
@ -37,13 +37,18 @@ module Haml
|
|||
times = Benchmark.bmbm do |b|
|
||||
b.report("haml:") { runs.times { @base.render haml_template } }
|
||||
b.report("erb:") { runs.times { @base.render rhtml_template } }
|
||||
b.report("sass:") { runs.times { Sass::Engine.new(File.read(sass_template)).render } }
|
||||
end
|
||||
|
||||
#puts times[0].inspect, times[1].inspect
|
||||
ratio = sprintf("%g", times[0].to_a[5] / times[1].to_a[5])
|
||||
puts "Haml/ERB: " + ratio
|
||||
|
||||
puts '', '-' * 50, 'Sass on its own', '-' * 50
|
||||
|
||||
Benchmark.bmbm do |b|
|
||||
b.report("sass:") { runs.times { Sass::Engine.new(File.read(sass_template)).render } }
|
||||
end
|
||||
|
||||
$stdout.pos = 0
|
||||
to_return = $stdout.read
|
||||
$stdout = old_stdout
|
||||
|
|
Loading…
Reference in New Issue