summaryrefslogtreecommitdiff
path: root/lib/gitlab/diff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-01 03:09:04 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-01 03:09:04 +0000
commitd0356412dfc91d02585f0a177c65677dbe2944a3 (patch)
tree5a2ac806b6ea6113475bb2a759f6b15c186fb482 /lib/gitlab/diff
parent72817fd7c07d1b812623f8d5e27fc7bcecb4eed5 (diff)
downloadgitlab-ce-d0356412dfc91d02585f0a177c65677dbe2944a3.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/diff')
-rw-r--r--lib/gitlab/diff/highlight_cache.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/diff/highlight_cache.rb b/lib/gitlab/diff/highlight_cache.rb
index a3d88664bac..0a8fbb9a673 100644
--- a/lib/gitlab/diff/highlight_cache.rb
+++ b/lib/gitlab/diff/highlight_cache.rb
@@ -3,6 +3,7 @@
module Gitlab
module Diff
class HighlightCache
+ include Gitlab::Metrics::Methods
include Gitlab::Utils::StrongMemoize
EXPIRATION = 1.week
@@ -11,6 +12,11 @@ module Gitlab
delegate :diffable, to: :@diff_collection
delegate :diff_options, to: :@diff_collection
+ define_histogram :gitlab_redis_diff_caching_memory_usage_bytes do
+ docstring 'Redis diff caching memory usage by key'
+ buckets [100, 1000, 10000, 100000, 1000000, 10000000]
+ end
+
def initialize(diff_collection)
@diff_collection = diff_collection
end