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
de54e4f9
Commit
de54e4f9
authored
Mar 12, 2019
by
Thong Kuah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'check_pg_stat_activity' into 'master'"
This reverts merge request !25723
parent
32056fc7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
19 deletions
+0
-19
spec/support/pg_stat_activity.rb
spec/support/pg_stat_activity.rb
+0
-19
No files found.
spec/support/pg_stat_activity.rb
deleted
100644 → 0
View file @
32056fc7
# frozen_string_literal: true
RSpec
.
configure
do
|
config
|
config
.
before
do
if
Gitlab
::
Database
.
postgresql?
&&
ENV
[
'PG_STAT_WARNING_THRESHOLD'
]
warning_threshold
=
ENV
[
'PG_STAT_WARNING_THRESHOLD'
].
to_i
results
=
ActiveRecord
::
Base
.
connection
.
execute
(
'SELECT * FROM pg_stat_activity'
)
ntuples
=
results
.
ntuples
warn
(
"pg_stat_activity count:
#{
ntuples
}
"
)
if
ntuples
>
warning_threshold
results
.
each
do
|
result
|
warn
result
.
inspect
end
end
end
end
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