From d0356412dfc91d02585f0a177c65677dbe2944a3 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sat, 1 Feb 2020 03:09:04 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- lib/gitlab/diff/highlight_cache.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/gitlab/diff') 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 -- cgit v1.2.1