summaryrefslogtreecommitdiff
path: root/config/initializers/peek.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-06-07 19:55:07 +0200
committerRémy Coutable <remy@rymai.me>2017-06-09 17:21:39 +0200
commite85914532970d61d53f025f3ff0d85891bab2637 (patch)
treea54bac63e63570a31ff31d4cafffc31e1636a1a0 /config/initializers/peek.rb
parent55631e3d52dd2e16b69b02ffc99207b60a22989e (diff)
downloadgitlab-ce-e85914532970d61d53f025f3ff0d85891bab2637.tar.gz
Fix Rubocop offenses, improve SQL duration format and changelog entry
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'config/initializers/peek.rb')
-rw-r--r--config/initializers/peek.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/config/initializers/peek.rb b/config/initializers/peek.rb
index 429960b7c3e..c88ae4b62d2 100644
--- a/config/initializers/peek.rb
+++ b/config/initializers/peek.rb
@@ -3,16 +3,15 @@ Rails.application.config.peek.adapter = :redis, { client: ::Redis.new(Gitlab::Re
Peek.into Peek::Views::Host
Peek.into Peek::Views::PerformanceBar
if Gitlab::Database.mysql?
- require 'peek-mysql'
+ require 'peek-mysql2'
PEEK_DB_CLIENT = ::Mysql2::Client
PEEK_DB_VIEW = Peek::Views::Mysql2
- Peek.into PEEK_DB_VIEW
else
require 'peek-pg'
PEEK_DB_CLIENT = ::PG::Connection
PEEK_DB_VIEW = Peek::Views::PG
- Peek.into PEEK_DB_VIEW
end
+Peek.into PEEK_DB_VIEW
Peek.into Peek::Views::Redis
Peek.into Peek::Views::Sidekiq
Peek.into Peek::Views::Rblineprof
@@ -25,4 +24,5 @@ class PEEK_DB_CLIENT
self.query_details = Concurrent::Array.new
end
+# rubocop:disable Style/ClassAndModuleCamelCase
PEEK_DB_VIEW.prepend ::Gitlab::PerformanceBar::PeekQueryTracker