Skip to content
Snippets Groups Projects
Commit e9918b1a authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Merge branch 'sh-disable-redis-peek' into 'master'

Only track Redis calls if Peek is enabled

See merge request gitlab-org/gitlab-ce!31438
parents f3e2d048 a43c84e6
No related branches found
No related tags found
No related merge requests found
---
title: Only track Redis calls if Peek is enabled
merge_request: 31438
author:
type: performance
Loading
Loading
@@ -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
 
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment