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:
Diffstat (limited to 'lib/gitlab/cache/helpers.rb')
-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)