summaryrefslogtreecommitdiff
path: root/doc/development/query_recorder.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-20 12:11:29 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-20 12:11:29 +0000
commit7b384a1f3d2608898318e67d11eea2914889ae81 (patch)
treeaf33e77d13b18a96156c69616cb09a3a4f7697c6 /doc/development/query_recorder.md
parentd46287cc16ba244720c6d5c00491944336972988 (diff)
downloadgitlab-ce-7b384a1f3d2608898318e67d11eea2914889ae81.tar.gz
Add latest changes from gitlab-org/gitlab@12-3-stable
Diffstat (limited to 'doc/development/query_recorder.md')
-rw-r--r--doc/development/query_recorder.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/development/query_recorder.md b/doc/development/query_recorder.md
index 81970b45bbd..3ed75c87f6f 100644
--- a/doc/development/query_recorder.md
+++ b/doc/development/query_recorder.md
@@ -2,7 +2,7 @@
QueryRecorder is a tool for detecting the [N+1 queries problem](https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations) from tests.
-> Implemented in [spec/support/query_recorder.rb](https://gitlab.com/gitlab-org/gitlab/blob/master/spec/support/helpers/query_recorder.rb) via [9c623e3e](https://gitlab.com/gitlab-org/gitlab-foss/commit/9c623e3e5d7434f2e30f7c389d13e5af4ede770a)
+> Implemented in [spec/support/query_recorder.rb](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/spec/support/helpers/query_recorder.rb) via [9c623e3e](https://gitlab.com/gitlab-org/gitlab-foss/commit/9c623e3e5d7434f2e30f7c389d13e5af4ede770a)
As a rule, merge requests [should not increase query counts](merge_request_performance_guidelines.md#query-counts). If you find yourself adding something like `.includes(:author, :assignee)` to avoid having `N+1` queries, consider using QueryRecorder to enforce this with a test. Without this, a new feature which causes an additional model to be accessed will silently reintroduce the problem.