mirror of
https://github.com/kemko/liquid.git
synced 2026-01-05 17:55:40 +03:00
22 lines
487 B
Ruby
22 lines
487 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Liquid
|
|
module BlockBodyProfilingHook
|
|
def render_node(context, output, node)
|
|
Profiler.profile_node_render(node) do
|
|
super
|
|
end
|
|
end
|
|
end
|
|
BlockBody.prepend(BlockBodyProfilingHook)
|
|
|
|
module IncludeProfilingHook
|
|
def render_to_output_buffer(context, output)
|
|
Profiler.profile_children(context.evaluate(@template_name_expr).to_s) do
|
|
super
|
|
end
|
|
end
|
|
end
|
|
Include.prepend(IncludeProfilingHook)
|
|
end
|