Skip to content
Snippets Groups Projects
Commit f915b5e0 authored by Yorick Peterse's avatar Yorick Peterse
Browse files

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
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
---
title: Remove method instrumentation for Banzai filters and reference parsers
merge_request: 20770
author:
type: performance
Loading
Loading
@@ -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)
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment