Introduce support for memory usage profiles

This commit is contained in:
Lourens Naudé
2015-05-05 23:00:28 -04:00
parent 76c24db039
commit 5a48edae6a
3 changed files with 28 additions and 0 deletions
+13
View File
@@ -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