BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
3582c6ae
Commit
3582c6ae
authored
Jun 14, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Track new Redis connections
Increment the counter `new_redis_connections` on each call to `Redis::Client#connect`, if we're in a transaction.
parent
ab3fb00c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
CHANGELOG
CHANGELOG
+1
-0
metrics.rb
config/initializers/metrics.rb
+16
-0
No files found.
CHANGELOG
View file @
3582c6ae
...
@@ -22,6 +22,7 @@ v 8.9.0 (unreleased)
...
@@ -22,6 +22,7 @@ v 8.9.0 (unreleased)
- Reduce number of fog gem dependencies
- Reduce number of fog gem dependencies
- Remove project notification settings associated with deleted projects
- Remove project notification settings associated with deleted projects
- Fix 404 page when viewing TODOs that contain milestones or labels in different projects
- Fix 404 page when viewing TODOs that contain milestones or labels in different projects
- Add a metric for the number of new Redis connections created by a transaction
- Redesign navigation for project pages
- Redesign navigation for project pages
- Fix groups API to list only user's accessible projects
- Fix groups API to list only user's accessible projects
- Redesign account and email confirmation emails
- Redesign account and email confirmation emails
...
...
config/initializers/metrics.rb
View file @
3582c6ae
...
@@ -138,4 +138,20 @@ if Gitlab::Metrics.enabled?
...
@@ -138,4 +138,20 @@ if Gitlab::Metrics.enabled?
GC
::
Profiler
.
enable
GC
::
Profiler
.
enable
Gitlab
::
Metrics
::
Sampler
.
new
.
start
Gitlab
::
Metrics
::
Sampler
.
new
.
start
module
TrackNewRedisConnections
def
connect
(
*
args
)
val
=
super
if
current_transaction
=
Gitlab
::
Metrics
::
Transaction
.
current
current_transaction
.
increment
(
:new_redis_connections
,
1
)
end
val
end
end
class
::
Redis
::
Client
prepend
TrackNewRedisConnections
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