Fix template name in profile result for render tag timing objects

This commit is contained in:
Dylan Thacker-Smith
2020-12-09 10:01:16 -05:00
parent f18084203d
commit 900e3a6491
3 changed files with 25 additions and 48 deletions
+1 -10
View File
@@ -3,19 +3,10 @@
module Liquid
module BlockBodyProfilingHook
def render_node(context, output, node)
Profiler.profile_node_render(node) do
Profiler.profile_node_render(node, context.template_name) 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