Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Tang <dtang@gitlab.com>2018-06-21 11:48:25 +0300
committerDennis Tang <dtang@gitlab.com>2018-06-21 11:48:25 +0300
commit0e7f8fd5bd7ed184b8a12039739200065ffa2dbd (patch)
tree07b3c3bbcc0d05848ab7034d2ed32a801f8786b9 /doc/development/query_recorder.md
parent203d1026008effeeba5c1f98dba768448473f9fe (diff)
parent904cbe0132a1caf0dbb7efb8bdc70398d1d82289 (diff)
Merge remote-tracking branch 'origin/master' into 43446-new-cluster-page-tabs
Diffstat (limited to 'doc/development/query_recorder.md')
-rw-r--r--doc/development/query_recorder.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/development/query_recorder.md b/doc/development/query_recorder.md
index 61e5e1afede..2167ed57428 100644
--- a/doc/development/query_recorder.md
+++ b/doc/development/query_recorder.md
@@ -28,6 +28,7 @@ By default, QueryRecorder will ignore cached queries in the count. However, it m
all queries to avoid introducing an N+1 query that may be masked by the statement cache. To do this,
pass the `skip_cached` variable to `QueryRecorder` and use the `exceed_all_query_limit` matcher:
+```
it "avoids N+1 database queries" do
control_count = ActiveRecord::QueryRecorder.new(skip_cached: false) { visit_some_page }.count
create_list(:issue, 5)