# File lib/liquid/profiler.rb, line 47 def initialize(token, partial) @code = token.respond_to?(:raw) ? token.raw : token @partial = partial @line_number = token.respond_to?(:line_number) ? token.line_number : nil @children = [] end
# File lib/liquid/profiler.rb, line 54 def self.start(token, partial) new(token, partial).tap do |t| t.start end end
# File lib/liquid/profiler.rb, line 64 def finish @end_time = Time.now end
# File lib/liquid/profiler.rb, line 68 def render_time @end_time - @start_time end
# File lib/liquid/profiler.rb, line 60 def start @start_time = Time.now end