class Liquid::Profiler::Timing
Attributes
children[R]
code[R]
line_number[R]
partial[R]
Public Class Methods
new(token, partial)
click to toggle source
# 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
start(token, partial)
click to toggle source
# File lib/liquid/profiler.rb, line 54 def self.start(token, partial) new(token, partial).tap do |t| t.start end end
Public Instance Methods
finish()
click to toggle source
# File lib/liquid/profiler.rb, line 64 def finish @end_time = Time.now end
render_time()
click to toggle source
# File lib/liquid/profiler.rb, line 68 def render_time @end_time - @start_time end
start()
click to toggle source
# File lib/liquid/profiler.rb, line 60 def start @start_time = Time.now end