Benchmark marshal load and render against parse and render.

This commit is contained in:
Dylan Thacker-Smith
2014-09-12 09:46:30 -04:00
parent 478eb893a9
commit d7234cb346
3 changed files with 53 additions and 42 deletions
+2 -2
View File
@@ -3,13 +3,13 @@ require File.dirname(__FILE__) + '/theme_runner'
Liquid::Template.error_mode = ARGV.first.to_sym if ARGV.first
profiler = ThemeRunner.new
profiler.run
profiler.parse_and_render
[:cpu, :object].each do |profile_type|
puts "Profiling in #{profile_type.to_s} mode..."
results = StackProf.run(mode: profile_type) do
100.times do
profiler.run
profiler.parse_and_render
end
end
StackProf::Report.new(results).print_text(false, 20)