mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-18 18:30:40 -07:00
Introduce support for memory usage profiles
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
require 'allocation_tracer' rescue fail("install allocation_tracer extension/gem")
|
||||
require File.dirname(__FILE__) + '/theme_runner'
|
||||
|
||||
Liquid::Template.error_mode = ARGV.first.to_sym if ARGV.first
|
||||
profiler = ThemeRunner.new
|
||||
|
||||
require 'allocation_tracer/trace'
|
||||
|
||||
puts "Profiling memory usage..."
|
||||
|
||||
200.times do
|
||||
profiler.run
|
||||
end
|
||||
Reference in New Issue
Block a user