Commit 54c0c0cd authored by Sean McGivern's avatar Sean McGivern

Instrument MergeRequestDiff#load_commits

This instrumentation isn't needed strictly for performance measurements, but
just to see which controller actions call this method at all. See
<https://gitlab.com/gitlab-org/gitlab-ce/issues/30224#note_32306159> for more
details.
parent fbfddd99
---
title: Instrument MergeRequestDiff#load_commits
merge_request:
author:
...@@ -113,6 +113,9 @@ def instrument_classes(instrumentation) ...@@ -113,6 +113,9 @@ def instrument_classes(instrumentation)
# This is a Rails scope so we have to instrument it manually. # This is a Rails scope so we have to instrument it manually.
instrumentation.instrument_method(Project, :visible_to_user) instrumentation.instrument_method(Project, :visible_to_user)
# Needed for https://gitlab.com/gitlab-org/gitlab-ce/issues/30224#note_32306159
instrumentation.instrument_instance_method(MergeRequestDiff, :load_commits)
end end
# rubocop:enable Metrics/AbcSize # rubocop:enable Metrics/AbcSize
......
...@@ -7,6 +7,7 @@ describe 'instrument_classes', lib: true do ...@@ -7,6 +7,7 @@ describe 'instrument_classes', lib: true do
before do before do
allow(config).to receive(:instrument_method) allow(config).to receive(:instrument_method)
allow(config).to receive(:instrument_methods) allow(config).to receive(:instrument_methods)
allow(config).to receive(:instrument_instance_method)
allow(config).to receive(:instrument_instance_methods) allow(config).to receive(:instrument_instance_methods)
end end
......
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