mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 03:10:39 -07:00
Add profile:strict rake task.
This commit is contained in:
@@ -64,9 +64,9 @@ namespace :profile do
|
|||||||
ruby "./performance/profile.rb"
|
ruby "./performance/profile.rb"
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Run KCacheGrind"
|
desc "Run the liquid profile/performance coverage with strict parsing"
|
||||||
task :grind => :run do
|
task :strict do
|
||||||
system "qcachegrind /tmp/liquid.rubyprof_calltreeprinter.txt"
|
ruby "./performance/profile.rb strict"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
require 'stackprof' rescue fail("install stackprof extension/gem")
|
require 'stackprof' rescue fail("install stackprof extension/gem")
|
||||||
require File.dirname(__FILE__) + '/theme_runner'
|
require File.dirname(__FILE__) + '/theme_runner'
|
||||||
|
|
||||||
|
Liquid::Template.error_mode = ARGV.first.to_sym if ARGV.first
|
||||||
profiler = ThemeRunner.new
|
profiler = ThemeRunner.new
|
||||||
profiler.run
|
profiler.run
|
||||||
results = StackProf.run(mode: :cpu) do
|
results = StackProf.run(mode: :cpu) do
|
||||||
|
|||||||
Reference in New Issue
Block a user