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
9af1a77c
Commit
9af1a77c
authored
Mar 11, 2022
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update external requests logger threshold constant name
parent
a86e1774
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lib/gitlab/database/transaction/context.rb
lib/gitlab/database/transaction/context.rb
+5
-5
No files found.
lib/gitlab/database/transaction/context.rb
View file @
9af1a77c
...
...
@@ -6,10 +6,10 @@ module Gitlab
class
Context
attr_reader
:context
LOG_SAVEPOINTS_THRESHOLD
=
1
# 1 `SAVEPOINT` created in a transaction
LOG_DURATION_S_THRESHOLD
=
120
# transaction that is running for 2 minutes or longer
LOG_EXTERNAL_HTTP_COUNT_THRESHOLD
=
50
# 50 external HTTP requests executed within transaction
LOG_EXTERNAL_HTTP_
TOTAL_DURATION_S
=
1
# 1 second spent in HTTP requests in total within transaction
LOG_SAVEPOINTS_THRESHOLD
=
1
# 1 `SAVEPOINT` created in a transaction
LOG_DURATION_S_THRESHOLD
=
120
# transaction that is running for 2 minutes or longer
LOG_EXTERNAL_HTTP_COUNT_THRESHOLD
=
50
# 50 external HTTP requests executed within transaction
LOG_EXTERNAL_HTTP_
DURATION_S_THRESHOLD
=
1
# 1 second spent in HTTP requests in total within transaction
LOG_THROTTLE_DURATION
=
1
def
initialize
...
...
@@ -66,7 +66,7 @@ module Gitlab
def
external_http_requests_threshold_exceeded?
external_http_requests_count
>=
LOG_EXTERNAL_HTTP_COUNT_THRESHOLD
||
external_http_requests_duration
>=
LOG_EXTERNAL_HTTP_
TOTAL_DURATION_S
external_http_requests_duration
>=
LOG_EXTERNAL_HTTP_
DURATION_S_THRESHOLD
end
def
should_log?
...
...
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