Introduce new benchmarking methods to liquid to use on rubybench

This commit is contained in:
Jerry Liu
2017-01-27 10:56:16 -05:00
parent 0c58328a40
commit a93eac0268
2 changed files with 76 additions and 28 deletions
+3 -2
View File
@@ -5,7 +5,7 @@ Liquid::Template.error_mode = ARGV.first.to_sym if ARGV.first
profiler = ThemeRunner.new
Benchmark.ips do |x|
x.time = 60
x.time = 10
x.warmup = 5
puts
@@ -13,5 +13,6 @@ Benchmark.ips do |x|
puts
x.report("parse:") { profiler.compile }
x.report("parse & run:") { profiler.run }
x.report("render:") { profiler.render }
x.report("parse & render:") { profiler.run }
end