class Liquid::Profiler::Timing
Attributes
Public Class Methods
Source
# File lib/liquid/profiler.rb, line 54 def initialize(code: nil, template_name: nil, line_number: nil) @code = code @template_name = template_name @line_number = line_number @children = [] end
Public Instance Methods
Source
# File lib/liquid/profiler.rb, line 61 def self_time @self_time ||= begin total_children_time = 0.0 @children.each do |child| total_children_time += child.total_time end @total_time - total_children_time end end