Commit f915b5e0 authored by Yorick Peterse's avatar Yorick Peterse

Merge branch 'sh-remove-banzai-instrumentation' into 'master'

Remove method instrumentation for Banzai filters and reference parsers

See merge request gitlab-org/gitlab-ce!20770
parents 2411ecb5 4d376c66
---
title: Remove method instrumentation for Banzai filters and reference parsers
merge_request: 20770
author:
type: performance
......@@ -58,20 +58,6 @@ def instrument_classes(instrumentation)
instrumentation.instrument_instance_methods(const)
end
# Instruments all Banzai filters and reference parsers
{
Filter: Rails.root.join('lib', 'banzai', 'filter', '*.rb'),
ReferenceParser: Rails.root.join('lib', 'banzai', 'reference_parser', '*.rb')
}.each do |const_name, path|
Dir[path].each do |file|
klass = File.basename(file, File.extname(file)).camelize
const = Banzai.const_get(const_name).const_get(klass)
instrumentation.instrument_methods(const)
instrumentation.instrument_instance_methods(const)
end
end
instrumentation.instrument_methods(Banzai::Renderer)
instrumentation.instrument_methods(Banzai::Querying)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment