summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2018-07-10 15:59:00 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2018-07-10 15:59:30 +0200
commit81d8ddf8cad78097cfba503553f879eb76c2485f (patch)
tree3374580b2b35afab8adcaa3c258a4e99125c6d34
parentd01e5a04ccee4659fdab8f381a12201daa1c8cb5 (diff)
downloadgitlab-ce-tweak-sql-buckets.tar.gz
Add a 10 ms bucket for SQL timingstweak-sql-buckets
This allows us to calculate quantiles of SQL timings more accurately, instead of a lot of timings being assigned to the 50 ms bucket.
-rw-r--r--changelogs/unreleased/tweak-sql-buckets.yml5
-rw-r--r--lib/gitlab/metrics/subscribers/active_record.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/changelogs/unreleased/tweak-sql-buckets.yml b/changelogs/unreleased/tweak-sql-buckets.yml
new file mode 100644
index 00000000000..00a0f733ee1
--- /dev/null
+++ b/changelogs/unreleased/tweak-sql-buckets.yml
@@ -0,0 +1,5 @@
+---
+title: Add a 10 ms bucket for SQL timings
+merge_request:
+author:
+type: changed
diff --git a/lib/gitlab/metrics/subscribers/active_record.rb b/lib/gitlab/metrics/subscribers/active_record.rb
index 38f119cf06d..c205f348023 100644
--- a/lib/gitlab/metrics/subscribers/active_record.rb
+++ b/lib/gitlab/metrics/subscribers/active_record.rb
@@ -20,7 +20,7 @@ module Gitlab
define_histogram :gitlab_sql_duration_seconds do
docstring 'SQL time'
base_labels Transaction::BASE_LABELS
- buckets [0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0]
+ buckets [0.01, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0]
end
def current_transaction