summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-29 03:07:49 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-29 03:07:49 +0000
commitc201d59a4f031bb198e9541c57b4fd026388f5be (patch)
treee72ebd433756b4d0f3668f8234f4525e07b04f63 /lib
parent0914eb1a9ca655784302e3a21635d58c7e7af7c2 (diff)
downloadgitlab-ce-c201d59a4f031bb198e9541c57b4fd026388f5be.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/cache/helpers.rb13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/gitlab/cache/helpers.rb b/lib/gitlab/cache/helpers.rb
index 48b6ca59367..024fa48c066 100644
--- a/lib/gitlab/cache/helpers.rb
+++ b/lib/gitlab/cache/helpers.rb
@@ -126,7 +126,6 @@ module Gitlab
end
def increment_cache_metric(render_type:, total_count:, miss_count:)
- return unless Feature.enabled?(:add_timing_to_certain_cache_actions)
return unless caller_id
metric_name = :cached_object_operations_total
@@ -146,17 +145,13 @@ module Gitlab
end
def time_action(render_type:, &block)
- if Feature.enabled?(:add_timing_to_certain_cache_actions)
- real_start = Gitlab::Metrics::System.monotonic_time
+ real_start = Gitlab::Metrics::System.monotonic_time
- presented_object = yield
+ presented_object = yield
- real_duration_histogram(render_type).observe({}, Gitlab::Metrics::System.monotonic_time - real_start)
+ real_duration_histogram(render_type).observe({}, Gitlab::Metrics::System.monotonic_time - real_start)
- presented_object
- else
- yield
- end
+ presented_object
end
def real_duration_histogram(render_type)