mirror of
https://github.com/kemko/liquid.git
synced 2026-01-04 09:15:41 +03:00
context parsing was handrolled and pretty ad-hoc this branch exists to explore parsing the context through a defined fsm as produced by Ragel
18 lines
482 B
Ruby
18 lines
482 B
Ruby
require 'rubygems'
|
|
require 'ruby-prof' rescue fail("install ruby-prof extension/gem")
|
|
require File.dirname(__FILE__) + '/theme_runner'
|
|
|
|
profiler = ThemeRunner.new
|
|
|
|
puts 'Running profiler...'
|
|
|
|
results = profiler.run_profile
|
|
|
|
puts 'Success'
|
|
|
|
filename = (ENV['TMP'] || '/tmp') + "/callgrind.liquid.txt"
|
|
File.open(filename, "w+") do |fp|
|
|
RubyProf::CallTreePrinter.new(results).print(fp, :print_file => true)
|
|
end
|
|
$stderr.puts "wrote RubyProf::CallTreePrinter output to #{filename}"
|