diff options
Diffstat (limited to 'lib/peek')
-rw-r--r-- | lib/peek/views/active_record.rb | 2 | ||||
-rw-r--r-- | lib/peek/views/redis_detailed.rb | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/peek/views/active_record.rb b/lib/peek/views/active_record.rb index a35783c1971..bbc9f11e90f 100644 --- a/lib/peek/views/active_record.rb +++ b/lib/peek/views/active_record.rb @@ -27,7 +27,7 @@ module Peek super subscribe('sql.active_record') do |_, start, finish, _, data| - if Gitlab::SafeRequestStore.store[:peek_enabled] + if Gitlab::PerformanceBar.enabled_for_request? unless data[:cached] detail_store << { duration: finish - start, diff --git a/lib/peek/views/redis_detailed.rb b/lib/peek/views/redis_detailed.rb index f36f581d5e9..84041b6be73 100644 --- a/lib/peek/views/redis_detailed.rb +++ b/lib/peek/views/redis_detailed.rb @@ -16,7 +16,7 @@ module Gitlab private def add_call_details(duration, args) - return unless peek_enabled? + return unless Gitlab::PerformanceBar.enabled_for_request? # redis-rb passes an array (e.g. [:get, key]) return unless args.length == 1 @@ -27,10 +27,6 @@ module Gitlab } end - def peek_enabled? - Gitlab::SafeRequestStore.store[:peek_enabled] - end - def detail_store ::Gitlab::SafeRequestStore['redis_call_details'] ||= [] end |