Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3a0bcca8
Commit
3a0bcca8
authored
May 03, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
ac045a79
9a9aa223
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
config/initializers/peek.rb
config/initializers/peek.rb
+12
-0
No files found.
config/initializers/peek.rb
View file @
3a0bcca8
...
...
@@ -10,6 +10,18 @@ elsif Gitlab::Database.postgresql?
require
'peek-pg'
PEEK_DB_CLIENT
=
::
PG
::
Connection
PEEK_DB_VIEW
=
Peek
::
Views
::
PG
# Remove once we have https://github.com/peek/peek-pg/pull/10
module
::
Peek
::
PGInstrumented
def
exec_params
(
*
args
)
start
=
Time
.
now
super
(
*
args
)
ensure
duration
=
(
Time
.
now
-
start
)
PEEK_DB_CLIENT
.
query_time
.
update
{
|
value
|
value
+
duration
}
PEEK_DB_CLIENT
.
query_count
.
update
{
|
value
|
value
+
1
}
end
end
else
raise
"Unsupported database adapter for peek!"
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment