Commit 60d6eb18 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents c1a5e5d8 e9918b1a
---
title: Only track Redis calls if Peek is enabled
merge_request: 31438
author:
type: performance
......@@ -16,6 +16,7 @@ module Gitlab
private
def add_call_details(duration, args)
return unless peek_enabled?
# redis-rb passes an array (e.g. [:get, key])
return unless args.length == 1
......@@ -26,6 +27,10 @@ module Gitlab
}
end
def peek_enabled?
Gitlab::SafeRequestStore.store[:peek_enabled]
end
def detail_store
::Gitlab::SafeRequestStore['redis_call_details'] ||= []
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment